Stan Math Library  2.12.0
reverse mode automatic differentiation
exp.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_EXP_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_EXP_HPP
3 
6 #include <cmath>
7 
8 namespace stan {
9  namespace math {
10 
15  struct exp_fun {
23  template <typename T>
24  static inline T fun(const T& x) {
25  using std::exp;
26  return exp(x);
27  }
28  };
29 
39  template <typename T>
40  inline typename apply_scalar_unary<exp_fun, T>::return_t
41  exp(const T& x) {
43  }
44 
45  }
46 }
47 
48 #endif
static T fun(const T &x)
Return the exponential of the specified scalar argument.
Definition: exp.hpp:24
var exp(const var &a)
Return the exponentiation of the specified variable (cmath).
Definition: exp.hpp:44
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
Structure to wrap exp() so that it can be vectorized.
Definition: exp.hpp:15
static return_t apply(const T &x)
Return the result of applying the function defined by the template parameter F to the specified matri...

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