Nov-24-2020, 11:18 PM
Nov-24-2020, 11:40 PM
Nov-25-2020, 12:01 AM
It's the way floating point arithmetic work, Basic Answers.
https://0.30000000000000004.com/
There is a Decimal module or other method to overcome this if needed.
https://0.30000000000000004.com/
There is a Decimal module or other method to overcome this if needed.
>>> from decimal import Decimal >>> >>> result = Decimal('0.2') * Decimal('0.1') >>> result Decimal('0.02') >>> print(result) 0.02