Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs 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 <boost/math/tools/promotion.hpp>
5 
6 namespace stan {
7  namespace math {
19  template <typename T1, typename T2>
20  inline typename boost::math::tools::promote_args<T1, T2>::type
21  fdim(T1 a, T2 b) {
22  return (a > b) ? (a - b) : 0.0;
23  }
24  }
25 }
26 
27 #endif

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