Skip to main content

builtin_digamma

Function builtin_digamma 

Source
fn builtin_digamma(
    args: &[RValue],
    _: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

Digamma function (psi function): the logarithmic derivative of the gamma function.

Computes d/dx log(gamma(x)) = gamma’(x) / gamma(x). Uses an asymptotic expansion for large x and the recurrence relation psi(x) = psi(x+1) - 1/x for small x.

@param x numeric vector @return numeric vector of digamma values