Message291251
"%s" rounds float representation to 12 digits in Python 2.7. Replace "%s" with "%r" and you will get precise representation of floats.
int(4.01) = 4
int(0.019999999999999574) = 0
int(0.03999999999999915) = 0
int(0.09999999999999787) = 0
int(0.19999999999999574) = 0
int(0.9999999999999787) = 0
R = 0.009999999999999787
See also https://docs.python.org/2/tutorial/floatingpoint.html . |
|
Date |
User |
Action |
Args |
2017-04-07 04:20:16 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, eryksun, nvutri |
2017-04-07 04:20:16 | serhiy.storchaka | set | messageid: <1491538816.79.0.762136220205.issue30009@psf.upfronthosting.co.za> |
2017-04-07 04:20:16 | serhiy.storchaka | link | issue30009 messages |
2017-04-07 04:20:16 | serhiy.storchaka | create | |
|