summaryrefslogtreecommitdiff
path: root/round_prec.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-04 13:15:26 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-04 13:15:26 +0000
commitabfa7f839fabfe6a797057128abff86d598076d9 (patch)
tree478f997f6445673a3f535f08caf32f9e7075ea33 /round_prec.c
parent342b90d25ebeab276e971826f3a1c8ffbb8f98a6 (diff)
downloadmpfr-abfa7f839fabfe6a797057128abff86d598076d9.tar.gz
+ Remove MPFR_CLEAR_NAN and MPFR_CLEAR_INF. Only use MPFR_CLEAR_FLAGS.
MPFR_SET_INF, MPFR_SET_ZERO and MPFR_SET_ZERO must clear the flags before setting them. + Add a new test in tacosh.c : check Inf / Nan flags. + Use MPFR_IS_SINGULAR in all the remaining files. + Fix the use of MPFR_CLEAR_FLAGS. + mpfr-impl.h auto include gmp.h, gmp-impl.h, mpfr.h and limits.h. + Rename _PROTO to _MPFR_PROTO, and remove _GMP_PROTO. + Add MPFR_INT_SIGN macro. + Encapsulate a few more the sign. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2529 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'round_prec.c')
-rw-r--r--round_prec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/round_prec.c b/round_prec.c
index 9abe0f9c0..42376ac26 100644
--- a/round_prec.c
+++ b/round_prec.c
@@ -25,10 +25,6 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-#if (BITS_PER_MP_LIMB & (BITS_PER_MP_LIMB - 1))
-#error "BITS_PER_MP_LIMB must be a power of 2"
-#endif
-
/*
* If flag = 0, puts in y the value of xp (with precision xprec and
* sign 1 if negative=0, -1 otherwise) rounded to precision yprec and
@@ -172,7 +168,7 @@ mpfr_prec_round (mpfr_ptr x, mp_prec_t prec, mp_rnd_t rnd_mode)
/* Realloc mantissa */
mp_ptr tmp = (mp_ptr) (*__gmp_reallocate_func)
(MPFR_GET_REAL_PTR(x), MPFR_ALLOC_SIZE(ow), MPFR_ALLOC_SIZE(nw));
- MPFR_SET_MANT_PTR(x, tmp);
+ MPFR_SET_MANT_PTR(x, tmp); /* mant pre must be set before alloc size */
MPFR_SET_ALLOC_SIZE(x, nw); /* new number of allocated limbs */
}