scipy.special.tandg#

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

以度為單位的角度 x 的正切。

參數:
xarray_like

角度,以度為單位。

outndarray, optional

函數結果的選用輸出陣列。

回傳值:
純量或 ndarray

輸入值的正切。

參見

sindg, cosdg, cotdg

範例

>>> import numpy as np
>>> import scipy.special as sc

它比直接使用正切更準確。

>>> 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])