- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
is there a way to test if an array contains a nan or inf value without explicitely looping over all its elements? Will an isnan(maxval(diff)) or isnan(minval(diff)) do the trick?
All fortran books i have available here do not mention the isnan function at all instead they use ieee_is_nan . Is isnan a nonstandard extension?
What do I use in order to test for +/-inf
is there a way to test if an array contains a nan or inf value without explicitely looping over all its elements? Will an isnan(maxval(diff)) or isnan(minval(diff)) do the trick?
All fortran books i have available here do not mention the isnan function at all instead they use ieee_is_nan . Is isnan a nonstandard extension?
What do I use in order to test for +/-inf
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
isnan is an extension. Not until F2003 is there a standard spelling for this function.
There is inconsistency among implementations about what is done with max and min when one of the values is an "exceptional value". I would not depend on it.
Intel Fortran also supports an FP_CLASS intrinsic, again an extension, which can be used to test for all kinds of IEEE exceptional values.
There is inconsistency among implementations about what is done with max and min when one of the values is an "exceptional value". I would not depend on it.
Intel Fortran also supports an FP_CLASS intrinsic, again an extension, which can be used to test for all kinds of IEEE 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