summaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.c
diff options
context:
space:
mode:
authorforeese <foreese@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-11 18:44:05 +0000
committerforeese <foreese@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-11 18:44:05 +0000
commit604360a50fa358e2686a5b011fcf59b97fc13b62 (patch)
treef9e2e3862d33f2698c4248f2939990e024a8a32e /gcc/fortran/iresolve.c
parent7b8ebc39f2db57dcadd8b8f22b6b7561d187c279 (diff)
downloadgcc-604360a50fa358e2686a5b011fcf59b97fc13b62.tar.gz
2016-10-11 Fritz Reese <fritzoreese@gmail.com>
Fix bad commit for -fdec-math. * iresolve.c (get_radians, get_degrees): Fix sloppy commit. * simplify.c (degrees_f, radians_f): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r--gcc/fortran/iresolve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index 4334522c5e6..9ae0b6e2c8e 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -2687,7 +2687,7 @@ get_radians (gfc_expr *deg)
/* Set factor = pi / 180. */
factor = gfc_get_constant_expr (deg->ts.type, deg->ts.kind, &deg->where);
mpfr_const_pi (factor->value.real, GFC_RND_MODE);
- mpfr_div_d (factor->value.real, factor->value.real, 180.0, GFC_RND_MODE);
+ mpfr_div_ui (factor->value.real, factor->value.real, 180, GFC_RND_MODE);
/* Result is rad = (deg % 360) * (pi / 180). */
result = gfc_multiply (result, factor);
@@ -2725,7 +2725,7 @@ get_degrees (gfc_expr *rad)
/* Set factor = 180 / pi. */
factor = gfc_get_constant_expr (rad->ts.type, rad->ts.kind, &rad->where);
- mpfr_set_d (factor->value.real, 180.0, GFC_RND_MODE);
+ mpfr_set_ui (factor->value.real, 180, GFC_RND_MODE);
mpfr_init (tmp);
mpfr_const_pi (tmp, GFC_RND_MODE);
mpfr_div (factor->value.real, factor->value.real, tmp, GFC_RND_MODE);