Skip Montanaro <skip@pobox.com>: > One thing that confused me a bit was > that if 0.1 is approximated by something ever-so-slightly larger than 0.1, > how is it that if you add ten of them together you wind up with a result > that is ever-so-slightly less than 1.0? I think what's happening is that the exact binary result of adding 0.1_plus_a_little to itself has one more bit than there is room for, so it gets shifted right and one bit falls off the end. The amount you lose when that happens a few times ends up outweighing the extra that you would expect. Whether it's worth trying to explain *that* in the tutorial I don't know! Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4