diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-12-22 14:53:37 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-12-22 14:53:37 +0000 |
commit | 82192170e3576ba627a8592079ac0bc4b4d465db (patch) | |
tree | 44a5eaa792e12e1c845e8458969741e378060eec /libgfortran | |
parent | 8de5d93ad5109959ef26830a4bc72e9e3f73f717 (diff) | |
download | gcc-82192170e3576ba627a8592079ac0bc4b4d465db.zip gcc-82192170e3576ba627a8592079ac0bc4b4d465db.tar.gz gcc-82192170e3576ba627a8592079ac0bc4b4d465db.tar.bz2 |
re PR fortran/37472 (bad output on default-format write of double in common block with -m64)
2008-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37472
* io/write_float.def (output_float_FMT_G_): Modify calculation of temp
to avoid sensitivity to round-off.
From-SVN: r142884
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/write_float.def | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index f60c5d0..c04331f 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2008-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/37472 + * io/write_float.def (output_float_FMT_G_): Modify calculation of temp + to avoid sensitivity to round-off. + 2008-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/38398 diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def index a5d292c..f94fde3 100644 --- a/libgfortran/io/write_float.def +++ b/libgfortran/io/write_float.def @@ -640,8 +640,8 @@ output_float_FMT_G_ ## x (st_parameter_dt *dtp, const fnode *f, \ GFC_REAL_ ## x temp;\ mid = (low + high) / 2;\ \ - temp = 0.1 * calculate_exp_ ## x (mid) - 0.5\ - * calculate_exp_ ## x (mid - d - 1);\ + temp = (calculate_exp_ ## x (mid) - \ + 5 * calculate_exp_ ## x (mid - d - 1)) / 10;\ \ if (m < temp)\ { \ |