test for nan

John Hunter jdhunter at ace.bsd.uchicago.edu
Tue Mar 30 22:24:57 CEST 2004

I have a C extension module that is returning some doubles.  When the
doubles get out of range, the numbers print as 'nan'.

Is there a better way to test for NaN than


where p1 is a float?


John Hunter

More information about the Python-list mailing list