2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-10 23:42:23 +00:00

1F1: simplify log_pochhammer, add new test cases.

[CI SKIP]
This commit is contained in:
jzmaddock
2019-02-24 09:43:31 +00:00
parent fa875495e2
commit 39c3d03db2
3 changed files with 19 additions and 4 deletions

View File

@@ -213,6 +213,7 @@
inline T log_pochhammer(T z, unsigned n, const Policy pol, int* s = 0)
{
BOOST_MATH_STD_USING
#if 0
if (z < 0)
{
if (n < -z)
@@ -228,10 +229,13 @@
}
}
else
#endif
{
int s1, s2;
T r = lgamma(z + n, &s1, pol) - lgamma(z, &s2, pol);
if(s)
*s = 1;
return lgamma(z + n) - lgamma(z);
*s = s1 * s2;
return r;
}
}