Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
stan
math
prim
scal
fun
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
4
#include <
stan/math/prim/scal/fun/exp2.hpp
>
5
6
namespace
stan
{
7
namespace
math
{
8
9
/**
10
* Returns the product of a (the significand) and
11
* 2 to power b (the exponent).
12
*
13
* @tparam T Scalar type of significand
14
* @param[in] a the significand
15
* @param[in] b an integer that is the exponent
16
* @return product of a times 2 to the power b
17
*/
18
template
<
typename
T>
19
inline
T
ldexp
(
const
T
&
a
,
int
b
) {
20
return
a *
exp2
(b);
21
}
22
}
// namespace math
23
}
// namespace stan
24
25
#endif
stan
Definition:
StanTypedefs.h:9
stan::math::ldexp
T ldexp(const T &a, int b)
Definition:
ldexp.hpp:19
a
const double a
Definition:
gUpMuFluxGen.cxx:164
math
stan::math::exp2
fvar< T > exp2(const fvar< T > &x)
Definition:
exp2.hpp:13
b
const hit & b
Definition:
hits.cxx:21
exp2.hpp
T
double T
Definition:
Xdiff_gwt.C:5
Generated on Wed Feb 24 2021 14:14:51 for NOvA by
1.8.11