Stan Math Library
2.9.0
reverse mode automatic differentiation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
stan
math
prim
scal
fun
multiply_log.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_FUN_MULTIPLY_LOG_HPP
2
#define STAN_MATH_PRIM_SCAL_FUN_MULTIPLY_LOG_HPP
3
4
#include <boost/math/tools/promotion.hpp>
5
6
namespace
stan
{
7
namespace
math {
8
49
template
<
typename
T_a,
typename
T_b>
50
inline
typename
boost::math::tools::promote_args<T_a, T_b>::type
51
multiply_log
(
const
T_a a,
const
T_b b) {
52
using
std::log
;
53
if
(b == 0.0 && a == 0.0)
54
return
0.0;
55
return
a *
log
(b);
56
}
57
58
}
59
}
60
61
#endif
stan
Definition:
log_sum_exp.hpp:8
stan::math::log
fvar< T > log(const fvar< T > &x)
Definition:
log.hpp:15
stan::math::multiply_log
fvar< T > multiply_log(const fvar< T > &x1, const fvar< T > &x2)
Definition:
multiply_log.hpp:15
[
Stan Home Page
]
© 2011–2015, Stan Development Team.