1 #ifndef STAN__MATH__ERROR_HANDLING_CHECK_FINITE_HPP
2 #define STAN__MATH__ERROR_HANDLING_CHECK_FINITE_HPP
6 #include <boost/math/special_functions/fpclassify.hpp>
13 template <
typename T_y,
17 static bool check(
const char*
function,
23 " is %1%, but must be finite!",
"",
29 template <
typename T_y,
typename T_result>
30 struct finite<T_y, T_result, true> {
31 static bool check(
const char*
function,
36 for (
size_t n = 0; n <
length(y); n++) {
39 " is %1%, but must be finite!",
"",
51 template <
typename T_y,
typename T_result>
56 return finite<T_y,T_result,is_vector_like<T_y>::value>
57 ::check(
function, y, name, result);
bool dom_err(const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, T_result *result)
bool isfinite(const stan::agrad::var &v)
Checks if the given number has finite value.
bool check_finite(const char *function, const T_y &y, const char *name, T_result *result)
Checks if the variable y is finite.
bool dom_err_vec(const size_t i, const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, T_result *result)
T get(const T &x, size_t n)