Stan Math Library
4.9.0
Automatic Differentiation
|
Division operator for two variables (C++).
The partial derivatives for the variables are
\(\frac{\partial}{\partial x} (x/y) = 1/y\), and
\(\frac{\partial}{\partial y} (x/y) = -x / y^2\).
\[ \mbox{operator/}(x, y) = \begin{cases} \frac{x}{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 x} = \begin{cases} \frac{1}{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} -\frac{x}{y^2} & \mbox{if } -\infty\leq x, y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN or } y = \textrm{NaN} \end{cases} \]
dividend | First variable operand. |
divisor | Second variable operand. |
Definition at line 61 of file operator_division.hpp.