osdir.com


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

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


On 2019-02-14, Avi Gross <avigross at verizon.net> wrote:

> I experimented a bit:
>
>>>> float("nan ")
> nan
>>>> float("  nan")
> Nan
>>>> float("  nAn")
> nan

That's curious.  I've never seen "Nan" before.  What version of Python
are you using?

-- 
Grant Edwards               grant.b.edwards        Yow! NANCY!!  Why is
                                  at               everything RED?!
                              gmail.com