- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
looking inside old threads if have found many comments on how to produce a NaN using sqrt().
I have a question about what should happen based on fortran standard with
sqrt(NaN)
In CVF 6.6 it is an error. In IVF 10.1.026 it is no error.
Thanks in advance.
Frank
looking inside old threads if have found many comments on how to produce a NaN using sqrt().
I have a question about what should happen based on fortran standard with
sqrt(NaN)
In CVF 6.6 it is an error. In IVF 10.1.026 it is no error.
Thanks in advance.
Frank
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran standard does not define the result. With IVF, I would expect that you get a NaN result. A run-time error might occur if you used /fpe:0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
The Fortran standard does not define the result. With IVF, I would expect that you get a NaN result. A run-time error might occur if you used /fpe:0.
Hello,
to be honest, I was afraid to get this kind of answer. In the last weeks and months i had to read quite often a reply like: you have to set this /xxx: yyyy.
For me sending a NaN into a call like sqrt has to produce an error in the standard configuration of IVF. Sending in an NaN and getting back a NaN is not normal behavior.
May be I have lost contact to modern programming.
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The normal behavior for operations on NaNs in IEE floating point is to result in a NaN.

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