+2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/92463
+ * arith.c (gfc_mpfr_to_mpz): Change mp_exp_t to mpfr_exp_t.
+ (gfc_check_real_range): Likewise.
+ * gfortran.h (GFC_RND_MODE): Change GMP_RNDN to MPFR_RNDN.
+ * module.c (mio_gmp_real): Change mp_exp_t to mpfr_exp_t.
+ * simplify.c (degrees_f): Change mp_rnd_t to mpfr_rnd_t.
+ (radians_f): Likewise.
+ (fullprec_erfc_scaled): Change mp_prec_t to mpfr_prec_t.
+ (asympt_erfc_scaled): Likewise.
+ (gfc_simplify_nearest): Change mp_exp_t to mpfr_exp_t, and
+ GMP_RND* to MPFR_RND*.
+
2019-11-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69654
void
gfc_mpfr_to_mpz (mpz_t z, mpfr_t x, locus *where)
{
- mp_exp_t e;
+ mpfr_exp_t e;
if (mpfr_inf_p (x) || mpfr_nan_p (x))
{
}
else if (mpfr_cmp (q, gfc_real_kinds[i].tiny) < 0)
{
- mp_exp_t emin, emax;
+ mpfr_exp_t emin, emax;
int en;
/* Save current values of emin and emax. */
/* Copy sign if needed. */
if (mpfr_sgn (p) < 0)
- mpfr_neg (p, q, GMP_RNDN);
+ mpfr_neg (p, q, MPFR_RNDN);
else
- mpfr_set (p, q, GMP_RNDN);
+ mpfr_set (p, q, MPFR_RNDN);
}
mpfr_clear (q);
/* Convert a floating-point number from radians to degrees. */
static void
-degrees_f (mpfr_t x, mp_rnd_t rnd_mode)
+degrees_f (mpfr_t x, mpfr_rnd_t rnd_mode)
{
mpfr_t tmp;
mpfr_init (tmp);
/* Convert a floating-point number from degrees to radians. */
static void
-radians_f (mpfr_t x, mp_rnd_t rnd_mode)
+radians_f (mpfr_t x, mpfr_rnd_t rnd_mode)
{
mpfr_t tmp;
mpfr_init (tmp);
static void
fullprec_erfc_scaled (mpfr_t res, mpfr_t arg)
{
- mp_prec_t prec;
+ mpfr_prec_t prec;
mpfr_t a, b;
prec = mpfr_get_default_prec ();
{
mpfr_t sum, x, u, v, w, oldsum, sumtrunc;
mpz_t num;
- mp_prec_t prec;
+ mpfr_prec_t prec;
unsigned i;
prec = mpfr_get_default_prec ();
gfc_simplify_nearest (gfc_expr *x, gfc_expr *s)
{
gfc_expr *result;
- mp_exp_t emin, emax;
+ mpfr_exp_t emin, emax;
int kind;
if (x->expr_type != EXPR_CONSTANT || s->expr_type != EXPR_CONSTANT)
/* Set emin and emax for the current model number. */
kind = gfc_validate_kind (BT_REAL, x->ts.kind, 0);
- mpfr_set_emin ((mp_exp_t) gfc_real_kinds[kind].min_exponent -
+ mpfr_set_emin ((mpfr_exp_t) gfc_real_kinds[kind].min_exponent -
mpfr_get_prec(result->value.real) + 1);
- mpfr_set_emax ((mp_exp_t) gfc_real_kinds[kind].max_exponent - 1);
- mpfr_check_range (result->value.real, 0, GMP_RNDU);
+ mpfr_set_emax ((mpfr_exp_t) gfc_real_kinds[kind].max_exponent - 1);
+ mpfr_check_range (result->value.real, 0, MPFR_RNDU);
if (mpfr_sgn (s->value.real) > 0)
{
mpfr_nextabove (result->value.real);
- mpfr_subnormalize (result->value.real, 0, GMP_RNDU);
+ mpfr_subnormalize (result->value.real, 0, MPFR_RNDU);
}
else
{
mpfr_nextbelow (result->value.real);
- mpfr_subnormalize (result->value.real, 0, GMP_RNDD);
+ mpfr_subnormalize (result->value.real, 0, MPFR_RNDD);
}
mpfr_set_emin (emin);