1#ifndef STAN_MATH_REV_FUN_HYPERGEOMETRIC_1F0_HPP
2#define STAN_MATH_REV_FUN_HYPERGEOMETRIC_1F0_HPP
31template <
typename Ta,
typename Tz,
32 require_all_stan_scalar_t<Ta, Tz>* =
nullptr,
33 require_any_var_t<Ta, Tz>* =
nullptr>
39 if constexpr (is_autodiff_v<Ta>) {
40 a.adj() += vi.adj() * -rtn *
log1m(z_val);
42 if constexpr (is_autodiff_v<Tz>) {
43 z.adj() += vi.adj() * rtn * a_val *
inv(1 - z_val);
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...
T value_of(const fvar< T > &v)
Return the value of the specified variable.
fvar< T > log1m(const fvar< T > &x)
fvar< T > inv(const fvar< T > &x)
FvarT hypergeometric_1F0(const Ta &a, const Tz &z)
Returns the Hypergeometric 1F0 function applied to the input arguments: .
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...