Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82ebc1f

Browse files
committed
Merged revisions 76982 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent f371859 commit 82ebc1f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Modules/_math.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "Python.h"
55
#include <float.h>
6+
#include "_math.h"
67

78
/* The following copyright notice applies to the original
89
implementations of acosh, asinh and atanh. */
@@ -67,7 +68,7 @@ _Py_acosh(double x)
6768
}
6869
else { /* 1 < x <= 2 */
6970
double t = x - 1.0;
70-
return log1p(t + sqrt(2.0*t + t*t));
71+
return m_log1p(t + sqrt(2.0*t + t*t));
7172
}
7273
}
7374

@@ -103,7 +104,7 @@ _Py_asinh(double x)
103104
}
104105
else { /* 2**-28 <= |x| < 2= */
105106
double t = x*x;
106-
w = log1p(absx + t / (1.0 + sqrt(1.0 + t)));
107+
w = m_log1p(absx + t / (1.0 + sqrt(1.0 + t)));
107108
}
108109
return copysign(w, x);
109110

@@ -149,10 +150,10 @@ _Py_atanh(double x)
149150
}
150151
if (absx < 0.5) { /* |x| < 0.5 */
151152
t = absx+absx;
152-
t = 0.5 * log1p(t + t*absx / (1.0 - absx));
153+
t = 0.5 * m_log1p(t + t*absx / (1.0 - absx));
153154
}
154155
else { /* 0.5 <= |x| <= 1.0 */
155-
t = 0.5 * log1p((absx + absx) / (1.0 - absx));
156+
t = 0.5 * m_log1p((absx + absx) / (1.0 - absx));
156157
}
157158
return copysign(t, x);
158159
}

0 commit comments

Comments
 (0)