In article <aanlkti=kom3xbknmmvwbhxxsvnya_kucokbnpzqp2...@mail.gmail.com>, Benjamin Kaplan <benjamin.kap...@case.edu> wrote: > > Well, it is a *bit* of a Python issue since, as others have pointed out, > > Python's behavior has changed due to the implementation of Gay's > > rounding algorithm in 3.1 and also in 2.7: > > > > $ python2.6 -c 'print(repr(34.52))' > > 34.520000000000003 > > $ python2.7 -c 'print(repr(34.52))' > > 34.52 > > $ python3.1 -c 'print(repr(34.52))' > > 34.52 > But that's not keeping the number the way it was typed. It's just not > showing you the exact approximation. It doesn't get rid of rounding > errors. > >>> 34.52 > 34.52 > >>> >>> _ * 10**10 > 345200000000.00006
Yes, as discussed earlier in this thread and I didn't mean to imply otherwise. I should have worded my comment differently: the main reason for making it was to point out that the new float repr format feature is also in 2.7. -- Ned Deily, n...@acm.org -- http://mail.python.org/mailman/listinfo/python-list