Conversation
Notices
-
float('nan') == float('nan') → False ??? … IEEE 754 requires that ⇒ math.isnan(float('nan')) == math.isnan(float('nan')) → True !python
-
IEEE 754 requires both and Python (tested w/ 2.6) fullfills both requirements.
-
@bj Makes sense, but why are you using an old version of Python?
-
@arnebab: NaN iſt ein Platzhalter für /verſchiedene/ nicht definierte mathematiſche Operationen: 0/0 ≠ ∞/∞.
-
Because that's the standard !Python version of the system I'm sitting at right now. But I'm quite sure 2.7 yields the same results.
-
@bj I was never implying that it's any different in this regard. I just haven't seen 2.6 in a while.
-
@takeshitakenji aah, sorry, didn't read the entire dent history.. cool! :)
-
You don't work much with systems with „stable” or „long term support” distributions then I guess. ☺
-
@bj Not at home, anyway.
-
@bj You know, Windows XP kind of qualifies/qualified as a "long term support" OS.
Steve Dowe likes this. -
But it doesn't come with prebuild python packages at all. ;-)
-
@bj I think it'd have to take a closed-source Python implementation with the EULA attached for that to happen, unfortunately.
-
@mcepl Already covered that.
-
but x = float('nan'); x is x -> True !Python
-
besides: math.isnan requires python 2.5+
-
but the Python license allows closed source versions with EULA…
-
@takeshitakenji NaN cannot be compared for equality. Different ops might have led to it. If not comparable, == should yield False. !Python
-
@xemacs Already covered it, thanks.
-