Stan Math Library  2.20.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 exp(const T& x) {
42 }
43 
44 } // namespace math
45 } // namespace stan
46 
47 #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:41
Eigen::Matrix< scalar_t, T::RowsAtCompileTime, T::ColsAtCompileTime > return_t
Return type for applying the function elementwise to a matrix expression template of type T...
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:11
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–2018, Stan Development Team.