diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-22 14:53:37 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-22 14:53:37 +0000 |
commit | c15a4712b1def0b4a364b3e263c6801e951fb12f (patch) | |
tree | 44a5eaa792e12e1c845e8458969741e378060eec /libgfortran | |
parent | 401ced1431e19b5427fbec0e70754d3431d71e93 (diff) | |
download | ppe42-gcc-c15a4712b1def0b4a364b3e263c6801e951fb12f.tar.gz ppe42-gcc-c15a4712b1def0b4a364b3e263c6801e951fb12f.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142884 138bc75d-0d04-0410-961f-82ee72b054a4
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 f60c5d0e8de..c04331f60fe 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 a5d292ca76c..f94fde30b70 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)\ { \ |