autodiff.tanh

autodiff.tanh(x)

Return the hyperbolic tangent of x.

Parameters
xint, float, Dual
Returns
yfloat or Dual

Examples

>>> ad.tanh(1)
0.7615941559557649
>>> x = ad.Dual(1, 1)
>>> ad.tanh(x)
Dual(0.7615941559557649, array([0.41997434]))