Bug in floating point multiplication

Steven D'Aprano steve at pearwood.info
Thu Jul 2 17:42:16 CEST 2015


On Fri, 3 Jul 2015 12:52 am, Steven D'Aprano wrote:


> x = 1 - 1/2**53

Ooops, sorry I forgot that I had already run "from __future__ import
division". Otherwise that line needs to be:

x = 1 - 1.0/2**53



-- 
Steven



More information about the Python-list mailing list