Determines if the value of the input variable is NaN.
n = is_nan(f)
Where:
f
: Real number to check if it is NaN.It returns True if the number is NaN and False otherwise.
The following program checks some real numbers to see if they are NaN:
PROGRAM is_nanExample
USE FU_Numbers, ONLY: is_nan
IMPLICIT NONE
REAL :: f
WRITE(*,*) is_nan(5.)
f = 0.
WRITE(*,*) is_nan(1/f)
WRITE(*,*) is_nan(f/f)
END PROGRAM is_nanExample
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | val |
Value to analize. It can have any rank and dimension |
True if the variable is NaN. False otherwise. It will have the same rank and dimension as the input value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | val |
Value to analize. It can have any rank and dimension |
True if the variable is NaN. False otherwise. It will have the same rank and dimension as the input value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=qp), | intent(in) | :: | val |
Value to analize. It can have any rank and dimension |
True if the variable is NaN. False otherwise. It will have the same rank and dimension as the input value.