+2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ * arith.c: Change conditional test for inclusion of arctangent().
+ (gfc_check_real_range): Change conditional test for use of
+ mpfr_subnormalize.
+ * simplify.c (gfc_simplify_atan2): Fix conditional for use of
+ mpfr_atan2() instead of arctangent().
+ (gfc_simplify_exponent): Fix conditional for use of mpfr_get_exp().
+ (gfc_simplify_log): Fix conditional for use of mpfr_atan2() instead
+ of arctangent().
+ (gfc_simplify_nearest): Fix conditional for use of mpfr_nextafter().
+
2006-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
* arith.c: Conditionally include arctangent2().
mpfr_set_default_prec (mpfr_get_prec (x));
}
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
/* Calculate atan2 (y, x)
atan2(y, x) = atan(y/x) if x > 0,
}
else if (mpfr_cmp (q, gfc_real_kinds[i].tiny) < 0)
{
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
/* MPFR operates on a number with a given precision and enormous
exponential range. To represent subnormal numbers, the exponent is
allowed to become smaller than emin, but always retains the full
return &gfc_bad_expr;
}
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
arctangent2 (y->value.real, x->value.real, result->value.real);
#else
mpfr_atan2 (result->value.real, y->value.real, x->value.real, GFC_RND_MODE);
int i;
gfc_expr *result;
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
mpfr_t tmp;
#endif
return result;
}
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
/* PR fortran/28276 suffers from a buggy MPFR, and this block of code
does not function correctly. */
mpfr_init (tmp);
mpfr_init (xr);
mpfr_init (xi);
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
arctangent2 (x->value.complex.i, x->value.complex.r, result->value.complex.i);
#else
mpfr_atan2 (result->value.complex.i, x->value.complex.i, x->value.complex.r,
gfc_expr *result;
mpfr_t tmp;
int sgn;
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
int direction;
#else
mp_exp_t emin, emax;
gfc_set_model_kind (x->ts.kind);
result = gfc_copy_expr (x);
-#if !defined(MPFR_VERSION_MAJOR)
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
direction = mpfr_sgn (s->value.real);
sgn = mpfr_sgn (x->value.real);