naginterfaces.library.specfun.tanh

naginterfaces.library.specfun.tanh(x)[source]

tanh returns a value for the hyperbolic tangent, .

For full information please refer to the NAG Library document for s10aa

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s10aaf.html

Parameters
xfloat

The argument of the function.

Returns
thxfloat

The value of the hyperbolic tangent, .

Notes

tanh calculates an approximate value for the hyperbolic tangent of its argument, .

For it is based on the Chebyshev expansion

where .

For

For , to within the representation accuracy of the machine and so this approximation is used.

References

NIST Digital Library of Mathematical Functions