1#ifndef STAN_MATH_REV_FUN_EXP_HPP
2#define STAN_MATH_REV_FUN_EXP_HPP
44 a.adj() += vi.adj() * vi.val();
53inline std::complex<var>
exp(
const std::complex<var>& z) {
64template <
typename T, require_var_matrix_t<T>* =
nullptr>
65inline auto exp(
const T& x) {
67 x.val().array().exp().matrix(), [x](
const auto& vi)
mutable {
68 x.adj() += (vi.val().array() * vi.adj().array()).matrix();
std::complex< V > complex_exp(const std::complex< V > &z)
Return the natural (base e) complex exponentiation of the specified complex argument.
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 > exp(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...