summaryrefslogtreecommitdiff
path: root/get_str.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-17 14:43:54 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-17 14:43:54 +0000
commitc59abbe962268a65eda822b85787802fdc45f812 (patch)
tree5a393b247bfd44273614562939c24b958177f554 /get_str.c
parentf3ec3c948ac523a73c8bae0e85592c87bc627a41 (diff)
downloadmpfr-c59abbe962268a65eda822b85787802fdc45f812.tar.gz
* Optimize a few div.c and mul.c.
* Reorder the tests. * Remove mpfr_round_raw_generic and create 4 new functions which replace it, for efficiency reasons. * Add round_raw_generic.c which is the generic file to create the 4 new functions. * Add new MACRO: MPFR_RNDUTEST_OR_RNDDNOTTEST which is a faster way to check if (rnd_mode==GMP_RNDU && test) || (rnd_mode==GMP_RNDD && !test). * Add new MACRO: MPFR_UNSIGNED_MINUS_MODULO. * Optimize mpfr_can_round_raw. * Some new defines in mpfr.h to increase compatibility with MPFR v2.0.1 and above. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2550 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'get_str.c')
-rw-r--r--get_str.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/get_str.c b/get_str.c
index 531a16913..967e37320 100644
--- a/get_str.c
+++ b/get_str.c
@@ -377,8 +377,8 @@ mpfr_get_str_aux (char *str, mp_exp_t *exp, mp_limb_t *r, mp_size_t n,
i0 = (-f) / BITS_PER_MP_LIMB;
j0 = (-f) % BITS_PER_MP_LIMB;
- ret = mpfr_round_raw_generic (r + i0, r, n * BITS_PER_MP_LIMB, 0,
- n * BITS_PER_MP_LIMB + f, rnd, &dir, 0);
+ ret = mpfr_round_raw (r + i0, r, n * BITS_PER_MP_LIMB, 0,
+ n * BITS_PER_MP_LIMB + f, rnd, &dir);
/* warning: mpfr_round_raw_generic returns 2 or -2 in case of even
rounding */
@@ -641,9 +641,9 @@ mpfr_get_str (char *s, mp_exp_t *e, int b, size_t m, mpfr_srcptr x, mp_rnd_t rnd
nb = n * BITS_PER_MP_LIMB - prec;
/* round xp to the precision prec, and put it into x1
put the carry into x1[n] */
- if ((x1[n] = mpfr_round_raw_generic (x1, xp, MPFR_PREC(x),
- MPFR_IS_STRICTNEG(x),
- prec, rnd, &inexp, 0)))
+ if ((x1[n] = mpfr_round_raw (x1, xp, MPFR_PREC(x),
+ MPFR_IS_STRICTNEG(x),
+ prec, rnd, &inexp)))
{
/* overflow when rounding x: x1 = 2^prec */
if (r == pow2) /* prec = m * pow2,