Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
25 Views

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

Jump to solution

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

Accepted Solutions
Highlighted
Black Belt Retired Employee
25 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
Highlighted
Black Belt Retired Employee
26 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