From -4663720302364907407
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,21749795fb0c69c7,start
X-Google-Attributes: gidf78e5,public
From: pang@cvdev.rochester.edu (Lixin Pang)
Subject: What is this "nan0x7fffffff" ?  How is it created?
Date: 1995/04/04
Message-ID: <3lq6rn$qk6@bilbo.ceas.rochester.edu>#1/1
X-Deja-AN: 100819145
organization: Cardiovascular Development, University of Rochester (New York)
newsgroups: comp.std.c++

A number divided by zero gives infinity.  I am running a numerical
code in c++ that sometimes gives me stuff like "nan0x7fffffff" and
"nan0x10000000".  How are they created?  How to avoid them?

I need  something like:

if ( a == nan0x7fffffff )
  exit (EXIT_FAILURE);

Is it possible?  C++ experts please help!  Thanks.


 






