Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
acosh.hpp
Go to the documentation of this file.
1 #ifndef STAN__AGRAD__FWD__FUNCTIONS__ACOSH_HPP
2 #define STAN__AGRAD__FWD__FUNCTIONS__ACOSH_HPP
3 
5 #include <stan/meta/traits.hpp>
8 #include <math.h>
9 
10 namespace stan {
11 
12  namespace agrad {
13 
14  template <typename T>
15  inline
16  fvar<T>
17  acosh(const fvar<T>& x) {
19  using stan::math::square;
20  using std::sqrt;
22  return fvar<T>(acosh(x.val_),
23  x.d_ / sqrt(square(x.val_) - 1));
24  }
25  }
26 }
27 #endif
T square(const T x)
Return the square of the specified argument.
Definition: square.hpp:22
fvar< T > acosh(const fvar< T > &x)
Definition: acosh.hpp:17
const double NOT_A_NUMBER
(Quiet) not-a-number value.
Definition: constants.hpp:53
var acosh(const stan::agrad::var &a)
The inverse hyperbolic cosine function for variables (C99).
Definition: acosh.hpp:67
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15

     [ Stan Home Page ] © 2011–2014, Stan Development Team.