[Python-ideas] math.inf and math.nan constants
python at 2sn.net
Sun Jan 11 00:22:48 CET 2015
> According to the 2008 standard, the quiet bit is part of the bits that distinguish nan from inf, and that bit is set for quiet; therefore, a qnan with payload 0 exists, and is not an inf.
yes, the default payload is 0 for the quiet NaNs. I suppose the
routine can throw an exception if one tries to make a signaling NaN
with payload 0. Maybe setting default payload to 1 was not a good
suggestion. On could set it to 1 if someone creates a signaling NaN
w/o specifying payload (instead)...but, then, if someone goes all the
way specifying a signaling NaN, they should know what they are doing
I also have not been able to find any documentation on specific NaN
payload values/constants online so far. ... I find it somewhat a
surprise this is not well documented ...
More information about the Python-ideas