J3/06-125 To: J3 From: Michael Ingrassia Subject: Value of decimal exponent for a real zero value Date: 2006 January 30 NUMBER: F03/0079 TITLE: Value of decimal exponent for a real zero value KEYWORDS: Data edit descriptors, Numeric editing, decimal exponent, zero value DEFECT TYPE: CLARIFICATION/ERRATUM STATUS: J3 consideration in progress QUESTION: In formatted output, what is the value of the decimal exponent produced for a real zero value under the D, E, EN, ES, and G edit descriptors? SUGGESTED ANSWER: In such a case, the decimal exponent should have the value zero whether or not a nonzero scale factor is in effect. Edits are supplied to make this clear. DISCUSSION: The Fortran 2003 standard does not specify what the value of the decimal exponent of a real zero value should be under formatted output. Every implementation of which Sun is aware uses the value zero for the decimal exponent unless a nonzero scale factor is in effect. As a member of the committee has pointed out, different implementations format real zeros differently under nonzero scale factors. The C and C++ standards both explicitly state that the value of the decimal exponent produced for the real value zero under a format that includes an exponent is zero. The Fortran standard should also. EDITS: [227:16+] Add: (7) On output of a real zero value, the digits in the exponent field shall all be zero, whether or not a nonzero scale factor is in effect. SUBMITTED BY: Michael Ingrassia HISTORY: J3/06-125 submitted to J3 meeting 175