When I use pgi compilation I always say that isnan does not declare, is there a function that does function of isnan
Hi yaoshunyu,
Given “isnan” is not standard, I would suggest you use the Fortran “ieee_is_nan” intrinsic from “ieee_arithmetic”. For example:
% cat isnan.f90
program test
use, intrinsic :: IEEE_ARITHMETIC
real :: X = -1.0
print *, ieee_is_nan(sqrt(X))
end program test
% pgfortran isnan.f90 ; a.out
T
Hope this helps,
Mat
thx,it’s work