I have problem with some floats in python.Some float number when I multiply( or subtracting) they get wrong answer.I understand that binary code can't store this type of numbers and he convert it that number which he can store and is nearest to first number.But none say about it how fix it .
How get real number?
I tried round it but it doesn't work it also get wrong number.
THIS IS SAMPLE CODE WHAT I MEAN:
float_1=1.2
float_2=1.4
float_3=1.5
print(float_1*float_2)
#this print 1.68 and this is True
print(float_2*float_3)
#But this print 2.0999999999999996 and this is False it must print 2.1