Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28459 Discussions

remark #7960: The floating overflow condition was detected while evaluating this operation; the result is an infinity.

S__MPay
Beginner
872 Views

I need to define a very large constant for the cases that I need infinity; but I noticed this warning:

remark #7960: The floating overflow condition was detected while evaluating this operation; the result is an infinity.

Now I wonder if there is a standard way to define +infinity or -infinity?
 

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
872 Views

use, intrinsic :: IEEE_ARITHMETIC
...
x = IEEE_VALUE(x,IEEE_POSITIVE_INF)

You will want to compile with /fp:strict in order to support exceptional values.

View solution in original post

0 Kudos
1 Reply
Steve_Lionel
Honored Contributor III
873 Views

use, intrinsic :: IEEE_ARITHMETIC
...
x = IEEE_VALUE(x,IEEE_POSITIVE_INF)

You will want to compile with /fp:strict in order to support exceptional values.

0 Kudos
Reply