Stan Math Library  2.20.0
reverse mode automatic differentiation
exp2.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_EXP2_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_EXP2_HPP
3 
5 #include <cmath>
6 
7 namespace stan {
8 namespace math {
9 
21 inline double exp2(double y) {
22  using std::pow;
23  return pow(2.0, y);
24 }
25 
33 inline double exp2(int y) { return exp2(static_cast<double>(y)); }
34 
35 } // namespace math
36 } // namespace stan
37 #endif
fvar< T > exp2(const fvar< T > &x)
Definition: exp2.hpp:14
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:16

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