Is there a way to know if a variable is NaN, +infinity, -infinity?

The intrinsic module ieee_arithmetic contains procedures to do these jobs.

However, note that they may not always work as expected when the compilers are invoked with some “special” options. For example, see the following discussions.

2 Likes