autodiff.reverse.arccos

autodiff.reverse.arccos(x)

Return the inverse cosine of x.

Parameters
xint, float, Node
Returns
yfloat or Node

Notes

The derivative of arccos(x) is undefined when x is not in the range (-1, 1).

Examples

>>> ad.arccos(1)
0.0
>>> x = ad.Node(0.5)
>>> ad.arccos(x)
Node(1.0471975511965979)

Derivative undefined:

>>> x = ad.Node(1)
>>> ad.arccos(x)
Traceback (most recent call last):
...
ValueError: Derivative of arcsin(x) is undefined for x = 1