summaryrefslogtreecommitdiff
path: root/pow2.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-01 09:44:03 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-01 09:44:03 +0000
commitbaba1bbe96c50e5cce3917a8f723883a73e518b0 (patch)
tree51307f793d53561b882d156b92ee7019566cecf4 /pow2.c
parent8617b57e9dc4cf5a094de765061568efbcf82c44 (diff)
downloadmpfr-baba1bbe96c50e5cce3917a8f723883a73e518b0.tar.gz
fixed MLK's in mpfr_isinteger
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1455 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'pow2.c')
-rw-r--r--pow2.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pow2.c b/pow2.c
index 8cfdec40a..5a5d33e4f 100644
--- a/pow2.c
+++ b/pow2.c
@@ -175,7 +175,7 @@ mpfr_isinteger(x)
{
mpfr_t u;
- int expo;
+ int expo, res;
mp_prec_t prec;
expo=(int)MPFR_EXP(x);
@@ -187,11 +187,14 @@ mpfr_isinteger(x)
if (expo>=prec)
return 1;
- mpfr_init2(u,prec);
- mpfr_trunc(u,x);
+ mpfr_init2 (u, prec);
+ mpfr_trunc (u, x);
- if(mpfr_cmp(x,u)==0) return 1;
- else return 0;
+ res = (mpfr_cmp (x, u) == 0);
+
+ mpfr_clear (u);
+
+ return res;
}
int mpfr_pow _PROTO ((mpfr_ptr, mpfr_srcptr,mpfr_srcptr, mp_rnd_t));