> On Fri, Mar 13, 2009 at 9:43 PM, Bill Page wrote: >> >> Not that this really has much to do with computer algebra or >> mathematics per se, but I am curious if anyone can find a situation in >> pure Python (i.e. using only the standard Python library definitions >> for == ) that gives the following result: >> >> Python 2.4.6 (#2, Dec 20 2008, 15:02:30) >> [GCC 4.3.2] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> # some definition for a, b, and c >>>>> ... ? >>>>> a==c >> True >>>>> b==c >> True >>>>> a==b >> False >>>>> >
On Sat, Mar 14, 2009 at 3:38 AM, William Stein wrote: > teragon:papers wstein$ sage -python > Python 2.5.2 (r252:60911, Mar 12 2009, 23:58:30) > [GCC 4.0.1 (Apple Inc. build 5488)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> a = 10**22; b = 10**22+1; c = complex(a) >>>> a == c > True >>>> b == c > True >>>> a == b > False > Thanks*, William! *There is some kind of odd emotionally facially expression that I would like to convey along with the work "thanks" which means something like: I am very glad you took the time to show me this example, I am very surprised/shocked/disappointed by the result. I wonder if this is a widely known and intended behaviour? Regards, Bill Page. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---