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