comparing nan "number"

John J. Lee jjl at pobox.com
Mon Dec 1 12:14:53 EST 2003


Boštjan Jerko <bostjan.jerko at mf.uni-lj.si> writes:

> I need to know if the result of math formula is nan (Not a number). 
> How can I do that?

I suppose:

NAN = any_calculation_that_returns_nan()

if some_other_calculation() is NAN:
    ...


John




More information about the Python-list mailing list