# naginterfaces.library.specfun.tan¶

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

tan returns the value of the circular tangent, .

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

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/s/s07aaf.html

Parameters
xfloat

The argument of the function.

Returns
txfloat

The value of the circular tangent, .

Raises
NagValueError
(errno )

On entry, and the constant .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

On entry, and the constant .

The function has been called with an argument that is too close to an odd multiple of , at which the function is infinite; the function has returned a value with the correct sign but a more or less arbitrary but large magnitude.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

tan calculates an approximate value for the circular tangent of its argument, . It is based on the Chebyshev expansion

where and .

The reduction to the standard range is accomplished by taking

where is an integer and ,

i.e., where .

From the properties of it follows that

References

NIST Digital Library of Mathematical Functions