summaryrefslogtreecommitdiff
path: root/src/acos.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-02-18 09:17:14 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-02-18 09:17:14 +0000
commita11814e229ba7453197d0ad6179afbdc57291fdf (patch)
tree1abc00fa9f4628a185ccbe818e3ede591b8ea4e2 /src/acos.c
parent74dce53cf30ad3264fadeb4b47675e7c682e42fb (diff)
downloadmpfr-a11814e229ba7453197d0ad6179afbdc57291fdf.tar.gz
[src/acos.c] Support acos(0) in extremely reduced exponent range.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7471 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/acos.c')
-rw-r--r--src/acos.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/acos.c b/src/acos.c
index 80b0c1c1a..45711702e 100644
--- a/src/acos.c
+++ b/src/acos.c
@@ -48,9 +48,11 @@ mpfr_acos (mpfr_ptr acos, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
{
MPFR_ASSERTD(MPFR_IS_ZERO(x));
/* acos(0)=Pi/2 */
+ MPFR_SAVE_EXPO_MARK (expo);
inexact = mpfr_const_pi (acos, rnd_mode);
mpfr_div_2ui (acos, acos, 1, rnd_mode); /* exact */
- MPFR_RET (inexact);
+ MPFR_SAVE_EXPO_FREE (expo);
+ return mpfr_check_range (acos, inexact, rnd_mode);
}
}