ieee_is_nan
- Date:
10-12-2011
NAME
IEEE_IS_NAN - Tests for x being a NaN
SYNOPSIS
IEEE_IS_NAN ([X=]x)
STANDARDS
Fortran
IEEE Standard for Binary Floating-point Arithmetic
DESCRIPTION
The IEEE_IS_NAN intrinsic function returns the value TRUE if x is a NaN and otherwise, it returns the value FALSE. This function accepts the following argument:
- x
Must be of type real.
IEEE_IS_NAN is an elemental intrinsic function. The name of this intrinsic cannot be passed as an argument.
IEEE_IS_NAN will not be invoked if IEEE_SUPPORT_NAN(X) has the value false.
NOTES
The IEEE intrinsic procedures use the named constants contained in a system module, so you must include the following statement in your program:
USE, INTRINSIC :: IEEE_ARITHMETIC
RETURN VALUES
The result type and type parameter are of type default logical.
The value returned has the value TRUE if x is a NaN and the value FALSE otherwise.
EXAMPLES
USE, INTRINSIC :: IEEE_ARITHMETIC
REAL x
...
IF (IEEE_IS_NAN(x)) THEN
! Do something.
ELSE
! Do something else.
END IF
SEE ALSO
ieee_support_nan(3i)