1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_NOT_NAN_HPP
2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_NOT_NAN_HPP
15 template <
typename T_y,
bool is_vec>
17 static bool check(
const char*
function,
22 "is ",
", but must not be nan!");
27 template <
typename T_y>
28 struct not_nan<T_y, true> {
29 static bool check(
const char*
function,
35 "is ",
", but must not be nan!");
59 template <
typename T_y>
63 return not_nan<T_y, is_vector_like<T_y>::value>
64 ::check(
function, name, y);
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
size_t length(const std::vector< T > &x)
void domain_error_vec(const char *function, const char *name, const T &y, const size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
T get(const std::vector< T > &x, size_t n)
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.