Commit ef6d0b67 by Janne Blomqvist

PR 48488 Fix comments

From-SVN: r173170
parent d785f6a3
...@@ -1457,14 +1457,17 @@ set_fnode_default (st_parameter_dt *dtp, fnode *f, int length) ...@@ -1457,14 +1457,17 @@ set_fnode_default (st_parameter_dt *dtp, fnode *f, int length)
} }
} }
/* Output a real number with default format. This is 1PG16.9E2 for /* Output a real number with default format. To guarantee that a
REAL(4), 1PG25.17E3 for REAL(8), 1PG30.21E4 for REAL(10) and binary -> decimal -> binary rountrip conversion recovers the
1PG45.36E4 for REAL(16). The exception is that the Fortran standard original value, IEEE 754-2008 requires 9, 17, 21 and 36 significant
requires outputting an extra digit when the scale factor is 1 and digits for REAL kinds 4, 8, 10, and 16, respectively. Thus, we use
when the magnitude of the value is such that E editing is 1PG16.9E2 for REAL(4), 1PG25.17E3 for REAL(8), 1PG30.21E4 for
used. However, gfortran compensates for this, and thus for list REAL(10) and 1PG45.36E4 for REAL(16). The exception is that the
formatted the same number of significant digits is generated both Fortran standard requires outputting an extra digit when the scale
when using F and E editing. */ factor is 1 and when the magnitude of the value is such that E
editing is used. However, gfortran compensates for this, and thus
for list formatted the same number of significant digits is
generated both when using F and E editing. */
void void
write_real (st_parameter_dt *dtp, const char *source, int length) write_real (st_parameter_dt *dtp, const char *source, int length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment