1 #ifndef STAN_MATH_PRIM_FUN_IS_INF_HPP
2 #define STAN_MATH_PRIM_FUN_IS_INF_HPP
3 
4 #include <stan/math/prim/meta.hpp>
5 #include <cmath>
6 
7 namespace stan {
8 namespace math {
9 
10 /**
11  * Returns true if the input is infinite and false otherwise.
12  *
13  * Delegates to <code>std::isinf</code>.
14  *
15  * @param x Value to test.
16  * @return <code>true</code> if the value is infinite.
17  */
is_inf(double x)18 inline bool is_inf(double x) { return std::isinf(x); }
19 
20 }  // namespace math
21 }  // namespace stan
22 
23 #endif
24