+2016-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ * simplify.c (radians_f): Fix mpdr_mod.
+ * ireolce.c (get_degrees): Declare tmp.
+
2016-10-11 Fritz Reese <fritzoreese@gmail.com>
* lang.opt: New flag -fdec-math.
static void
radians_f (mpfr_t x, mp_rnd_t rnd_mode)
{
- mpfr_t tmp;
+ mpfr_t tmp, modtmp;
mpfr_init (tmp);
+ mpfr_init (modtmp);
/* Set x = x % 360 to avoid offsets with large angles. */
- mpfr_fmod_d (tmp, x, 360.0, rnd_mode);
+ mpfr_set_d (modtmp, 360.0, GFC_RND_MODE);
+ mpfr_fmod (tmp, x, modtmp, rnd_mode);
/* Set x = x * pi. */
mpfr_const_pi (tmp, rnd_mode);
mpfr_div_d (x, x, 180.0, rnd_mode);
mpfr_clear (tmp);
+ mpfr_clear (modtmp);
}