- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page