1 #ifndef STAN_MATH_FWD_SCAL_FUN_IS_INF_HPP
2 #define STAN_MATH_FWD_SCAL_FUN_IS_INF_HPP
3 
4 #include <stan/math/fwd/core.hpp>
5 #include <stan/math/prim/scal/fun/is_inf.hpp>
6 
7 namespace stan {
8 namespace math {
9 
10 /**
11  * Returns 1 if the input's value is infinite and 0 otherwise.
12  *
13  * Delegates to <code>is_inf</code>.
14  *
15  * @param x Value to test.
16  * @return <code>1</code> if the value is infinite and <code>0</code> otherwise.
17  */
18 template <typename T>
is_inf(const fvar<T> & x)19 inline int is_inf(const fvar<T>& x) {
20   return is_inf(x.val());
21 }
22 
23 }  // namespace math
24 }  // namespace stan
25 #endif
26