判断变量是否为NAN isnan(x)是判断x是否是NaN的函数,返回ture、false。 举例:设a是原始数据 if ( isnan(a) ) then write(*,*) 'a is NaN' end if