autodiff.arccos¶
- autodiff.arccos(x)¶
Return the inverse cosine of x.
- Parameters
- xint, float, Dual
- Returns
- yfloat or Dual
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.Dual(0.5, 1) >>> ad.arccos(x) Dual(1.0471975511965976, array([-1.15470054]))
Derivative undefined:
>>> x = ad.Dual(1, 1) >>> ad.arccos(x) Traceback (most recent call last): ... ValueError: Derivative of arccos(x) is undefined for x = 1