Stan Math Library  2.20.0
reverse mode automatic differentiation
is_any_nan.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IS_ANY_NAN_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_IS_ANY_NAN_HPP
3 
5 #include <utility>
6 
7 namespace stan {
8 namespace math {
9 
20 template <typename T>
21 inline bool is_any_nan(const T& x) {
22  return is_nan(x);
23 }
24 
34 template <typename T, typename... Ts>
35 inline bool is_any_nan(const T& x, const Ts&... xs) {
36  return is_any_nan(x) || is_any_nan(std::forward<const Ts>(xs)...);
37 }
38 } // namespace math
39 } // namespace stan
40 
41 #endif
bool is_any_nan(const T &x)
Returns true if the input is NaN and false otherwise.
Definition: is_any_nan.hpp:21
int is_nan(const fvar< T > &x)
Returns 1 if the input&#39;s value is NaN and 0 otherwise.
Definition: is_nan.hpp:20

     [ Stan Home Page ] © 2011–2018, Stan Development Team.