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

◆ atan() [7/9]

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

Return the principal value of the arc tangent, in radians, of the specified variable (cmath).

The derivative is defined by

\(\frac{d}{dx} \arctan x = \frac{1}{1 + x^2}\).

\[ \mbox{atan}(x) = \begin{cases} \arctan(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

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

\[ \frac{\partial \, \arctan(x)}{\partial x} = \frac{1}{x^2+1} \]

Parameters
xVariable in range [-1, 1].
Returns
Arc tangent of variable, in radians.

Definition at line 51 of file atan.hpp.