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

◆ operator*() [14/20]

var stan::math::operator* ( const var a,
const var b 
)
inline

Multiplication operator for two variables (C++).

The partial derivatives are

\(\frac{\partial}{\partial x} (x * y) = y\), and

\(\frac{\partial}{\partial y} (x * y) = x\).

\[ \mbox{operator*}(x, y) = \begin{cases} xy & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{operator*}(x, y)}{\partial x} = \begin{cases} y & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{operator*}(x, y)}{\partial y} = \begin{cases} x & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \]

Parameters
aFirst variable operand.
bSecond variable operand.
Returns
Variable result of multiplying operands.

Definition at line 76 of file operator_multiplication.hpp.