summaryrefslogtreecommitdiff
path: root/isinteger.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-07 10:08:57 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-07 10:08:57 +0000
commit73e6d7bd621b015bfb8d64b5be5fa80f52e6ae0a (patch)
treed0cc39f0951ec9cd728f9698681e5a88c9d348ab /isinteger.c
parentd406c7c3f07cacb170533149e9319c334062792b (diff)
downloadmpfr-73e6d7bd621b015bfb8d64b5be5fa80f52e6ae0a.tar.gz
Some minor optimizations.
Optimization of mul.c / sub1.c. Some clean up in the header files. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2537 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'isinteger.c')
-rw-r--r--isinteger.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/isinteger.c b/isinteger.c
index 720f4d021..7f0bbc3fd 100644
--- a/isinteger.c
+++ b/isinteger.c
@@ -32,11 +32,13 @@ mpfr_integer_p (mpfr_srcptr x)
mp_size_t xn;
mp_limb_t *xp;
- if (!MPFR_IS_FP(x))
- return 0;
-
- if (MPFR_IS_ZERO(x))
- return 1;
+ if (MPFR_UNLIKELY( MPFR_IS_SINGULAR(x) ))
+ {
+ if (MPFR_IS_ZERO(x))
+ return 1;
+ else
+ return 0;
+ }
expo = MPFR_GET_EXP (x);
if (expo <= 0)