1 #ifndef STAN__AGRAD__REV__FUNCTIONS__TANH_HPP
2 #define STAN__AGRAD__REV__FUNCTIONS__TANH_HPP
12 class tanh_vari :
public op_v_vari {
14 tanh_vari(vari* avi) :
15 op_v_vari(std::
tanh(avi->val_),avi) {
19 avi_->adj_ += adj_ / (cosh *
cosh);
52 return var(
new tanh_vari(a.
vi_));
fvar< T > cosh(const fvar< T > &x)
fvar< T > tanh(const fvar< T > &x)
vari * vi_
Pointer to the implementation of this variable.
Independent (input) and dependent (output) variables for gradients.