@@ -74,17 +74,6 @@ static const double pi = 3.141592653589793238462643383279502884197;
7474static const double sqrtpi = 1.772453850905516027298167483341145182798 ;
7575static const double logpi = 1.144729885849400174143427351353058711647 ;
7676
77- #ifndef __APPLE__
78- # ifdef HAVE_TGAMMA
79- # define USE_TGAMMA
80- # endif
81- # ifdef HAVE_LGAMMA
82- # define USE_LGAMMA
83- # endif
84- #endif
85-
86- #if !defined(USE_TGAMMA ) || !defined(USE_LGAMMA )
87-
8877static double
8978sinpi (double x )
9079{
@@ -241,7 +230,6 @@ lanczos_sum(double x)
241230 }
242231 return num /den ;
243232}
244- #endif /* !defined(USE_TGAMMA) || !defined(USE_LGAMMA) */
245233
246234/* Constant for +infinity, generated in the same way as float('inf'). */
247235
@@ -275,14 +263,6 @@ m_nan(void)
275263static double
276264m_tgamma (double x )
277265{
278- #ifdef USE_TGAMMA
279- if (x == 0.0 ) {
280- errno = EDOM ;
281- /* tgamma(+-0.0) = +-inf, divide-by-zero */
282- return copysign (Py_HUGE_VAL , x );
283- }
284- return tgamma (x );
285- #else
286266 double absx , r , y , z , sqrtpow ;
287267
288268 /* special cases */
@@ -374,7 +354,6 @@ m_tgamma(double x)
374354 if (Py_IS_INFINITY (r ))
375355 errno = ERANGE ;
376356 return r ;
377- #endif
378357}
379358
380359/*
@@ -386,15 +365,6 @@ static double
386365m_lgamma (double x )
387366{
388367 double r ;
389-
390- #ifdef USE_LGAMMA
391- r = lgamma (x );
392- if (errno == ERANGE && x == floor (x ) && x <= 0.0 ) {
393- errno = EDOM ; /* lgamma(n) = inf, divide-by-zero for */
394- return Py_HUGE_VAL ; /* integers n <= 0 */
395- }
396- return r ;
397- #else
398368 double absx ;
399369
400370 /* special cases */
@@ -433,7 +403,6 @@ m_lgamma(double x)
433403 if (Py_IS_INFINITY (r ))
434404 errno = ERANGE ;
435405 return r ;
436- #endif
437406}
438407
439408#if !defined(HAVE_ERF ) || !defined(HAVE_ERFC )
0 commit comments