summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-12-21 15:42:00 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-12-21 15:42:00 (GMT)
commit82ebc1fde782168936374d92e5ab74805dfeee26 (patch)
tree9d3f4c670a1ffeb5f607fd207cb0207c58de6e38 /Modules
parentf371859a4f0705062e94798e21ebe3705d891a37 (diff)
downloadcpython-82ebc1fde782168936374d92e5ab74805dfeee26.zip
cpython-82ebc1fde782168936374d92e5ab74805dfeee26.tar.gz
cpython-82ebc1fde782168936374d92e5ab74805dfeee26.tar.bz2
Merged revisions 76982 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76982 | mark.dickinson | 2009-12-21 15:40:33 +0000 (Mon, 21 Dec 2009) | 2 lines Inverse hyperbolic trigonometric functions should call m_log1p, not log1p. ........
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_math.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/_math.c b/Modules/_math.c
index e27c100..995d1c0 100644
--- a/Modules/_math.c
+++ b/Modules/_math.c
@@ -3,6 +3,7 @@
#include "Python.h"
#include <float.h>
+#include "_math.h"
/* The following copyright notice applies to the original
implementations of acosh, asinh and atanh. */
@@ -67,7 +68,7 @@ _Py_acosh(double x)
}
else { /* 1 < x <= 2 */
double t = x - 1.0;
- return log1p(t + sqrt(2.0*t + t*t));
+ return m_log1p(t + sqrt(2.0*t + t*t));
}
}
@@ -103,7 +104,7 @@ _Py_asinh(double x)
}
else { /* 2**-28 <= |x| < 2= */
double t = x*x;
- w = log1p(absx + t / (1.0 + sqrt(1.0 + t)));
+ w = m_log1p(absx + t / (1.0 + sqrt(1.0 + t)));
}
return copysign(w, x);
@@ -149,10 +150,10 @@ _Py_atanh(double x)
}
if (absx < 0.5) { /* |x| < 0.5 */
t = absx+absx;
- t = 0.5 * log1p(t + t*absx / (1.0 - absx));
+ t = 0.5 * m_log1p(t + t*absx / (1.0 - absx));
}
else { /* 0.5 <= |x| <= 1.0 */
- t = 0.5 * log1p((absx + absx) / (1.0 - absx));
+ t = 0.5 * m_log1p((absx + absx) / (1.0 - absx));
}
return copysign(t, x);
}