From 73e6d7bd621b015bfb8d64b5be5fa80f52e6ae0a Mon Sep 17 00:00:00 2001 From: pelissip Date: Fri, 7 Nov 2003 10:08:57 +0000 Subject: 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 --- isinteger.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'isinteger.c') 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) -- cgit v1.2.1