[Python-ideas] math.inf and math.nan constants
ethan at stoneleaf.us
Wed Jan 7 19:27:58 CET 2015
On 01/07/2015 10:23 AM, MRAB wrote:
> On 2015-01-07 16:57, Devin Jeanpierre wrote:
>> Maybe this would justify a note in the documentation, that this is one
>> NaN, but there are many others that are different.
>> As long as people know not to rely on math.nan being the same object
>> or having the same bits as every nan, then there's no harm.
> Does that mean it should be a function that returns a NaN, i.e. math.nan()?
No, it should be similar to math.e and math.pi -- that is, a constant value (which NaN is bound to math.nan is subject
to change without notice, but it will be a NaN).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the Python-ideas