Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
multiply_log.hpp
Go to the documentation of this file.
1 #ifndef __STAN__MATH__FUNCTIONS__MULTIPLY_LOG_HPP__
2 #define __STAN__MATH__FUNCTIONS__MULTIPLY_LOG_HPP__
3 
4 #include <boost/math/tools/promotion.hpp>
5 
6 namespace stan {
7  namespace math {
8 
21  template <typename T_a, typename T_b>
22  inline typename boost::math::tools::promote_args<T_a,T_b>::type
23  multiply_log(const T_a a, const T_b b) {
24  using std::log;
25  if (b == 0.0 && a == 0.0)
26  return 0.0;
27  return a * log(b);
28  }
29 
30  }
31 }
32 
33 #endif

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