You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even when prices are not very short numbers there are issues with floating point numbers:
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 2.3+2.4
4.699999999999999
That can be fixed with the decimal module for eg:
>>> from decimal import Decimal
>>> Decimal('2.3')+Decimal('2.4')
Decimal('4.7')
problem:
python number rounding when very low prices can make huge differences
The text was updated successfully, but these errors were encountered: