1 #ifndef STAN__AGRAD__REV__FUNCTIONS__SIN_HPP
2 #define STAN__AGRAD__REV__FUNCTIONS__SIN_HPP
12 class sin_vari :
public op_v_vari {
15 op_v_vari(std::
sin(avi->val_),avi) {
18 avi_->adj_ += adj_ *
std::cos(avi_->val_);
51 return var(
new sin_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.