Message379589
I'm noticing some floating point representation precision issues that occurs on all versions and platforms:
>>> 277*0.1
27.700000000000003
>>> 1.2-1.0
0.19999999999999996
>>> import numpy as np
>>> np.double(277*0.1)
27.700000000000003
>>> np.double(1.2-1.0)
0.19999999999999996
>>> np.longdouble(277*0.1)
27.700000000000002842
>>> np.longdouble(1.2-1.0)
0.19999999999999995559
Verified with python 2.7 to 3.8. On x86 (i386 and amd64) and ARM (32 and 64 bits). It does not occur in C, LUA, Perl, ... |
|
Date |
User |
Action |
Args |
2020-10-25 16:49:56 | atuccia | set | recipients:
+ atuccia |
2020-10-25 16:49:56 | atuccia | set | messageid: <1603644596.05.0.306482715682.issue42148@roundup.psfhosted.org> |
2020-10-25 16:49:56 | atuccia | link | issue42148 messages |
2020-10-25 16:49:55 | atuccia | create | |
|