Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

E and D Editing

The E and D data edit descriptors transfer real values in exponential form. They take the following form:

Ew.d[Ee]

Dw.d

where w is the total field width, d is the number of places after the decimal point, and e is the number of digits in the exponent.

For the E edit descriptor, if w is zero, the processor selects the field width. If e is zero, the exponent part contains the minimum number of digits needed to represent the value of the exponent.

For the D edit descriptor, if the value of w is zero, the processor selects the field width.

The specified I/O list item must be of type real, or it must be the real or imaginary part of a complex type.

Rules for Input Processing

On input, the E and D data edit descriptors transfer w characters from an external field and assigns their real value to the corresponding I/O list item. The E and D descriptors interpret and assign input data in the same way as the F data edit descriptor. On input, w cannot be zero. The e, if present, has no effect on input.

The following shows input using the E and D edit descriptors (the symbol ^ represents a nonprinting blank character):

Format        Input             Value
E9.3          734.432E3           734432.0
E12.4         ^^1022.43E            1022.43E-6
E15.3         52.3759663^^^^^         52.3759663
E12.5         210.5271D+10        210.5271E10
BZ,D10.2      12345^^^^^        12345000.0D0
D10.2         ^^123.45^^             123.45D0
D15.3         367.4981763D+04          3.674981763D+06

If the I/O list item is single-precision real, the E edit descriptor treats the D exponent indicator as an E indicator.

Rules for Output Processing

On output, the E and D data edit descriptors transfer the real value of the corresponding I/O list item, right-justified and rounded to d decimal positions, to an external field that is w characters long.

If w is greater than zero, it should be greater than or equal to d+7 to allow for the following:

  • A sign (optional if the value is positive and descriptor SP is not in effect)

  • An optional zero to the left of the decimal point

  • The decimal point

  • The d digits to the right of the decimal point

  • The exponent

The exponent takes one of the following forms:

Edit Descriptor

Absolute Value of Exponent

Positive Form of Exponent

Negative Form of Exponent

Ew.d

|exp| 99

E+nn

E-nn

 

99 < |exp| 999

+nnn

-nnn

Ew.dEe

|exp| 10e - 1

E+n1n2...ne

E-n1n2...ne

Dw.d

|exp| 99

D+nn or E+nn

D-nn or E-nn

 

99 < |exp| 999

+nnn

-nnn

If an exponent exceeds its specified or implied width, or the number of characters produced exceeds the field width, the entire field of width w is filled with asterisks.

The exponent field width (e) is optional for the E edit descriptor; if omitted, the default value is 2. If e is specified, w should be greater than or equal to d+e+5, or zero.

NOTE:

If w is greater than zero, it can be as small as d + 5 or d + e + 3, if the optional fields for the sign and the zero are omitted.

For an internal value that is an IEEE infinity or an IEEE NaN, the form of the output field is the same as for Fw.d.

A negative value that is not zero but rounds to zero on output is displayed with a leading minus sign. For example, the value -0.01 in "-5P,E20.5" format will be displayed as -0.00 rather than as 0.00. The setting of compiler option assume [no]std_minus0_rounding can affect this behavior.

The following shows output using the E and D edit descriptors (the symbol ^ represents a nonprinting blank character):

Format       Value               Output
E11.2        475867.222            ^^^0.48E+06
E11.5        475867.222               0.47587E+06
E12.3             0.00069           ^^^0.690E
E10.3            -0.5555              -0.556E+00
E5.3             56.12               *****
E14.5E4          -1.001              -0.10010E+0001
E13.3E6           0.000123            0.123E-000003
D14.3             0.0363         ^^^^^0.363D-01
D23.12         5413.87625793     ^^^^^0.541387625793D+04
D9.6              1.2            *********