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

◆ acos() [7/9]

var stan::math::acos ( const var x)
inline

Return the principal value of the arc cosine of a variable, in radians (cmath).

The derivative is defined by

\(\frac{d}{dx} \arccos x = \frac{-1}{\sqrt{1 - x^2}}\).

\[ \mbox{acos}(x) = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \arccos(x) & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x > 1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{acos}(x)}{\partial x} = \begin{cases} \textrm{NaN} & \mbox{if } x < -1\\ \frac{\partial\, \arccos(x)}{\partial x} & \mbox{if } -1\leq x\leq 1 \\ \textrm{NaN} & \mbox{if } x < -1\\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

\[ \frac{\partial \, \arccos(x)}{\partial x} = -\frac{1}{\sqrt{1-x^2}} \]

Parameters
xargument
Returns
Arc cosine of variable, in radians.

Definition at line 55 of file acos.hpp.