str smarter than round?
gods1child
alankarmisra at hotmail.com
Fri Jun 15 12:11:04 EDT 2001
More information about the Python-list mailing list
Fri Jun 15 12:11:04 EDT 2001
- Previous message (by thread): str smarter than round?
- Next message (by thread): str smarter than round?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What does str() know that round() doesnt in the following lines? >>> a = 1.69 >>> round(a,2) 1.6899999999999999 >>> round(a,1) 1.7 >>> str(a) '1.69' >>> How does str manage to get the accurate representation of floating points? I am using Windows 2000, Python 2.0
- Previous message (by thread): str smarter than round?
- Next message (by thread): str smarter than round?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list