I run the following code:
numero = 80.12
a = int(numero)
b = abs(numero) - abs(int(numero))
print(a,b)
And as a result I get...
80, 0.12000000000000455
I don't know what could be the problem of printing excess of decimal places.
I run the following code:
numero = 80.12
a = int(numero)
b = abs(numero) - abs(int(numero))
print(a,b)
And as a result I get...
80, 0.12000000000000455
I don't know what could be the problem of printing excess of decimal places.
The full gory details can be found in this documentation. Floating point representations of decimal fractions are almost never precise.