Stan Math Library  2.20.0
reverse mode automatic differentiation
is_nan.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_IS_NAN_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_IS_NAN_HPP
3 
5 #include <cmath>
6 
7 namespace stan {
8 namespace math {
9 
18 template <typename T>
19 inline typename std::enable_if_t<std::is_arithmetic<T>::value, bool> is_nan(
20  T x) {
21  return std::isnan(x);
22 }
23 
24 } // namespace math
25 } // namespace stan
26 
27 #endif
int isnan(const stan::math::var &a)
Checks if the given number is NaN.
Definition: std_isnan.hpp:18
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.