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