Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

How to check NaN

ekeom
Novice
1,238 Views
Dear all,

How can I check if a variable contain NaN (Not a number). I would like to write something like :

if(a.eq.NaN) then

Do something special

endif

Best regards,

Didace
0 Kudos
1 Reply
TimP
Honored Contributor III
1,238 Views
This has been discussed at more length previously on these forums. Current ifort supports both the legacy (non-standard) ISNAN() function and the standard ieee_is_nan().
0 Kudos
Reply