home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!pacbell.com!network.ucsd.edu!ucsbcsl!ucsbuxa!6500mack
- From: 6500mack@ucsbuxa.ucsb.edu (Michael P. Mack)
- Newsgroups: comp.lang.c
- Subject: How is NaN recognized?
- Message-ID: <5569@ucsbcsl.ucsb.edu>
- Date: 29 Aug 92 19:06:29 GMT
- Sender: root@ucsbcsl.ucsb.edu
- Lines: 12
-
- I am using scanf() to read in a float that is entered by the user. If
- an invalid string is typed such as "-" or "." then the variable is
- assigned -0.NaN(DFD5480000000000... or -0.NaN(DFD9400000000000000...
-
- How do I detect when the float is a NaN so that I can set it to 0.0?
-
-
- TxInAdv
-
- Mike Mack
- 6500mack@ucsbuxa.ucsb.edu
-
-