Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Help: 1.#QNAN ??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24763] Re: Help: 1.#QNAN ??
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 10 Aug 2000 00:31:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

my answer will not help you much.
The floting point standard allow 
(beside the mantissa|exponent) numbers
the representation of some non numeric 
expressions. In particular all things
that can't be interpreted as a mantissa|exponent
combination are reportet as NAN.
An example may be

char str[128]="A sting that in not a number."
double *dptr;

dptr=(double *)str;

and *dptr is Not A Number or (NAN).

An other source of NAN may be floting point
overflows. The processor generate typical an
exception in this case but you (or your compiler)
may ignore this exceptions and continue. 
Since you can also have +INF  and -INF 
a division by a +INF may generate a NAN.

So the only solution for you ist to find the
bug in your program where you divide by zero
or assign pointers to the false memory location.

Regards
  Jens


Phil wrote:
> 
> Hi,
> I apologise if this is slightly off-topic, but I imagine many people here
> use Mathematica & C++ in computations. In a C++ program I have used 'double'
> for all of my values in computations. My outputs are usually shown in the
> form 5.324670 etc... but in some cases I get them in this form 1.#QNAN.
> What on earth does this mean? It may be a problem as I want to write my
> values to file to be read in by another application, and I don't suppose it
> will understand what type of value 1.#QNAN is either.
> Thanks In Advance.
> Philip.


  • Prev by Date: Creating GIFs using Display
  • Next by Date: Re: Re: Correlation function and data
  • Previous by thread: Re: Help: 1.#QNAN ??
  • Next by thread: postscript