On Feb 11, 9:56 am, Simon King <simon.k...@uni-jena.de> wrote: > Why an exception? If the elements are in a field that is not the > fraction field of a PID, it is totally fine that gcd(a,b) returns 0 if > one of a,b is zero, and returns 1 otherwise. > > I hope the whole discussion is not "painting a bike shed"...
I'd say: return 0 if a=b=0 and some random non-zero field element otherwise. That will teach people to write programs that depend on properly defined mathematical concepts rather than implementation details. (this is not a serious proposal for this particular case but the principle of not going out of your way to fix arbitrary choices and to avoid depending on them being made in a particular way has served me well). The "positive generator of the fractional ideal" choice makes a lot of sense to me in an interactive setting, but I'd expect that the dependence of a program on that behaviour would almost always be an error. -- 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