Stan Math Library  2.8.0
reverse mode automatic differentiation
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
fdim.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_FDIM_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_FDIM_HPP
3 
4 #include <math.h>
5 #include <boost/math/special_functions/fpclassify.hpp>
6 #include <boost/math/tools/promotion.hpp>
7 #include <cmath>
8 #include <limits>
9 
10 namespace stan {
11  namespace math {
12 
24  template <typename T1, typename T2>
25  inline typename boost::math::tools::promote_args<T1, T2>::type
26  fdim(T1 a, T2 b) {
28  using std::numeric_limits;
29  using boost::math::tools::promote_args;
31  return numeric_limits<typename promote_args<T1, T2>::type>::quiet_NaN();
32  return fdim(a, b);
33  }
34  }
35 }
36 
37 #endif
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
Definition: boost_isnan.hpp:22
fvar< T > fdim(const fvar< T > &x1, const fvar< T > &x2)
Definition: fdim.hpp:11
var fdim(const stan::math::var &a, const double &b)
Return the positive difference between the first variable's value and the second value (C99)...
Definition: fdim.hpp:158

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