is_exceptional Function

public elemental function is_exceptional(val)

Check whether we are dealing with an exceptional value, NaN or Inf

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: val

Return Value logical


Source Code

elemental function is_exceptional(val)
   real(wp), intent(in) :: val
   logical :: is_exceptional
   is_exceptional = ieee_is_nan(val) .or. abs(val) > huge(val)
end function is_exceptional