Stan Math Library  2.15.0
reverse mode automatic differentiation
ldexp.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LDEXP_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_LDEXP_HPP
3 
5 
6 namespace stan {
7  namespace math {
8 
18  template <typename T>
19  inline T ldexp(const T& a, int b) {
20  return a * exp2(b);
21  }
22  }
23 }
24 
25 #endif
T ldexp(const T &a, int b)
Returns the product of a (the significand) and 2 to power b (the exponent).
Definition: ldexp.hpp:19
fvar< T > exp2(const fvar< T > &x)
Definition: exp2.hpp:14

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