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
8#include <cmath>
9
10namespace stan {
11namespace math {
12
47inline var floor(const var& a) { return var(std::floor(a.val())); }
48
49template <typename T, require_eigen_t<T>* = nullptr>
50inline auto floor(const var_value<T>& a) {
51 return var_value<T>(a.val().array().floor().matrix());
52}
53
54} // namespace math
55} // namespace stan
56#endif
fvar< T > floor(const fvar< T > &x)
Definition floor.hpp:12
var_value< double > var
Definition var.hpp:1187
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...