Simple addition

Rainer Deyke rainerd at eldwood.com
Mon Feb 16 21:41:31 EST 2004


Dan Bishop wrote:
> Why not display the *exact* decimal representation,
> "0.1000000000000000055511151231257827021181583404541015625"?

This has my vote.  Unfortunately Python seems incapable of figuring out all
of those digits.

Python 2.3.2 (#49, Oct  2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> '%.64f' % 0.1
'0.1000000000000000100000000000000000000000000000000000000000000000'


-- 
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com





More information about the Python-list mailing list