3 ms·
The online version, at least, seems to be wrong when you do wrap it in parentheses: =(4/3 - 1)*3 - 1 = 0 =((4/3 - 1)*3 - 1) = -2.22045E-16
by dns_snek 4y ago
The online version, at least, seems to be wrong when you do wrap it in parentheses:
=(4/3 - 1)*3 - 1 = 0
=((4/3 - 1)*3 - 1) = -2.22045E-16
- OGWhales 4y agoCheck out page 3-5 of this paper called How Futile are Mindless Assessments of Roundoff in Floating-Point Computation? [0]. It explains what is happening here better than I can and is where I got this example from. [0]: https://people.eecs.berkeley.edu/~wkahan/Mindless.pdf https://people.eecs.berkeley.edu/~wkahan/Mindless.pdf