@[email protected]M to Programmer [email protected] • 4 years ago0.1 + 0.2lemmy.mlimagemessage-square2fedilinkarrow-up112arrow-down10
arrow-up112arrow-down1image0.1 + 0.2lemmy.ml@[email protected]M to Programmer [email protected] • 4 years agomessage-square2fedilink
minus-square@[email protected]linkfedilink2•2 years agoFloating point arithmetic Basically, every floating point number represents a range of numbers. Which can lead to small errors like this. It has also to do with trying to represent a decimal number in binary, which works fine for integers but not for rational numbers.
But why
Floating point arithmetic
Basically, every floating point number represents a range of numbers. Which can lead to small errors like this. It has also to do with trying to represent a decimal number in binary, which works fine for integers but not for rational numbers.