Re: math:gcd is incorrect
- Posted by DerekParnell (admin) May 07, 2012
- 1780 views
bill said...
The manual:
Any zero parameter causes 0 to be returned.
...
This is simply wrong.
Agreed. This is a mistake. I'll submit a ticket for it. In future, this function will return a value greater than zero when we have a GCD, and 0 when the input values cannot have a GCD (eg. gcd(0,0))
In general, gcd(0, X) will return floor(abs(X))