1 #ifndef STAN_MATH_REV_CORE_STD_ISINF_HPP 2 #define STAN_MATH_REV_CORE_STD_ISINF_HPP 3 4 #include <stan/math/prim/fun/is_inf.hpp> 5 #include <stan/math/rev/core/var.hpp> 6 7 namespace std { 8 9 /** 10 * Return <code>1</code> if the specified argument is positive 11 * infinity or negative infinity and <code>0</code> otherwise. 12 * 13 * @param a Argument. 14 * @return 1 if argument is infinite and 0 otherwise. 15 */ isinf(const stan::math::var & a)16inline bool isinf(const stan::math::var& a) { 17 return stan::math::is_inf(a.val()); 18 } 19 20 } // namespace std 21 #endif 22