Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fdim.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__FUNCTIONS__FDIM_HPP
2 #define STAN__MATH__FUNCTIONS__FDIM_HPP
3 
4 #include <math.h>
5 #include <boost/math/special_functions/fpclassify.hpp>
6 #include <boost/math/tools/promotion.hpp>
7 
8 namespace stan {
9  namespace math {
21  template <typename T1, typename T2>
22  inline typename boost::math::tools::promote_args<T1, T2>::type
23  fdim(T1 a, T2 b) {
25  return std::numeric_limits<typename boost::math::tools::promote_args<T1, T2>::type>
26  ::quiet_NaN();
27  return ::fdim(a, b);
28  }
29  }
30 }
31 
32 #endif
bool isnan(const stan::agrad::var &v)
Checks if the given number is NaN.
boost::math::tools::promote_args< T1, T2 >::type fdim(T1 a, T2 b)
The positive difference function (C99).
Definition: fdim.hpp:23

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