1 #ifndef STAN__MATH__ERROR_HANDLING_CHECK_NOT_NAN_HPP
2 #define STAN__MATH__ERROR_HANDLING_CHECK_NOT_NAN_HPP
6 #include <boost/math/special_functions/fpclassify.hpp>
13 template <
typename T_y,
typename T_result,
bool is_vec>
15 static bool check(
const char*
function,
21 " is %1%, but must not be nan!",
"",
27 template <
typename T_y,
typename T_result>
28 struct not_nan<T_y, T_result, true> {
29 static bool check(
const char*
function,
37 " is %1%, but must not be nan!",
"",
55 template <
typename T_y,
typename T_result>
60 return not_nan<T_y,T_result,is_vector_like<T_y>::value>
61 ::check(
function, y, name, result);
bool isnan(const stan::agrad::var &v)
Checks if the given number is NaN.
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 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)
bool check_not_nan(const char *function, const T_y &y, const char *name, T_result *result)
Checks if the variable y is nan.
T get(const T &x, size_t n)