+ 4
Python has the same limitations for floating point arithmetic calculations as all the other languages. You can use Decimal to get the accurate result: from decimal import Decimal a = Decimal(1.2') b = Decimal(1') print a**1 - b
25th Mar 2018, 1:58 PM
Dinesh Banjara
Dinesh Banjara - avatar