>> (NaN should never compare equal to anything -- not even to itself [Thomas Wouters] > You know that's impossible, in Python, right ? (Due to the > shortcut taken by '==', based on object identity.) Surely you jest: I probably knew that while you were still nursing <wink>. OTOH, Python on WinTel comes remarkably close (by accident): C:\Code\python\dist\src\PCbuild>python Python 2.0 (#8, Jan 5 2001, 00:33:19) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. >>> inf = 1e300**2 >>> inf 1.#INF >>> nan = inf - inf >>> nan -1.#IND >>> nan2 = nan * 1.0 >>> nan2 -1.#IND >>> nan == nan2 0 >>> > Is that going to be 'fixed', too ? :) Not if I can help it. I'd be in favor of adding an fcmp function that needs to be called explicitly when you want the full complexity of 754 comparisons. Count them all up, and there are 32 distinct 754 binary float comparison operators! The 754 std says 26 (from memory, may be 2 more or less) of those have to be supplied, but-- since 754 is not a language std --says nothing about how they're to be spelled. OTOH, C99 resolutely tries to map that into C, and 754 True Believers will use that as a club. On the third hand, as Tom MacDonald posted here earlier (he was X3J11 chair), he's not sure anyone will ever implement C99 in whole. The complexities of full 754 support are a large part of why he worries about that. too-much-too-late-ly y'rs - tim
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