1 #ifndef STAN_MATH_REV_SCAL_FUN_EXP2_HPP 2 #define STAN_MATH_REV_SCAL_FUN_EXP2_HPP 13 class exp2_vari :
public op_v_vari {
15 explicit exp2_vari(vari* avi) :
16 op_v_vari(
std::
pow(2.0, avi->val_), avi) {
19 avi_->adj_ += adj_ * val_ *
LOG_2;
51 return var(
new exp2_vari(a.
vi_));
const double LOG_2
The natural logarithm of 2, .
Independent (input) and dependent (output) variables for gradients.
vari * vi_
Pointer to the implementation of this variable.
fvar< T > exp2(const fvar< T > &x)
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)