4 hundred quadrillonth?

Rob Clewley rob.clewley at gmail.com
Thu May 21 20:33:25 EDT 2009


On Thu, May 21, 2009 at 8:19 PM, Gary Herron <gherron at islandtraining.com> wrote:
> MRAB wrote:
>>
>> Grant Edwards wrote:
>>>
>>> On 2009-05-21, Christian Heimes <lists at cheimes.de> wrote:
>>>>
>>>> seanm.py at gmail.com schrieb:
>>>>>
>>>>> The explaination in my introductory Python book is not very
>>>>> satisfying, and I am hoping someone can explain the following to me:
>>>>>
>>>>>>>> 4 / 5.0
>>>>>
>>>>> 0.80000000000000004
>>>>>
>>>>> 4 / 5.0 is 0.8. No more, no less. So what's up with that 4 at the end.
>>>>> It bothers me.
>>>>
>>>> Welcome to IEEE 754 floating point land! :)
>>>

FYI you can explore the various possible IEEE-style implementations
with my python simulator of arbitrary floating or fixed precision
numbers:

http://www2.gsu.edu/~matrhc/binary.html



More information about the Python-list mailing list