Anonymous user
Talk:Greatest common divisor: Difference between revisions
m
→errors in programs: verifying a special case wording, |0| = 0. -- ~~~~
Walterpachl (talk | contribs) (→errors in programs: add gcd(0,0) case) |
m (→errors in programs: verifying a special case wording, |0| = 0. -- ~~~~) |
||
Line 3:
A few programs would attempt to divide by zero if the 2nd argument is 0 (zero).
<br> In that special case, the absolute value of the first argument should be returned.
::unless it is 0 --[[User:Walterpachl|Walterpachl]] 12:40, 17 August 2012 (UTC)
::: The absolute value of zero ''is'' zero. -- [[User:Gerard Schildberger|Gerard Schildberger]] 15:23, 17 August 2012 (UTC)
<br><br>A number of examples don't show the results if either argument is negative.
|