- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First post on the forum, so apologies if I'm breaching any conventions.
Formatted output of very small negative numbers often displays as negative zero. For example, if I use F11.5 to output -tiny(1.0D0) I will get -0.00000 but in this case I want 0.00000 (i.e. I don't want the negative sign if it rounds to zero at the displayed precision).
gfortran has the -fno-sign-zero compiler option which seems to do what I want. Does the Intel compiler have anything similar? Obviously I could trap this in the code using something like IF(ABS(x)<eps) x=ABS(x), but I don't want to have to do this wherever I think it might be an issue. And I don't necessarily want to change the value, just how it is displayed, so then I'd need another variable and it gets messy.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome!
Our equivalent is:
-assume nostd_minus0_rounding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve, I'll give it a try.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page