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

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

S__MPay
Beginner
291 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
Black Belt Retired Employee
291 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

1 Reply
Steve_Lionel
Black Belt Retired Employee
292 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.

Reply