Dear all, On 5/10/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > > > presumably you could do > > if CC(x).imag() != 0: > # raise error >
I don't know if things have changed, but usually you have to be careful with testing equality of real numbers. Approximation errors might say two real numbers which "should" be equal are not. Maybe a better idea is to test if the difference is "small enough". (In the past, I had "sqrt(3)+1-1 == sqrt(3)" gave me FALSE... Now it doesn't, so maybe they've indeed changed things, but just in case...) Best to all, Luis --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---