1#ifndef STAN_MATH_REV_FUN_TGAMMA_HPP
2#define STAN_MATH_REV_FUN_TGAMMA_HPP
50 a.adj() += vi.adj() * vi.val() * digamma(a.val());
61template <
typename T, require_var_matrix_t<T>* =
nullptr>
65 += vi.adj().array() * vi.val().array() * digamma(a.val()).array();
var_value< plain_type_t< T > > make_callback_var(T &&value, F &&functor)
Creates a new var initialized with a callback_vari with a given value and reverse-pass callback funct...
fvar< T > tgamma(const fvar< T > &x)
Return the result of applying the gamma function to the specified argument.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...