scipy.special.cotdg#

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

以度為單位給定的角度 x 的餘切。

參數:
xarray_like

角度,以度為單位給定。

outndarray,可選

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

返回:
純量或 ndarray

輸入值的餘切。

參見

sindg, cosdg, tandg

範例

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

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

>>> x = 90 + 180 * np.arange(3)
>>> sc.cotdg(x)
array([0., 0., 0.])
>>> 1 / np.tan(x * np.pi / 180)
array([6.1232340e-17, 1.8369702e-16, 3.0616170e-16])