Hi, On 2017-02-20, Daniel Krenn <kr...@aon.at> wrote: > On 2017-02-19 17:57, rjf wrote: >> It might be comparing the real parts. What did you expect? Perhaps >> Error "<" requires that both operands be members of the same ordered >> field ?? >> Or perhaps just >> False > > I, for sure, did not expect "True".
It is clear that there is no mathematical meaning associated with the comparison "I<1" --- so, I wouldn't have any expectation of mathematical meaning here. "bool(I<1)" is a different story: It *has* to return True/False for political reasons (Python decided against using "Unknown" or "Alternative" as truth values). Or it could raise an error. Indeed it would be a good idea to have a switch as in Maxima. I believe it would be good to have an "Ordered" axiom for fields, so that one can easily check "CC in Fields.Ordered()" respectively "QQ in Fields.Ordered()". Also, for an *ordered* field K, it might be a good idea to have a method K.cmp (implemented via Fields.Ordered.ParentMethods) so that K.cmp(x,y) returns -1,0,+1, according to how the elements x,y of K compare (and raises an error if x,y do not coerce into K): Explicit is better than implicit. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.