Stan Math Library
4.9.0
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
4
#include <
stan/math/rev/meta.hpp
>
5
#include <
stan/math/rev/core.hpp
>
6
#include <
stan/math/prim/fun/constants.hpp
>
7
#include <
stan/math/prim/fun/is_nan.hpp
>
8
#include <cmath>
9
10
namespace
stan
{
11
namespace
math {
12
47
inline
var
floor
(
const
var
& a) {
return
var
(std::floor(a.val())); }
48
49
template
<
typename
T, require_eigen_t<T>* =
nullptr
>
50
inline
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
stan::math::var_value< double >
constants.hpp
stan::math::floor
fvar< T > floor(const fvar< T > &x)
Definition
floor.hpp:12
stan::math::var
var_value< double > var
Definition
var.hpp:1187
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
is_nan.hpp
core.hpp
meta.hpp
stan
math
rev
fun
floor.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.