Automatic Differentiation
 
Loading...
Searching...
No Matches
trunc.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_FWD_FUN_TRUNC_HPP
2#define STAN_MATH_FWD_FUN_TRUNC_HPP
3
7
8namespace stan {
9namespace math {
10
19template <typename T>
20inline fvar<T> trunc(const fvar<T>& x) {
21 return fvar<T>(trunc(x.val_), 0);
22}
23
24} // namespace math
25} // namespace stan
26#endif
fvar< T > trunc(const fvar< T > &x)
Return the nearest integral value that is not larger in magnitude than the specified argument.
Definition trunc.hpp:20
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
This template class represents scalars used in forward-mode automatic differentiation,...
Definition fvar.hpp:40