Stan Math Library  2.20.0
reverse mode automatic differentiation
round.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_ROUND_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_ROUND_HPP
3 
5 #include <cmath>
6 
7 namespace stan {
8 namespace math {
9 
17 inline double round(double x) { return std::round(x); }
18 
26 inline double round(int x) { return std::round(x); }
27 
28 } // namespace math
29 } // namespace stan
30 #endif
fvar< T > round(const fvar< T > &x)
Return the closest integer to the specified argument, with halfway cases rounded away from zero...
Definition: round.hpp:24
var round(const var &a)
Returns the rounded form of the specified variable (C99).
Definition: round.hpp:54

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