is_nan.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_SCAL_FUN_IS_NAN_HPP
2 #define STAN_MATH_FWD_SCAL_FUN_IS_NAN_HPP
3 
4 #include <stan/math/fwd/core.hpp>
6 
7 namespace stan {
8 namespace math {
9 
10 /**
11  * Returns 1 if the input's value is NaN and 0 otherwise.
12  *
13  * Delegates to <code>is_nan</code>.
14  *
15  * @param x Value to test.
16  * @return <code>1</code> if the value is NaN and <code>0</code> otherwise.
17  */
18 template <typename T>
19 inline int is_nan(const fvar<T>& x) {
20  return is_nan(x.val());
21 }
22 
23 } // namespace math
24 } // namespace stan
25 #endif
T val() const
Definition: fvar.hpp:58
int is_nan(const fvar< T > &x)
Definition: is_nan.hpp:19