4 hundred quadrillonth?
steve at REMOVE-THIS-cybersource.com.au
Fri May 22 16:28:05 CEST 2009
On Thu, 21 May 2009 18:30:17 -0700, Gary Herron wrote:
>> In py3k Eric Smith and Mark Dickinson have implemented Gay's floating
>> point algorithm for Python so that the shortest repr that will round
>> trip correctly is what is used as the floating point repr....
> Which won't change the fact that 0.8 and lots of other favorite floats
> are still not representable exactly, but it will hide this fact from
> most newbies. One of the nicer results of this will be that these
> (almost) weekly questions and discussions will be come a thing of the
> With a sigh of relief,
Yay! We now will have lots of subtle floating point bugs that people
can't see! Ignorance is bliss and what you don't know about floating
point can't hurt you!
>>> 0.8 - (0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1) == 0.0
>>> 0.8 - 0.5 - 0.2 - 0.1 == 0.0
More information about the Python-list