MicrOS
nan.c File Reference
#include "../math.h"

Functions

double nan (const char *arg)
 Generate quiet NaN. More...
 

Function Documentation

◆ nan()

double nan ( const char *  arg)

Generate quiet NaN.

The call nan("n-char-sequence") is equivalent to strtod("NAN(n-charsequence)", (char**) NULL); the call nan("") is equivalent to strtod("NAN()", (char**) NULL). If tagp does not point to an n-char sequence or an empty string, the call is equivalent to strtod("NAN", (char**) NULL). Calls to nanf and nanl are equivalent to the corresponding calls to strtof and strtold.

Parameters
argNarrow character string identifying the contents of a NaN.
Returns
The nan functions return a quiet NaN, if available, with content indicated through tagp. If the implementation does not support quiet NaNs, the functions return zero.