osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why float('Nan') == float('Nan') is False


On 2/13/19 7:21 AM, ast wrote:
> Hello
> 
>   >>> float('Nan') == float('Nan')
> False
> 
> Why ?
Because the IEEE-754 Standard demands it, and people smarter
than I worked on the IEEE-754 Standard.

<https://en.wikipedia.org/wiki/NaN> is a quick starting
point for a deeper dive.