AgreeableLandscape@lemmy.mlM to Programmer Humor@lemmy.ml · 4 years ago0.1 + 0.2lemmy.mlexternal-linkmessage-square2fedilinkarrow-up113arrow-down10
arrow-up113arrow-down1external-link0.1 + 0.2lemmy.mlAgreeableLandscape@lemmy.mlM to Programmer Humor@lemmy.ml · 4 years agomessage-square2fedilink
minus-squareMsFlammkuchen@lemmy.blahaj.zonelinkfedilinkarrow-up3·1 year 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.