@@ -74,17 +74,6 @@ static const double pi = 3.141592653589793238462643383279502884197;
74
74
static const double sqrtpi = 1.772453850905516027298167483341145182798 ;
75
75
static const double logpi = 1.144729885849400174143427351353058711647 ;
76
76
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
-
88
77
static double
89
78
sinpi (double x )
90
79
{
@@ -241,7 +230,6 @@ lanczos_sum(double x)
241
230
}
242
231
return num /den ;
243
232
}
244
- #endif /* !defined(USE_TGAMMA) || !defined(USE_LGAMMA) */
245
233
246
234
/* Constant for +infinity, generated in the same way as float('inf'). */
247
235
@@ -275,14 +263,6 @@ m_nan(void)
275
263
static double
276
264
m_tgamma (double x )
277
265
{
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
286
266
double absx , r , y , z , sqrtpow ;
287
267
288
268
/* special cases */
@@ -374,7 +354,6 @@ m_tgamma(double x)
374
354
if (Py_IS_INFINITY (r ))
375
355
errno = ERANGE ;
376
356
return r ;
377
- #endif
378
357
}
379
358
380
359
/*
@@ -386,15 +365,6 @@ static double
386
365
m_lgamma (double x )
387
366
{
388
367
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
398
368
double absx ;
399
369
400
370
/* special cases */
@@ -433,7 +403,6 @@ m_lgamma(double x)
433
403
if (Py_IS_INFINITY (r ))
434
404
errno = ERANGE ;
435
405
return r ;
436
- #endif
437
406
}
438
407
439
408
#if !defined(HAVE_ERF ) || !defined(HAVE_ERFC )
0 commit comments