summaryrefslogtreecommitdiff
path: root/div_ui.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-12-20 12:53:20 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-12-20 12:53:20 +0000
commitca59113b82ed06055e2ee431c0c85cf2f20445cc (patch)
treea77a93cc7a33fab9f541e69719debb3c8b29f1dd /div_ui.c
parent6f67a68f3528687f4655c7704883a5e592a61f3f (diff)
downloadmpfr-ca59113b82ed06055e2ee431c0c85cf2f20445cc.tar.gz
Unlikely one test.
Fix wrong integer type git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3156 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'div_ui.c')
-rw-r--r--div_ui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/div_ui.c b/div_ui.c
index 21428df73..7c01f35aa 100644
--- a/div_ui.c
+++ b/div_ui.c
@@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-
#define MPFR_NEED_LONGLONG_H
#include "mpfr-impl.h"
@@ -27,7 +26,9 @@ MA 02111-1307, USA. */
int
mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
{
- long int xn, yn, dif, sh, i;
+ long i;
+ int sh;
+ mp_size_t xn, yn, dif;
mp_limb_t *xp, *yp, *tmp, c, d;
mp_exp_t exp;
int inexact, middle = 1;
@@ -139,7 +140,7 @@ mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
MPFR_SET_EXP (y, exp);
TMP_FREE(marker);
- if ((d == 0) && (inexact == 0))
+ if (MPFR_UNLIKELY ((d == 0) && (inexact == 0)))
return 0; /* result is exact */
switch (rnd_mode)