1 #ifndef STAN_MATH_PRIM_SCAL_FUN_ISNAN_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_ISNAN_HPP
3 
4 #include <stan/math/prim/meta.hpp>
5 #include <stan/math/prim/fun/is_nan.hpp>
6 
7 namespace stan {
8 namespace math {
9 
10 /**
11  * Return true if specified argument is not-a-number.
12  *
13  * Overloads `std::isnan` from `<cmath>` for argument-dependent
14  * lookup.
15  *
16  * @tparam ADType type of argument
17  * @param[in] x argument
18  * @return true if argument is not-a-number
19  */
20 template <typename T, typename = require_autodiff_t<T>>
isnan(const T & x)21 inline bool isnan(const T& x) {
22   return is_nan(x);
23 }
24 
25 }  // namespace math
26 }  // namespace stan
27 
28 #endif
29