Menu

#3 Gcd bugs

new
nobody
major
defect
2011-11-20
2011-11-20
Duke Leto
No

In> Gcd(10,3.3)
Out> 3.3; //should error with floats

In> Gcd(10,Pi)
Out> Pi; //and irrational consts

In> Gcd(Exp(1),Exp(2))
Out> Exp(2); // and functions that don't return int's

In> Gcd(-10,0)
// according to "Number Theory", Andrews (1971)
// Gcd(a,0) = Abs(a)
Out> -10; //should be 10

In> Gcd(0,-10)
Out> -10; //same as previous, since Gcd(a,b) = Gcd(b,a)


Moved from SF: 559695

Discussion


Log in to post a comment.