A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/cmath/nan-function/ below:

function

<cmath> <ctgmath>

nan
double nan (const char* tagp);

Generate quiet NaN

Returns a quiet NaN (Not-A-Number) value of type double.

The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.

The argument can be used by library implementations to distinguish different NaN values in a implementation-specific manner.

Similarly, nanf and nanl return NaN values of type float and long double, respectively.



Parameters
tagp
An implementation-specific C-string.
If this is an empty string (""), the function returns a generic NaN value (the same as returned by passing "NAN" to strtod).

Return Value A quiet NaN value.

See also
isnan
Is Not-A-Number (macro/function)
nextafter
Next representable value (function)
nexttoward
Next representable value toward precise value (function)
NAN
Not-A-Number (constant)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4