diff options
author | shadchin <shadchin@yandex-team.com> | 2024-06-13 19:29:50 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2024-06-13 19:51:47 +0300 |
commit | 9051e2318afc1bfbd88a103f7392e622aa8c9527 (patch) | |
tree | 5c63ea23ebd5e7b7b9864903a9312aa853193ca5 /contrib/tools/python/src/Modules/mathmodule.c | |
parent | 224da250178b9250c7577a167d44f94f732d3627 (diff) | |
download | ydb-9051e2318afc1bfbd88a103f7392e622aa8c9527.tar.gz |
Update Python from 2.7.16 to 2.7.18
2a151e9cf2ebdfa59d250c1bbb800e908703a6f0
Diffstat (limited to 'contrib/tools/python/src/Modules/mathmodule.c')
-rw-r--r-- | contrib/tools/python/src/Modules/mathmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/tools/python/src/Modules/mathmodule.c b/contrib/tools/python/src/Modules/mathmodule.c index 67354a7594..e2ad281e12 100644 --- a/contrib/tools/python/src/Modules/mathmodule.c +++ b/contrib/tools/python/src/Modules/mathmodule.c @@ -71,7 +71,7 @@ static const double pi = 3.141592653589793238462643383279502884197; static const double sqrtpi = 1.772453850905516027298167483341145182798; static double -sinpi(double x) +m_sinpi(double x) { double y, r; int n; @@ -270,7 +270,7 @@ m_tgamma(double x) integer. */ if (absx > 200.0) { if (x < 0.0) { - return 0.0/sinpi(x); + return 0.0/m_sinpi(x); } else { errno = ERANGE; @@ -294,7 +294,7 @@ m_tgamma(double x) } z = z * lanczos_g / y; if (x < 0.0) { - r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); + r = -pi / m_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); r -= z * r; if (absx < 140.0) { r /= pow(y, absx - 0.5); @@ -366,7 +366,7 @@ m_lgamma(double x) (x-0.5)*(log(x+lanczos_g-0.5)-1); } else { - r = log(pi) - log(fabs(sinpi(absx))) - log(absx) - + r = log(pi) - log(fabs(m_sinpi(absx))) - log(absx) - (log(lanczos_sum(absx)) - lanczos_g + (absx-0.5)*(log(absx+lanczos_g-0.5)-1)); } |