https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93727
Bug ID: 93727 Summary: Fortran 2018: EX edit descriptor Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: thenlich at gcc dot gnu.org Target Milestone: --- 13.7.2.3.6 EX editing 1 The EX edit descriptor produces an output field in the form of a hexadecimal-significand number. 2 The EXw.d and EXw.dEe edit descriptors indicate that the external field occupies w positions, except when w is zero in which case the processor selects the field width. The fractional part of the field contains d hexadecimal digits, except when d is zero in which case the processor selects the number of hexadecimal digits to be the minimum required so that the output field is equal to the internal value; d shall not be zero if the radix of the internal value is not a power of two. The hexadecimal point, represented by a decimal symbol, appears after the first hexadecimal digit. For the form EXw.d, and for EXw.dE0, the exponent part contains the minimum number of digits needed to represent the exponent; otherwise the exponent contains e digits. The e has no effect on input. The scale factor has no effect on output. 3 The form and interpretation of the input field is the same as for Fw.d editing (13.7.2.3.2). 4 For an internal value that is an IEEE infinity or NaN, the form of the output field is the same as for Fw.d. 5 For an internal value that is neither an IEEE infinity nor a NaN, the form of the output field is [ ± ] 0X x0 . x1x2 . . . exp where: • ± signifies a plus sign or a minus sign; • . signifies a decimal symbol (13.6); • x0x1x2 . . . are the most significant hexadecimal digits of the internal value, after rounding if d is not zero (13.7.2.3.8); • exp is a binary exponent expressed as a decimal integer; for EXw.d and EXw.dE0, the form is P ±z1 . . . zn20 , where n is the minimum number of digits needed to represent exp, and for EXw.dEe with e greater than zero the form is P ±z1 . . . ze22 . The choice of binary exponent is processor dependent. If the most significant binary digits of the internal value are b0b1b2 . . ., the binary exponent might make the value of x0 be that of b0, b0b1, b0b1b2, or b0b1b2b3. A plus sign is produced if the exponent value is zero. Examples: Internal value Edit descriptor Possible output with SS in effect 1.375 EX0.1 0X1.6P+0 −15.625 EX14.4E3 -0X1.F400P+003 1048580.0 EX0.0 0X1.00004P+20 2.375 EX0.1 0X2.6P+0