Automatic Differentiation
 
Loading...
Searching...
No Matches
ldexp.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_FWD_FUN_LDEXP_HPP
2#define STAN_MATH_FWD_FUN_LDEXP_HPP
3
6#include <cmath>
7
8namespace stan {
9namespace math {
10
20template <typename T>
21inline fvar<T> ldexp(const fvar<T>& a, int b) {
22 return fvar<T>(ldexp(a.val_, b), ldexp(a.d_, b));
23}
24
25} // namespace math
26} // namespace stan
27
28#endif
fvar< T > ldexp(const fvar< T > &a, int b)
Returns the product of a (the significand) times 2 to power b (the exponent).
Definition ldexp.hpp:21
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Scalar val_
The value of this variable.
Definition fvar.hpp:49
Scalar d_
The tangent (derivative) of this variable.
Definition fvar.hpp:61
This template class represents scalars used in forward-mode automatic differentiation,...
Definition fvar.hpp:40