Author noam
Recipients christian.heimes, gvanrossum, nascheme, noam, tim.peters
Date 2007-12-11.13:21:50
SpamBayes Score 0.0102972
Marked as misclassified No
Message-id <b348a0850712110521m31398f5dob03fc2016025dddf@mail.gmail.com>
In-reply-to <b348a0850712110430g20c3132dldf376207ab57907e@mail.gmail.com>
Content
If I think about it some more, why not get rid of all the float
platform-dependencies and define how +inf, -inf and nan behave?

I think that it means:
* inf and -inf are legitimate floats just like any other float.
Perhaps there should be a builtin Inf, or at least math.inf.
* nan is an object of type float, which behaves like None, that is:
"nan == nan" is true, but "nan < nan" and "nan < 3" will raise an
exception. Mathematical operations which used to return nan will raise
an exception (division by zero does this already, but "inf + -inf"
will do that too, instead of returning nan.) Again, there should be a
builtin NaN, or math.nan. The reason for having a special nan object
is compatibility with IEEE floats - I want to be able to pass around
IEEE floats easily even if they happen to be nan.

This is basically what Tcl did, if I understand correctly - see item 6
in http://www.tcl.tk/cgi-bin/tct/tip/132.html .
History
Date User Action Args
2007-12-11 13:21:52noamsetspambayes_score: 0.0102972 -> 0.0102972
recipients: + noam, gvanrossum, tim.peters, nascheme, christian.heimes
2007-12-11 13:21:51noamlinkissue1580 messages
2007-12-11 13:21:50noamcreate