1#ifndef STAN_MATH_REV_FUN_INV_PHI_HPP
2#define STAN_MATH_REV_FUN_INV_PHI_HPP
23 p.adj() += vi.adj() * SQRT_TWO_PI / std::exp(-0.5 * vi.val() * vi.val());
34template <
typename T, require_var_matrix_t<T>* =
nullptr>
37 p.adj().array() += vi.adj().array() * SQRT_TWO_PI
38 / (-0.5 * vi.val().array().square()).exp();
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 > inv_Phi(const fvar< T > &p)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...