Skip to main content

builtin_trigamma

Function builtin_trigamma 

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

Trigamma function: the derivative of the digamma function.

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

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