ieee_is_finite
- Date:
10-12-2011
NAME
IEEE_IS_FINITE - Tests for x being greater than negative infinity and less than positive infinity
SYNOPSIS
IEEE_IS_FINITE ([X=]x)
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran
IEEE Standard for Binary Floating-point Arithmetic
DESCRIPTION
The IEEE_IS_FINITE intrinsic function returns the value TRUE if -infinity < x < +infinity. Otherwise, it returns the value FALSE. IEEE_IS_FINITE accepts the following argument:
- x
Must be of type real.
IEEE_IS_FINITE is an elemental function. The name of this intrinsic cannot be passed as an argument.
IEEE_IS_FINITE is not invoked if IEEE_SUPPORT_DATATYPE(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 is default logical.
The result has the value true if the value of x is finite. That is, the IEEE_CLASS(x) must be one of the following values:
IEEE_NEGATIVE_DENORMAL
IEEE_NEGATIVE_NORMAL
IEEE_NEGATIVE_ZERO
IEEE_POSITIVE_NORMAL
IEEE_POSITIVE_DENORMAL
IEEE_POSITIVE_ZERO
EXAMPLES
Example 1:
USE, INTRINSIC :: IEEE_ARITHMETIC
REAL x
...! Compute X.
IF (IEEE_IS_FINITE(x)) THEN
...! Do something.
ELSE
...! Do something else.
END IF
SEE ALSO
ieee_suppport_datatype(3i)