Re: math:gcd is incorrect

new topic     » goto parent     » topic index » view thread      » older message » newer message

Note: formally gcd(0, 0) is undefined and should be an
error just as much as division by zero is an error.

Technically, this is correct. Sometimes GCD(0, 0) is
explicitly considered being equal to zero for similar
reasons that 0^0 is considered equal to 1.

The situations are not similar.

1. 0^0 is def = 1 because lim x->0 x^x = 1 and x^x is continuous  
   on all real x != 0 
2. GCD is a divisor: by definition 0 is not a divisor 
3. Normalisation: Q(0,0) = 0: Q(x,y) = (x/gcd(x,y), y/gcd(x,y)) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu