[Python-Dev] Weekly Python Bug/Patch Summary
Tim Peters
tim.one at comcast.net
Thu Feb 19 12:52:52 EST 2004
[Michael Hudson]
> Would it make (more) sense to implement rich comparisons for floats?
Not much. There are 32 distinct theoretical binary comparison operators
under 754 semantics (16 for which subset of {<, =, >, unordered} you're
interested in, and then each of those comes in two flavors depending on
whether you want a signaling NaN comparand to, or not to, raise an
exception), and the standard "recommends" implementing something like 26 of
them.
> I'm not enthusiastic about the patch that got pasted into the bug
> report.
That's dead on arrival -- apart from the dubious semantics it's trying to
invent, it doesn't even work under MSVC 6 (which I've explained in the bug
report). There's no reliable cross-platform C support for any of this
stuff, therefore there's nothing Python can do about 754 oddballs without
masses of platform-specific code (see fpectlmodule.c for a taste of that
approach).
More information about the Python-Dev
mailing list