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

Dan Sommers 2QdxY4RzWzUUiLuE at potatochowder.com
Wed Feb 13 08:34:29 EST 2019


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.



More information about the Python-list mailing list