SciPy

This is documentation for an old release of SciPy (version 1.5.3). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.special.tandg

scipy.special.tandg(x, out=None) = <ufunc 'tandg'>

Tangent of angle x given in degrees.

Parameters
xarray_like

Angle, given in degrees.

outndarray, optional

Optional output array for the function results.

Returns
scalar or ndarray

Tangent at the input.

See also

sindg, cosdg, cotdg

Examples

>>>
>>> import scipy.special as sc

It is more accurate than using tangent directly.

>>>
>>> x = 180 * np.arange(3)
>>> sc.tandg(x)
array([0., 0., 0.])
>>> np.tan(x * np.pi / 180)
array([ 0.0000000e+00, -1.2246468e-16, -2.4492936e-16])

Previous topic

scipy.special.sindg

Next topic

scipy.special.cotdg