You say,
> gcd(2/1,4) returns 1 "for simplicity" (!), because 2/1 is a rational.
> This is shockingly silly.

I don't know exactly how this came up, but if 2/1 is in a different
domain (rational)
from 2, (integer),  then gcd should probably be 1,  since any non-
zero
rational number divides any other, and one commonly uses the positive
"unit" 1 for
such a case. You could argue that since you can coerce 2/1, you
should.

That's sometimes OK, but not always.

Really, the issue is much broader. for example, do you also want to
treat the complex number
1+0*i the same as 1?   do you want to treat the floating point number
1.0 the same as 1?

What about 1X1 matrices?

Is 1^0  the same as 1^0.0  or 1.0^0  or 1.0^0.0?  Do you perhaps wish
to consider/dismiss
the existence of number systems with signed zeros (IEEE floating-point
standard) on the
grounds that -0 = +0,  [true, for numerical comparison] and therefore
there should be
only a single zero?

While I don't know the exact formulation of this GCD problem, the
issue of
implicit coercion is one of the troubling sore spots in a system
design, and should not
 be decided by counting up casual +1 votes.

I think the Axiom people might have thought more about it than others.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to