PEP 260: simplify xrange()
Carsten Geckeler
uioziaremwpl at spammotel.com
Wed Jun 27 15:08:50 EDT 2001
On Wed, 27 Jun 2001, Jeff Shannon wrote:
[snip]
> To make a long story short, the discussion regarding FP boils down to the
> fact that "1.0" cannot be exactly represented in FP.
Well, 1.0 *can* be represented exactly in floating point. Even 0.5.
>>> 0.5
0.5
>>> 1.0
1.0
>>> 0.1
0.10000000000000001
>>> 438.9375
438.9375
>>> 438.937
438.93700000000001
>>> 438.9374
438.93740000000003
Now can think about the reason, why some real numbers can be represented
exactly in FP, and some not. ;)
Cheers, Carsten
--
Carsten Geckeler
More information about the Python-list
mailing list