by Someone · 11y ago · 0 comments
=0.1+0.2-0.3 => 0
=(0.1+0.2-0.3) => 5.55112E-17
(inspired by http://www.cs.berkeley.edu/~wkahan/Mindless.pdf)EDIT: Numbers is http://www.apple.com/mac/numbers/
Edit: sorry, my brain was still reading the leading 0.3 from the linked article. There is indeed nothing wrong with that representation except the nonstandard leading zeroes.
Those zeros are not part of the mantissa.
> perl -E 'say .1 + .2 - .3'
5.55111512312578e-17
And python actually gives one more digit than Numbers
> python -c 'print(repr(.1 +.2 -.3))'
5.551115123125783e-17
So, I'm not sure why you are claiming "there are way too many digits" and that Numbers is doing something wrong.
# select 0.1::float + 0.2::float - 0.3::float; ---------------------- 5.55111512312578e-17