Loading web-font TeX/Main/Regular
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ operator/() [16/20]

var stan::math::operator/ ( const var dividend,
const var divisor 
)
inline

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}

Parameters
dividendFirst variable operand.
divisorSecond variable operand.
Returns
Variable result of dividing the first variable by the second.

Definition at line 61 of file operator_division.hpp.