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
6#include <cmath>
7
8namespace stan {
9namespace math {
10
17template <typename T>
18inline 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
fvar< T > floor(const fvar< T > &x)
Definition floor.hpp:12
bool is_integer(T x)
Returns true if the input is an integer and false otherwise.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9