|
![](/i/fill.gif) |
Mike Williams <mik### [at] nospam please> wrote:
: If you subtract .1 from 1 10 times you get a number that's not quite
: exactly zero, because floating point arithmetic is never exact.
=====
False. For some values floating point arithmetic is very exact.
For example, 1.0+1.0 is exactly 2.0, no less, no more.
However, for some other values it might not be. For example 0.1+0.1 may not
be exactly 0.2 (although 0.5+0.5 is exactly 1.0).
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |