home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
- From: cflatter@nrao.edu (Chris Flatters)
- Subject: Re: how to quit on an NaN result?
- Message-ID: <1992Aug17.222820.22019@nrao.edu>
- Sender: news@nrao.edu
- Reply-To: cflatter@nrao.edu
- Organization: NRAO
- References: <1992Aug17.155913.21922@ultb.isc.rit.edu>
- Date: Mon, 17 Aug 1992 22:28:20 GMT
- Lines: 17
-
- In article 21922@ultb.isc.rit.edu, jsvrc@rc.rit.edu (J A Stephen Viggiano) writes:
- >A portable way is to use an internal write. Write a known NaN to
- >a character variable, use the substring that flags the result as a NaN.
- >Then, write the value you want to test to another character variable, and
- >compare *these* variables.
- >
-
- This is unsafe. A floating point implementation that conforms to IEEE-754
- must support at least two different NaN bit patterns (one signalling NaN
- and one non-signalling NaN) for each supported precision.
-
- Chris Flatters
- cflatter@nrao.edu
-
-
-
-
-