On Friday, February 11, 2011, D. S. McNeil <dsm...@gmail.com> wrote:
> Well, someone asked for more posts.. not sure this is what he had in mind.  
> ;-)
>

That was me.  I think this has been a great discussion.



> 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. :^)
>

I vote for changing the defn of sage rational gcd to match the
"Pari/Mma/(Sage lcm+Maxima gcd) " convention.   Since +1 isn't having
the desired effect, I vote with my BDFL powers instead.

Somebody post a patch.

   - william


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

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

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