On the page describing the polygamma function (https://beta.boost.org/doc/libs/1_82_0/libs/math/doc/html/math_toolkit/sf_gamma/polygamma.html), in the Implementation section, there are two typos in the paragraph describing how to generate the coefficients of the terms of the cotangent derivatives. It should state that the iteration should start from c0,1=-1.
Also, the derivative used to generate the subsequent coefficients should be in terms of θ, i.e., ∂/∂θcoskθ/sinnθ.
Edit: I think I found a third doc bug related to generation of these coefficients. This time, it is the the source:
|
// C[k+1, n+1] += (k-n-1) * C[k, n]; |
. I think there is an extra
- 1, i.e., the formula should be
C[k+1, n+1] += (k - n) * C[k, n].
On the page describing the polygamma function (https://beta.boost.org/doc/libs/1_82_0/libs/math/doc/html/math_toolkit/sf_gamma/polygamma.html), in the Implementation section, there are two typos in the paragraph describing how to generate the coefficients of the terms of the cotangent derivatives. It should state that the iteration should start from
c0,1=-1.Also, the derivative used to generate the subsequent coefficients should be in terms of
θ, i.e.,∂/∂θcoskθ/sinnθ.Edit: I think I found a third doc bug related to generation of these coefficients. This time, it is the the source:
math/include/boost/math/special_functions/detail/polygamma.hpp
Line 280 in e1158bb
- 1, i.e., the formula should beC[k+1, n+1] += (k - n) * C[k, n].