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

REAL*8 output format

gryvon
Beginner
611 Views

I have a very simple question. WRITE(*, '(1D25.16)') produces the screen output as below

0.1000000000000000-123

because the order has 3 digits. Please somebody tell me how tomake it lookcorrectly:

0.1000000000000000D-123

Thanks a lot )

0 Kudos
2 Replies
TimP
Honored Contributor III
611 Views
To make more characters available in the exponent field, append the E modifier, e.g.
E25.17E5
0 Kudos
Steven_L_Intel1
Employee
611 Views
You'll have to use the E edit descriptor (or G) to use the E exponent modifier - this is not available for the D edit descriptor. Don't forget to add to the width. So something like 1PE26.16E3. (16 digits is too much for double precision, probably should be 15, or even 14 with 1P.
0 Kudos
Reply