diff options
-rw-r--r-- | add.c | 1 | ||||
-rw-r--r-- | agm.c | 1 | ||||
-rw-r--r-- | div.c | 1 | ||||
-rw-r--r-- | div_ui.c | 2 | ||||
-rw-r--r-- | exceptions.c | 1 | ||||
-rw-r--r-- | exp.c | 2 | ||||
-rw-r--r-- | frac.c | 2 | ||||
-rw-r--r-- | hypot.c | 1 | ||||
-rw-r--r-- | inp_str.c | 1 | ||||
-rw-r--r-- | mpfr-impl.h | 2 | ||||
-rw-r--r-- | mul.c | 2 | ||||
-rw-r--r-- | next.c | 1 | ||||
-rw-r--r-- | pow_si.c | 1 | ||||
-rw-r--r-- | rec_sqrt.c | 1 | ||||
-rw-r--r-- | set_d.c | 2 | ||||
-rw-r--r-- | set_f.c | 3 | ||||
-rw-r--r-- | set_si_2exp.c | 1 | ||||
-rw-r--r-- | set_ui_2exp.c | 1 | ||||
-rw-r--r-- | sqr.c | 1 | ||||
-rw-r--r-- | sqrt.c | 1 | ||||
-rw-r--r-- | sub.c | 1 | ||||
-rw-r--r-- | tests/random2.c | 2 | ||||
-rw-r--r-- | tests/tadd.c | 1 | ||||
-rw-r--r-- | tests/tdiv.c | 4 | ||||
-rw-r--r-- | tests/tsqrt.c | 3 | ||||
-rw-r--r-- | tests/tui_div.c | 2 | ||||
-rw-r--r-- | urandomb.c | 2 |
27 files changed, 0 insertions, 43 deletions
@@ -81,7 +81,6 @@ mpfr_add (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) } MPFR_ASSERTD(MPFR_IS_PURE_FP(b) && MPFR_IS_PURE_FP(c)); - MPFR_CLEAR_FLAGS(a); /* clear flags */ if (MPFR_UNLIKELY(MPFR_SIGN(b) != MPFR_SIGN(c))) { /* signs differ, it's a subtraction */ @@ -74,7 +74,6 @@ mpfr_agm (mpfr_ptr r, mpfr_srcptr op2, mpfr_srcptr op1, mp_rnd_t rnd_mode) MPFR_RET (0); /* exact */ } } - MPFR_CLEAR_FLAGS (r); /* If a or b is negative (excluding -Infinity), the result is NaN */ if (MPFR_UNLIKELY(MPFR_IS_NEG(op1) || MPFR_IS_NEG(op2))) @@ -213,7 +213,6 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode) MPFR_RET (0); } } - MPFR_CLEAR_FLAGS (q); /************************************************************************** * * @@ -79,8 +79,6 @@ mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode) else if (MPFR_UNLIKELY (IS_POW2 (u))) return mpfr_div_2si (y, x, MPFR_INT_CEIL_LOG2 (u), rnd_mode); - MPFR_CLEAR_FLAGS (y); - MPFR_SET_SAME_SIGN (y, x); MPFR_TMP_MARK (marker); diff --git a/exceptions.c b/exceptions.c index a98ca3c29..2fd8f6406 100644 --- a/exceptions.c +++ b/exceptions.c @@ -317,7 +317,6 @@ mpfr_overflow (mpfr_ptr x, mp_rnd_t rnd_mode, int sign) int inex; MPFR_ASSERT_SIGN(sign); - MPFR_CLEAR_FLAGS(x); if (MPFR_IS_LIKE_RNDZ(rnd_mode, sign < 0)) { mpfr_setmax (x, __gmpfr_emax); @@ -101,8 +101,6 @@ mpfr_exp (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) MPFR_SAVE_EXPO_FREE (expo); } - MPFR_CLEAR_FLAGS (y); - expx = MPFR_GET_EXP (x); precy = MPFR_PREC (y); @@ -46,7 +46,6 @@ mpfr_frac (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode) } else if (MPFR_UNLIKELY(MPFR_IS_INF(u) || mpfr_integer_p (u))) { - MPFR_CLEAR_FLAGS(r); MPFR_SET_SAME_SIGN(r, u); MPFR_SET_ZERO(r); MPFR_RET(0); /* zero is exact */ @@ -97,7 +96,6 @@ mpfr_frac (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode) /* t has enough precision to contain the fractional part of u */ /* If we use a temporary variable, we take the non-significant bits of u into account, because of the mpn_lshift below. */ - MPFR_CLEAR_FLAGS(t); MPFR_SET_SAME_SIGN(t, u); MPFR_SET_EXP (t, re); @@ -61,7 +61,6 @@ mpfr_hypot (mpfr_ptr z, mpfr_srcptr x, mpfr_srcptr y, mp_rnd_t rnd_mode) else /* y is necessarily 0 */ return mpfr_abs (z, x, rnd_mode); } - MPFR_CLEAR_FLAGS(z); if (mpfr_cmpabs (x, y) < 0) { @@ -35,7 +35,6 @@ mpfr_inp_str (mpfr_ptr rop, FILE *stream, int base, mp_rnd_t rnd_mode) int retval; size_t nread; - MPFR_CLEAR_FLAGS(rop); if (stream == NULL) stream = stdin; diff --git a/mpfr-impl.h b/mpfr-impl.h index b3832e436..03403c543 100644 --- a/mpfr-impl.h +++ b/mpfr-impl.h @@ -648,8 +648,6 @@ typedef intmax_t mpfr_eexp_t; # define MPFR_EXP_NAN (MPFR_EXP_MIN+2) # define MPFR_EXP_INF (MPFR_EXP_MIN+3) -#define MPFR_CLEAR_FLAGS(x) - #define MPFR_IS_NAN(x) (MPFR_EXP(x) == MPFR_EXP_NAN) #define MPFR_SET_NAN(x) (MPFR_EXP(x) = MPFR_EXP_NAN) #define MPFR_IS_INF(x) (MPFR_EXP(x) == MPFR_EXP_INF) @@ -89,7 +89,6 @@ mpfr_mul3 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) MPFR_RET(0); /* 0 * 0 is exact */ } } - MPFR_CLEAR_FLAGS(a); sign_product = MPFR_MULT_SIGN( MPFR_SIGN(b) , MPFR_SIGN(c) ); ax = MPFR_GET_EXP (b) + MPFR_GET_EXP (c); @@ -262,7 +261,6 @@ mpfr_mul (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) MPFR_RET (0); } } - MPFR_CLEAR_FLAGS (a); sign = MPFR_MULT_SIGN (MPFR_SIGN (b), MPFR_SIGN (c)); ax = MPFR_GET_EXP (b) + MPFR_GET_EXP (c); @@ -28,7 +28,6 @@ mpfr_nexttozero (mpfr_ptr x) { if (MPFR_UNLIKELY(MPFR_IS_INF(x))) { - MPFR_CLEAR_FLAGS(x); mpfr_setmax (x, __gmpfr_emax); return; } @@ -65,7 +65,6 @@ mpfr_pow_si (mpfr_ptr y, mpfr_srcptr x, long int n, mp_rnd_t rnd) MPFR_RET(0); } } - MPFR_CLEAR_FLAGS (y); /* detect exact powers: x^(-n) is exact iff x is a power of 2 */ if (mpfr_cmp_si_2exp (x, MPFR_SIGN(x), MPFR_EXP(x) - 1) == 0) diff --git a/rec_sqrt.c b/rec_sqrt.c index 3dc6c5f3b..130f5d63c 100644 --- a/rec_sqrt.c +++ b/rec_sqrt.c @@ -466,7 +466,6 @@ mpfr_rec_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode) MPFR_RET_NAN; } - MPFR_CLEAR_FLAGS(r); MPFR_SET_POS(r); rp = MPFR_PREC(r); /* output precision */ @@ -149,8 +149,6 @@ mpfr_set_d (mpfr_ptr r, double d, mp_rnd_t rnd_mode) mp_limb_t tmpmant[MPFR_LIMBS_PER_DOUBLE]; MPFR_SAVE_EXPO_DECL (expo); - MPFR_CLEAR_FLAGS(r); - if (MPFR_UNLIKELY(DOUBLE_ISNAN(d))) { MPFR_SET_NAN(r); @@ -35,7 +35,6 @@ mpfr_set_f (mpfr_ptr y, mpf_srcptr x, mp_rnd_t rnd_mode) if (sx == 0) /* x is zero */ { - MPFR_CLEAR_FLAGS (y); MPFR_SET_ZERO(y); MPFR_SET_POS(y); return 0; /* 0 is exact */ @@ -44,8 +43,6 @@ mpfr_set_f (mpfr_ptr y, mpf_srcptr x, mp_rnd_t rnd_mode) if (SIZ(x) * MPFR_FROM_SIGN_TO_INT(MPFR_SIGN(y)) < 0) MPFR_CHANGE_SIGN (y); - MPFR_CLEAR_FLAGS (y); - sy = 1 + (MPFR_PREC(y) - 1) / BITS_PER_MP_LIMB; my = MPFR_MANT(y); mx = PTR(x); diff --git a/set_si_2exp.c b/set_si_2exp.c index 0a083bea3..acfc48655 100644 --- a/set_si_2exp.c +++ b/set_si_2exp.c @@ -67,7 +67,6 @@ mpfr_set_si_2exp (mpfr_ptr x, long i, mp_exp_t e, mp_rnd_t rnd_mode) xp[xn] = MPFR_LIMB_HIGHBIT; } - MPFR_CLEAR_FLAGS (x); MPFR_EXP (x) = e; return mpfr_check_range (x, inex, rnd_mode); } diff --git a/set_ui_2exp.c b/set_ui_2exp.c index b3da70d3b..4bec85423 100644 --- a/set_ui_2exp.c +++ b/set_ui_2exp.c @@ -66,7 +66,6 @@ mpfr_set_ui_2exp (mpfr_ptr x, unsigned long i, mp_exp_t e, mp_rnd_t rnd_mode) xp[xn] = MPFR_LIMB_HIGHBIT; } - MPFR_CLEAR_FLAGS (x); MPFR_EXP (x) = e; return mpfr_check_range (x, inex, rnd_mode); } @@ -51,7 +51,6 @@ mpfr_sqr (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode) ( MPFR_ASSERTD(MPFR_IS_ZERO(b)), MPFR_SET_ZERO(a) ); MPFR_RET(0); } - MPFR_CLEAR_FLAGS(a); ax = 2 * MPFR_GET_EXP (b); bq = MPFR_PREC(b); @@ -80,7 +80,6 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode) MPFR_SET_NAN(r); MPFR_RET_NAN; } - MPFR_CLEAR_FLAGS(r); MPFR_SET_POS(r); rsize = MPFR_LIMB_SIZE(r); /* number of limbs of r */ @@ -75,7 +75,6 @@ mpfr_sub (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) return mpfr_set (a, b, rnd_mode); } } - MPFR_CLEAR_FLAGS (a); MPFR_ASSERTD (MPFR_IS_PURE_FP (b) && MPFR_IS_PURE_FP (c)); if (MPFR_LIKELY (MPFR_SIGN (b) == MPFR_SIGN (c))) diff --git a/tests/random2.c b/tests/random2.c index 2815ad5b3..2426ae463 100644 --- a/tests/random2.c +++ b/tests/random2.c @@ -40,8 +40,6 @@ mpfr_random2 (mpfr_ptr x, mp_size_t size, mp_exp_t exp, mp_limb_t elimb, ran, acc; int ran_nbits, bit_pos, nb; - MPFR_CLEAR_FLAGS (x); - if (MPFR_UNLIKELY(size == 0)) { MPFR_SET_ZERO (x); diff --git a/tests/tadd.c b/tests/tadd.c index 306f20aa4..9523b0695 100644 --- a/tests/tadd.c +++ b/tests/tadd.c @@ -50,7 +50,6 @@ test_add (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) res = mpfr_add (a, b, c, rnd_mode); else { - MPFR_CLEAR_FLAGS(a); /* clear flags */ if (MPFR_GET_EXP(b) < MPFR_GET_EXP(c)) res = mpfr_add1(a, c, b, rnd_mode); else diff --git a/tests/tdiv.c b/tests/tdiv.c index 5d201345d..9bfd1e440 100644 --- a/tests/tdiv.c +++ b/tests/tdiv.c @@ -650,7 +650,6 @@ check_nan (void) MPFR_ASSERTN (mpfr_nan_p (q)); /* +inf/1 == +inf */ - MPFR_CLEAR_FLAGS (a); MPFR_SET_INF (a); MPFR_SET_POS (a); mpfr_set_ui (d, 1L, MPFR_RNDN); @@ -660,7 +659,6 @@ check_nan (void) /* 1/+inf == 0 */ mpfr_set_ui (a, 1L, MPFR_RNDN); - MPFR_CLEAR_FLAGS (d); MPFR_SET_INF (d); MPFR_SET_POS (d); MPFR_ASSERTN (test_div (q, a, d, MPFR_RNDZ) == 0); /* exact */ @@ -674,10 +672,8 @@ check_nan (void) MPFR_ASSERTN (mpfr_nan_p (q)); /* +inf/+inf == nan */ - MPFR_CLEAR_FLAGS (a); MPFR_SET_INF (a); MPFR_SET_POS (a); - MPFR_CLEAR_FLAGS (d); MPFR_SET_INF (d); MPFR_SET_POS (d); MPFR_ASSERTN (test_div (q, a, d, MPFR_RNDZ) == 0); /* exact */ diff --git a/tests/tsqrt.c b/tests/tsqrt.c index fccfac057..3c0823b19 100644 --- a/tests/tsqrt.c +++ b/tests/tsqrt.c @@ -464,7 +464,6 @@ check_nan (void) mpfr_init2 (got, 100L); /* sqrt(NaN) == NaN */ - MPFR_CLEAR_FLAGS (x); MPFR_SET_NAN (x); MPFR_ASSERTN (test_sqrt (got, x, MPFR_RNDZ) == 0); /* exact */ MPFR_ASSERTN (mpfr_nan_p (got)); @@ -475,14 +474,12 @@ check_nan (void) MPFR_ASSERTN (mpfr_nan_p (got)); /* sqrt(+inf) == +inf */ - MPFR_CLEAR_FLAGS (x); MPFR_SET_INF (x); MPFR_SET_POS (x); MPFR_ASSERTN (test_sqrt (got, x, MPFR_RNDZ) == 0); /* exact */ MPFR_ASSERTN (mpfr_inf_p (got)); /* sqrt(-inf) == NaN */ - MPFR_CLEAR_FLAGS (x); MPFR_SET_INF (x); MPFR_SET_NEG (x); MPFR_ASSERTN (test_sqrt (got, x, MPFR_RNDZ) == 0); /* exact */ diff --git a/tests/tui_div.c b/tests/tui_div.c index ec5acdcfd..30f1ac31b 100644 --- a/tests/tui_div.c +++ b/tests/tui_div.c @@ -110,7 +110,6 @@ check_nan (void) mpfr_init2 (q, 100L); /* 1/+inf == 0 */ - MPFR_CLEAR_FLAGS (d); MPFR_SET_INF (d); MPFR_SET_POS (d); MPFR_ASSERTN (mpfr_ui_div (q, 1L, d, MPFR_RNDZ) == 0); /* exact */ @@ -118,7 +117,6 @@ check_nan (void) MPFR_ASSERTN (mpfr_sgn (q) == 0); /* 1/-inf == -0 */ - MPFR_CLEAR_FLAGS (d); MPFR_SET_INF (d); MPFR_SET_NEG (d); MPFR_ASSERTN (mpfr_ui_div (q, 1L, d, MPFR_RNDZ) == 0); /* exact */ diff --git a/urandomb.c b/urandomb.c index ed6dd95db..89d889197 100644 --- a/urandomb.c +++ b/urandomb.c @@ -48,8 +48,6 @@ mpfr_urandomb (mpfr_ptr rop, gmp_randstate_t rstate) mp_exp_t exp; int cnt; - MPFR_CLEAR_FLAGS (rop); - rp = MPFR_MANT (rop); nbits = MPFR_PREC (rop); nlimbs = MPFR_LIMB_SIZE (rop); |