On Fri, Mar 13, 2009 at 9:43 PM, Bill Page <bill.p...@newsynthesis.org> wrote: > > On Fri, Mar 13, 2009 at 11:02 PM, Craig Citro wrote: >> >> Indeed, even Python agrees: >> >> Python 3.0 (r30:67503, Jan 23 2009, 04:39:45) >> [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> import fractions >>>>> fractions.Fraction(1) >> Fraction(1, 1) >>>>> fractions.Fraction(1) == 1 >> True >>>>> >> > > 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 >>>> > > Regards, > Bill Page.
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 -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---