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

For the E edit descriptor, the value of d (the number of places after the decimal point) plus e (the number of digits in the exponent) must not exceed the value of w (the field width).

For the D edit descriptor, the value of d must not exceed the value of w.

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.

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.

The w should be greater than or equal to d+7 to allow for the following:

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 the exponent value is too large to be converted into one of these forms, an error occurs.

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

Note iconNote

The w 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.

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            *********

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.