Andrew Koenig <ark-mlist at att.net>: > The reason is that the first example does arithmetic, and it is easy > to explain that floating-point arithmetic is not completely accurate. Then how would you explain this to them: >>> 1.1 < 1.1000000000000001 False There's no arithmetic being done there. And if you're thinking of something like "floats don't have that many digits of precision", you then need to explain >>> 1.2 < 1.2000000000000001 True Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at 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