File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments