Automatic Differentiation
 
Loading...
Searching...
No Matches
floor.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUN_FLOOR_HPP
2#define STAN_MATH_REV_FUN_FLOOR_HPP
3
9#include <cmath>
10
11namespace stan {
12namespace math {
13
48inline var floor(const var& a) { return var(std::floor(a.val())); }
49
50template <typename T, require_eigen_t<T>* = nullptr>
51inline auto floor(const var_value<T>& a) {
52 return var_value<T>(a.val().array().floor().matrix());
53}
54
55} // namespace math
56} // namespace stan
57#endif
fvar< T > floor(const fvar< T > &x)
Definition floor.hpp:13
var_value< double > var
Definition var.hpp:1187
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...