Jump to content

Talk:Greatest common divisor: Difference between revisions

m
→‎errors in programs: added Wikipedia citation of defintion of gcd(0,0)=0. -- ~~~~
(→‎errors in programs: added sigline to previous statements, added comments about gcd(0,0). -- ~~~~)
m (→‎errors in programs: added Wikipedia citation of defintion of gcd(0,0)=0. -- ~~~~)
Line 6:
::unless it is 0 --[[User:Walterpachl|Walterpachl]] 12:40, 17 August 2012 (UTC)
 
-----
::: The special case of '''gcd(0,0)''' is usually defined to be '''0''', but some authors consider it to be '''undefined'''. When implementing the REXX version 1 example, the first definition (0) was chosen. So, for that case, '''|0| = 0'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] 15:39, 17 August 2012 (UTC)
 
::: The special case of '''gcd(0,0)''' is usually defined to be '''0''', but some authors consider it to be '''undefined'''. When implementing the REXX version 1 example, the first definition (0equal to zero) was chosen. So, for that case, '''|0| = 0'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] 15:39, 17 August 2012 (UTC)
 
From the Wikipedia page: http://en.wikipedia.org/wiki/Greatest_common_divisor
 
It is useful to define gcd(0,0)=0 and lcm(0,0)=0 because then the natural numbers become a complete distributive lattice with gcd as meet and lcm as join operation.
 
-- [[User:Gerard Schildberger|Gerard Schildberger]] 16:10, 17 August 2012 (UTC)
 
<br><br>A number of examples don't show the results if either argument is negative. -- [[User:Gerard Schildberger|Gerard Schildberger]] 15:39, 17 August 2012 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.