1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_NOT_NAN_HPP 2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_NOT_NAN_HPP 14 template <
typename T_y,
bool is_vec>
16 static void check(
const char*
function,
const char* name,
const T_y& y) {
18 domain_error(
function, name, y,
"is ",
", but must not be nan!");
22 template <
typename T_y>
24 static void check(
const char*
function,
const char* name,
const T_y& y) {
44 template <
typename T_y>
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
size_t length(const std::vector< T > &x)
Returns the length of the provided std::vector.
static void check(const char *function, const char *name, const T_y &y)
void domain_error_vec(const char *function, const char *name, const T &y, size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
void check_not_nan(const char *function, const char *name, const T_y &y)
Check if y is not NaN.
static void check(const char *function, const char *name, const T_y &y)
T get(const std::vector< T > &x, size_t n)
Returns the n-th element of the provided std::vector.
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.