Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ multiply_log() [6/10]

template<typename T_a , typename T_b , require_all_arithmetic_t< T_a, T_b > * = nullptr>
return_type_t< T_a, T_b > stan::math::multiply_log ( const T_a  a,
const T_b  b 
)
inline

Calculate the value of the first argument times log of the second argument while behaving properly with 0 inputs.

\( a * \log b \).

\[ \mbox{multiply\_log}(x, y) = \begin{cases} 0 & \mbox{if } x=y=0\\ x\ln y & \mbox{if } x, y\neq 0 \\[6pt] \end{cases} \]

\[ \frac{\partial\, \mbox{multiply\_log}(x, y)}{\partial x} = \begin{cases} \ln y \\[6pt] \end{cases} \]

\[ \frac{\partial\, \mbox{multiply\_log}(x, y)}{\partial y} = \begin{cases} \frac{x}{y} \\[6pt] \end{cases} \]

Template Parameters
T_atype of the first variable
T_btype of the second variable
Parameters
athe first variable
bthe second variable
Returns
a * log(b)

Definition at line 49 of file multiply_log.hpp.