4 ms·
2.4 rounded is 2. 2.4 + 2.4 = 4.8, rounded is 5. Therefore, 2 + 2 = 5. I was taught this as a "mind teaser" in middle school once. It was supposed to be cute
by junon 5y ago
2.4 rounded is 2.
2.4 + 2.4 = 4.8, rounded is 5.
Therefore, 2 + 2 = 5.
I was taught this as a "mind teaser" in middle school once. It was supposed to be cute and fun, but just ended up confusing half the class.
- dghf 5y ago2 + 2 = 5, for sufficiently large values of 2 and sufficiently small values of 5.
- deleted 5y ago[deleted]
- hulitu 5y agoTalking about undefined behaviour.
- xook 5y agoCute and fun, but also very real if you're a CPU: https://0.30000000000000004.com/ https://0.30000000000000004.com/
- junon 5y agoI wouldn't consider the brain teaser a result of FP error. But yes, something to consider anyway.