Well, someone asked for more posts.. not sure this is what he had in mind.  ;-)

Forgive my being a bear of little brain, but I've yet to grasp why
defining the default gcd rational function to be equal to 1 or (from
Simon) the lcm equal to 1 would be a _useful_ thing to do, independent
of the existence of perspectives from which it's the right
generalization.  Who is going to call such a function?  Who uses the
current rational gcd behaviour?

(.. I have a sneaking suspicion that the reason the rational lcm
behaviour doesn't currently match the rational gcd behaviour is
because these functions aren't getting a lot of exercise, not even by
people strongly in the gcd(2/1,4)=1 camp.)


The Pari/Mma/(Sage lcm+Maxima gcd) behaviour has pretty much
everything I want.  Agrees with integer values when denominator is 1,
and so obeys least-surprise principles; is informative; preserves many
nice properties of positive integer gcd/lcm; is used in many other
places.  The current Sage rational gcd behaviour surprised the heck
out of me and did so silently; returns 1 for all arguments and so is
minimally informative; doesn't preserve said nice relationships; and
doesn't match the behaviours of any of Pari, Mma, Maple, Maxima, or
Magma -- it doesn't even match Sage for lcm.

If the above doesn't speak to you in favour of the former I don't know
what else to say; we clearly have very different perspectives on
design!

If we do wind up defining gcd and/or lcm to be l, could we at least
define new short-named functions, say rgcd and rlcm, which do what
(IMHO) they should?  Then I can simply explain to people "Oh, in Sage
we use 'rgcd' and 'rlcm' for gcd and lcm" and forget I brought this up
in the first place. :^)


Doug

--
Department of Earth Sciences
University of Hong Kong

-- 
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