1 #ifndef STAN__AGRAD__REV__FUNCTIONS__ACOSH_HPP
2 #define STAN__AGRAD__REV__FUNCTIONS__ACOSH_HPP
7 #include <boost/math/special_functions/fpclassify.hpp>
17 class acosh_vari :
public op_v_vari {
19 acosh_vari(
double val, vari* avi) :
23 avi_->adj_ += adj_ /
std::sqrt(avi_->val_ * avi_->val_ - 1.0);
69 return var(
new acosh_vari(a.
val(),a.
vi_));
fvar< T > acosh(const fvar< T > &x)
double val() const
Return the value of this variable.
vari * vi_
Pointer to the implementation of this variable.
bool isinf(const stan::agrad::var &v)
Checks if the given number is infinite.
fvar< T > sqrt(const fvar< T > &x)
Independent (input) and dependent (output) variables for gradients.