From 1947e97d4e230cdfe03ea515cf8db95494e43285 Mon Sep 17 00:00:00 2001 From: pelissip Date: Wed, 29 Sep 2004 12:28:17 +0000 Subject: Improve assertion. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3008 280ebfd0-de03-0410-8827-d642c229c3f4 --- get_z.c | 1 + strtofr.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/get_z.c b/get_z.c index 7ab05c2a0..f53cbaef5 100644 --- a/get_z.c +++ b/get_z.c @@ -29,6 +29,7 @@ mpfr_get_z (mpz_ptr z, mpfr_srcptr f, mp_rnd_t rnd) mp_exp_t exp = MPFR_EXP(f); /* if exp <= 0, then |f|<1, thus |o(f)|<=1 */ + MPFR_ASSERTD (MPFR_PREC_MIN == 2); mpfr_init2 (r, (exp <= 0) ? MPFR_PREC_MIN : exp + 1); mpfr_rint (r, f, rnd); MPFR_ASSERTN (MPFR_IS_FP (r) ); diff --git a/strtofr.c b/strtofr.c index 3210aad17..01d77ec63 100644 --- a/strtofr.c +++ b/strtofr.c @@ -439,8 +439,8 @@ parsed_string_to_mpfr (mpfr_t x, struct parsed_string *pstr, mp_rnd_t rnd) if (pstr_size >= pstr->prec) pstr_size = pstr->prec; - MPFR_ASSERTD (pstr_size == (mp_exp_t) pstr_size); - + MPFR_ASSERTD ((mp_exp_t) pstr_size == (mp_exp_t) pstr_size); + /* convert str into binary */ real_ysize = mpn_set_str (y, pstr->mant, pstr_size, pstr->base); MPFR_ASSERTD ( real_ysize <= ysize+1); -- cgit v1.2.1