A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-April/003264.html below:

[Python-Dev] Round Bug in Python 1.6?

[Python-Dev] Round Bug in Python 1.6?Tim Peters tim_one@email.msn.com
Sun, 9 Apr 2000 16:25:19 -0400
[Christian]
> Hmm, I hope I understood.
> Oh, wait a minute! What is the method? What is the correct value?
>
> If I type
> >>> 0.1
> 0.10000000000000001
> >>> 0.10000000000000001
> 0.10000000000000001
> >>>
>
> There is only one value: The one which is in the machine.
> Would you think it is ok to get 0.1 back, when you
> actually *typed* 0.10000000000000001 ?

Yes, this is the kind of surprise I sketched with the "2-bit machine"
example.  It can get more surprising than the above (where, as you suspect,
"shortest conversion" yields "0.1" for both -- which, btw, is why reading it
back in to a float type with more precision loses accuracy needlessly, which
in turn is why 754 True Believers dislike it).

repetitively y'rs  - tim





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4