БГ
py3
Source:
a = 0.1+0.2
b = 0.3
print(str(a) == str(b))
Result:
False
Size: a a a
EA
py3
a = 0.1+0.2
b = 0.3
print(str(a) == str(b))
False
БГ
WI
БГ
WI
SI
EA
𝕬
py3
a = 0.1+0.2
b = 0.3
print(str(a) == str(b))
False
БГ
𝕬
EA
С
C
БГ
py3
print ("let me show you a hurt of floating point numbers\n\n")
print(".1*.1*.1+.00001 = {}\n\n".format(.1*.1*.1+.00001))
print("0.2+0.1==0.3:\n{}".format (0.2+0.1==0.3))
let me show you a hurt of floating point numbers
.1*.1*.1+.00001 = 0.0010100000000000003
0.2+0.1==0.3:
False
БГ
БГ