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
This commit is contained in:
Jerry DeLisle 2008-12-22 14:53:37 +00:00
parent 8de5d93ad5
commit 82192170e3
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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)\
{ \