"Eric S. Raymond" <esr@thyrsus.com> writes: > APL faced this problem twenty-five years ago. I like its solution; > a `fuzz' variable defining the close-enough-for-equality range. For what it's worth, the current implementation is nothing this complicated. Like every other numeric operation, compares of rationals with floats coerce to floats. So as a result rational(x)==float(x) iff float(rational(x))==float(x). That is, of course, much more permissive than if we coerced the other way and had rational(x)==float(x) iff rational(x)==rational(float(x)). -- Christopher A. Craig <python-pep@ccraig.org> "You could shoot Microsoft Office off the planet and this country would run better. You would see everyone standing around saying, 'I've got so much time now.' " Scott McNealy (CEO of Sun)
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