On Thu, Jul 2, 2015 at 9:26 AM, Paul Rubin <no.email@nospam.invalid> wrote:
> Steven D'Aprano <st...@pearwood.info> writes:
>> x = 1 - 1/2**53
>> assert x == 0.9999999999999999
>
> In Python 2.x I don't see how that assert can possibly succeed, since
> x is the integer 1.  But I tested it anyway on 2.7.5 under Fedora 19
> and it threw an assertion error.

Oh, duh. That was the problem on my 2.7.6 test as well. I added from
__future__ import division, and now it runs to completion.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to