Mindblown/is0.30000000000000004.py

5 lines
262 B
Python

print("0.1 + 0.2 = ", 0.1 + 0.2)
print("float(1) + float(2) = ", float(1) + float(2))
print(f"float(1) + float(2) = {float(1) + float(2):.36f}, nu met 36 cijfers")
print("0.01 + 0.02 = ", 0.01 + 0.02)
print(f"0.01 + 0.02 = {0.01 + 0.02:.36f}, nu met 36 cijfers")