Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29261 Discussions

Printing double precision variables to a formatted file

Kaveh_G_
Beginner
567 Views
I have a series of extremely small numbers in my simulation of order 5E-101 that I need to write to a file. I have noticed that no matter what format I use, the symbol 'E' is missing from the print out for three digit exponents, e.g., 0.12340554e-101 prints as 0.12340554-101. I have an old version of microsoft powerstation with which I still get the right printout. Is this a bug or do I need to set some flags to correct this? I even tried quad precision and it did not help.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
567 Views
This is required by the Fortran standard when the format has only 2 digits specified in the E format (2 is default). Use a format such as E15.7E3.
0 Kudos
Reply