summaryrefslogtreecommitdiff
path: root/expm1.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-05-13 11:49:46 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-05-13 11:49:46 +0000
commit9e30b88d4035487a3a225b80ee72e9cce91fdc73 (patch)
treeaf1fdbace2bc039d2b15a91196d62c47c8a771d2 /expm1.c
parent5b028b20d51c6229fd5f9eeed94ee953032d35cf (diff)
downloadmpfr-9e30b88d4035487a3a225b80ee72e9cce91fdc73.tar.gz
Add support for MPFR_FAST_COMPUTE_IS_SMALL_INPUT
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3553 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'expm1.c')
-rw-r--r--expm1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/expm1.c b/expm1.c
index 841d369f9..f2cef1036 100644
--- a/expm1.c
+++ b/expm1.c
@@ -60,6 +60,9 @@ mpfr_expm1 (mpfr_ptr y, mpfr_srcptr x , mp_rnd_t rnd_mode)
}
}
+ /* exp(x)-1 = x +x^2/2 + ... so the error is < 2^(2*EXP(x)-1) */
+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -MPFR_GET_EXP (x)+1,1,rnd_mode,);
+
MPFR_SAVE_EXPO_MARK (expo);
/* General case */
{