diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-29 15:58:20 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-29 15:58:20 +0000 |
commit | b17619a04d7d76efbe373f20ce6c598143482a22 (patch) | |
tree | 9a9214a0b0b7510c7bf5329a0be55a09ada5bd0d /libgfortran/io/write.c | |
parent | 227683f6a9fffa96a0bed177acd6fb7835d55854 (diff) | |
download | gcc-b17619a04d7d76efbe373f20ce6c598143482a22.tar.gz |
PR 48488 Fix comments
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r-- | libgfortran/io/write.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index bf02ad8b1aa..40f4112438f 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1456,10 +1456,15 @@ set_fnode_default (st_parameter_dt *dtp, fnode *f, int length) break; } } -/* Output a real number with default format. - This is 1PG14.7E2 for REAL(4), 1PG23.15E3 for REAL(8), - 1PG28.19E4 for REAL(10) and 1PG43.34E4 for REAL(16). */ -// FX -- FIXME: should we change the default format for __float128-real(16)? + +/* Output a real number with default format. This is 1PG16.9E2 for + REAL(4), 1PG25.17E3 for REAL(8), 1PG30.21E4 for REAL(10) and + 1PG45.36E4 for REAL(16). The exception is that the Fortran standard + requires outputting an extra digit when the scale 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 write_real (st_parameter_dt *dtp, const char *source, int length) @@ -1472,6 +1477,8 @@ write_real (st_parameter_dt *dtp, const char *source, int length) dtp->u.p.scale_factor = org_scale; } +/* Similar to list formatted REAL output, for kPG0 where k > 0 we + compensate for the extra digit. */ void write_real_g0 (st_parameter_dt *dtp, const char *source, int length, int d) |