Everything

nan / nanf / nanl


Returns not-a-number.

[Format]

#include <math.h>

double nan(const char *c);

float nanf(const char *c);

long double nanl(const char *c);

[Parameters]

c Pointer to a string

[Return values]

qNaN with the contents of the location indicated by c or 0 (when qNaN is not supported)

[Remarks]

The nan("c string") call is equivalent to strtod("NAN(c string)", (char**) NULL). The nanf and nanl calls are equivalent to the corresponding strtof and strtold calls, respectively.