C examples for math.h:nanl
function
<cmath> <ctgmath> <math.h>
Returns a quiet NaN (Not-A-Number) value of type long double.
The NaN values identifies undefined values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
float nanl (const char* tagp);
Parameter | Description |
---|---|
tagp | An implementation-specific C-string. |
A quiet NaN value.
#include <stdio.h> #include <math.h> int main()/*w w w.ja v a 2 s. co m*/ { printf("%f\n",nanl("")); printf("%f",nanl("NaN")); return 0; }