Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
is_integer.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_FUN_IS_INTEGER_HPP
2
#define STAN_MATH_PRIM_FUN_IS_INTEGER_HPP
3
4
#include <
stan/math/prim/meta.hpp
>
5
#include <
stan/math/prim/fun/floor.hpp
>
6
#include <cmath>
7
8
namespace
stan
{
9
namespace
math {
10
17
template
<
typename
T>
18
inline
bool
is_integer
(T x) {
19
using
std::floor;
20
return
floor
(x) == x;
21
}
22
23
}
// namespace math
24
}
// namespace stan
25
26
#endif
stan::math::floor
fvar< T > floor(const fvar< T > &x)
Definition
floor.hpp:12
stan::math::is_integer
bool is_integer(T x)
Returns true if the input is an integer and false otherwise.
Definition
is_integer.hpp:18
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
fvar.hpp:9
floor.hpp
meta.hpp
stan
math
prim
fun
is_integer.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.