summaryrefslogtreecommitdiff
path: root/ui_div.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-10-27 15:15:04 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-10-27 15:15:04 +0000
commit734c0a144b04e2cae4e67b394010e3f6e3cadecc (patch)
treee0bb801e56a43c3aebe1ad73851ede3588e082fb /ui_div.c
parenta7f45009dff2e3d0e8698b44e45f5cacacb82cdd (diff)
downloadmpfr-734c0a144b04e2cae4e67b394010e3f6e3cadecc.tar.gz
Change the internal format of MPFR: ZERO, INF and NAN have special values of exp.
Rename MPFR_ESIZE in MPFR_LIMB_SIZE. Rename MPFR_ABSZISE in MPFR_ALLOC_SIZE. Rename MPFR_INIT in MPFR_TMP_INIT (INIT1 too). "mpfr.h" includes <gmp.h> if GMP isn't detected. Change the way of detecting stdio.h (To check). Use mpfr namespace for new definitions in "mpfr.h". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2524 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'ui_div.c')
-rw-r--r--ui_div.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui_div.c b/ui_div.c
index 6fff18546..f99372597 100644
--- a/ui_div.c
+++ b/ui_div.c
@@ -45,8 +45,7 @@ mpfr_ui_div (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode)
{
MPFR_CLEAR_INF(y);
MPFR_SET_ZERO(y);
- if (MPFR_SIGN(x) != MPFR_SIGN(y))
- MPFR_CHANGE_SIGN(y);
+ MPFR_SET_SAME_SIGN(y,x);
MPFR_RET(0);
}
@@ -54,7 +53,7 @@ mpfr_ui_div (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode)
if (u)
{
- MPFR_INIT1(up, uu, BITS_PER_MP_LIMB, 1);
+ MPFR_TMP_INIT1(up, uu, BITS_PER_MP_LIMB);
MPFR_ASSERTN(u == (mp_limb_t) u);
count_leading_zeros(cnt, (mp_limb_t) u);
*up = (mp_limb_t) u << cnt;