browse/
2 results
computers/floating-point-why-0-1-0-2-is-not-exactly-0-3.md
Floating point: why 0.1 + 0.2 is not exactly 0.3
Type `0.1 + 0.2` into JavaScript or Python and you get `0.30000000000000004`. It is not a bug, and it is not your mistake. Computers store…
languages/why-does-0-1-0-2-give-0-30000000000000004-in-python.md
Why does 0.1 + 0.2 give 0.30000000000000004 in Python?
Type 0.1 + 0.2 into Python and you get 0.30000000000000004. It is not a bug: computers store fractions in binary, and one tenth has no…