| Richard E Maine 2005-04-22, 3:59 pm |
| In article <d4b5hs$kf5$1@newsreader.mailgate.org>,
David <redboy_xxx@yahoo.it> wrote:
> My output file must be a series of floating numbers. Instead of that is
> a series of -1.#QNAN0.
>
> What does it mean?
Well, I don't recognize all the details of the syntax, but the NAN bit
is a big hint (to me anyway). NAN stands for "not a number". You often
get NAN results from things like 0./0. or other invalid operations.
Plus, once you get a NAN, they tend to propogate all over because any
operation on a NAN gives another NAN.
Also, you can get NANs from using undefined variables (such as variables
that were never initialized; some code assumes that variables start
initialized to zero, but that is not necessarily so).
Depending on the particular compiler, there might be a way to tell it to
halt instead of producing a NAN for things like 0./0., but that won't
typically help with undefined variables.
Anyway, tracking down the error is more work, but "not a number" is what
it means.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
|