summaryrefslogtreecommitdiff
path: root/src/atanh.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-04-03 09:16:27 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-04-03 09:16:27 +0000
commit1543c40a4bf927230a0f93236f71688647a2ff32 (patch)
treeb87a4d59ec2a8ad4b053aeee9da6b4b319c36f2d /src/atanh.c
parent5e952138d666c5f9ecef9d29ebd081bb6448204d (diff)
downloadmpfr-1543c40a4bf927230a0f93236f71688647a2ff32.tar.gz
[TODO,src/atanh.c] Suggest a faster formula for atanh(x) on small x.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11398 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/atanh.c')
-rw-r--r--src/atanh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/atanh.c b/src/atanh.c
index 298cb61e3..7b10c5abc 100644
--- a/src/atanh.c
+++ b/src/atanh.c
@@ -25,6 +25,10 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
/* The computation of atanh is done by:
atanh = ln((1+x)/(1-x)) / 2
+ except when x is very small, in which case atanh = x + tiny error.
+ TODO: When x is small (but x + tiny error cannot be used), the above
+ formula is slow due to the large error as (1+x)/(1-x) is close to 1;
+ one should use: log1p(2x/(1-x)).
*/
int