1 #ifndef STAN_MATH_REV_SCAL_FUN_COS_HPP
2 #define STAN_MATH_REV_SCAL_FUN_COS_HPP
11 class cos_vari :
public op_v_vari {
13 explicit cos_vari(vari* avi) :
14 op_v_vari(
std::
cos(avi->val_), avi) {
17 avi_->adj_ -= adj_ *
std::sin(avi_->val_);
50 return var(
new cos_vari(a.
vi_));
fvar< T > cos(const fvar< T > &x)
Independent (input) and dependent (output) variables for gradients.
fvar< T > sin(const fvar< T > &x)
vari * vi_
Pointer to the implementation of this variable.