test for nan
From: John Hunter (jdhunter_at_ace.bsd.uchicago.edu)
Date: 03/30/04
- Next message: Michael: "Re: Prothon Prototypes vs Python Classes"
- Previous message: Josiah Carlson: "Re: asyncore deficiencies"
- Next in thread: Jeff Epler: "Re: test for nan"
- Maybe reply: Jeff Epler: "Re: test for nan"
- Reply: David M. Cooke: "Re: test for nan"
- Reply: Michael Hudson: "Re: test for nan"
- Maybe reply: Skip Montanaro: "Re: test for nan"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 14:24:57 -0600 To: python-list@python.org
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
str(p1)=='nan'
where p1 is a float?
python2.3
Thanks,
John Hunter
- Next message: Michael: "Re: Prothon Prototypes vs Python Classes"
- Previous message: Josiah Carlson: "Re: asyncore deficiencies"
- Next in thread: Jeff Epler: "Re: test for nan"
- Maybe reply: Jeff Epler: "Re: test for nan"
- Reply: David M. Cooke: "Re: test for nan"
- Reply: Michael Hudson: "Re: test for nan"
- Maybe reply: Skip Montanaro: "Re: test for nan"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|