Skip to main content

digamma

Function digamma 

Source
pub fn digamma(x: &DBig, precision: usize) -> OxiNumResult<DBig>
Expand description

Compute the digamma function ψ(x) = d/dx ln(Γ(x)) to precision significant decimal digits.

Uses recurrence ψ(x+1) = ψ(x) + 1/x to shift x > 8, then Bernoulli asymptotic series. For x < 1 uses the reflection formula ψ(1-x) - ψ(x) = π·cot(πx).

§Errors

Returns OxiNumError::Domain if x is zero or a negative integer.