Talk:Greatest common divisor: Difference between revisions

Content added Content deleted
m (→‎errors in programs: added whitespace and highlighting.)
Line 20: Line 20:
-----
-----


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 (equal to zero) was chosen. So, for that case, '''|0| = 0'''.
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 (equal to zero) was chosen.   So, for that case,   '''│0│ = 0'''.


From the Wikipedia page: http://en.wikipedia.org/wiki/Greatest_common_divisor
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.
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 the   ''meet''   operation,   and   '''lcm'''   as the   ''join''   operation.


-- [[User:Gerard Schildberger|Gerard Schildberger]] 16:10, 17 August 2012 (UTC)
-- [[User:Gerard Schildberger|Gerard Schildberger]] 16:10, 17 August 2012 (UTC)