Stan Math Library  2.20.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 
6 
7 namespace stan {
8 namespace math {
9 
19 template <typename T>
20 inline T ldexp(const T& a, int b) {
21  return a * exp2(b);
22 }
23 } // namespace math
24 } // namespace stan
25 
26 #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:20
fvar< T > exp2(const fvar< T > &x)
Definition: exp2.hpp:14

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