summaryrefslogtreecommitdiff
path: root/src/frexp.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-01-17 03:29:36 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-01-17 03:29:36 +0000
commit5fdaa396b168c59a879f65c7586688db4eb213e8 (patch)
tree723aa2c6107e2ad896adba5dd05f3440827e744f /src/frexp.c
parentbd5571793a77e38c25c560d13502b5ddd3c23db2 (diff)
downloadmpfr-5fdaa396b168c59a879f65c7586688db4eb213e8.tar.gz
[src/frexp.c] Corrections.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7395 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/frexp.c')
-rw-r--r--src/frexp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/frexp.c b/src/frexp.c
index 9a8177c27..8d4351421 100644
--- a/src/frexp.c
+++ b/src/frexp.c
@@ -30,27 +30,27 @@ mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)))
{
if (MPFR_IS_NAN(x))
- {
+ {
MPFR_SET_NAN(y);
MPFR_RET_NAN; /* exp is unspecified */
- }
+ }
else if (MPFR_IS_INF(x))
{
- MPFR_SET_INF(y);
- MPFR_SET_SAME_SIGN(y,x);
+ MPFR_SET_INF(y);
+ MPFR_SET_SAME_SIGN(y,x);
MPFR_RET(0); /* exp is unspecified */
}
else
{
- MPFR_SET_ZERO(y);
+ MPFR_SET_ZERO(y);
MPFR_SET_SAME_SIGN(y,x);
- *exp = 0;
- MPFR_RET(0);
+ *exp = 0;
+ MPFR_RET(0);
}
}
inex = mpfr_set (y, x, rnd);
- *exp = MPFR_EXP(y);
- MPFR_EXP(y) = 0;
- return inex;
+ *exp = MPFR_GET_EXP (y);
+ MPFR_SET_EXP (y, 0);
+ return mpfr_check_range (y, inex, rnd);
}