math
math copied to clipboard
Improve `harmonic`
Sorry I somehow missed #18.
Can the formula:
HarmonicNumber(n) == EulerGamma + PolyGamma(0, 1 + n)
be used in harmonic for non-integer arguments?
https://github.com/paulmasson/math/blob/e8a5603a3157d0ff044b8126f3bca0d3c5bcad26/build/math.js#L4464
Also for 2 arguments:
HarmonicNumber(n, r) == -HurwitzZeta(r, 1 + n) + Zeta(r)