diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-11-01 09:44:03 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-11-01 09:44:03 +0000 |
commit | baba1bbe96c50e5cce3917a8f723883a73e518b0 (patch) | |
tree | 51307f793d53561b882d156b92ee7019566cecf4 /pow2.c | |
parent | 8617b57e9dc4cf5a094de765061568efbcf82c44 (diff) | |
download | mpfr-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.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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)); |