1#ifndef STAN_MATH_REV_FUN_EXP_HPP
2#define STAN_MATH_REV_FUN_EXP_HPP
41 a.adj() += vi.adj() * vi.val();
50inline std::complex<var>
exp(
const std::complex<var>& z) {
61template <
typename T, require_var_matrix_t<T>* =
nullptr>
62inline auto exp(
const T& x) {
64 x.val().array().exp().matrix(), [x](
const auto& vi)
mutable {
65 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 ...