Describe your issue.
scipy.special.sindg(x) computes the sine of x where x is measured in degree. It returns 0.0 when x > 1e14.
From the source code it appears this behavior is expected. However, when I use Jupyter Notebook I didn’t get an error or warning message and the function “silently” returned zero.
Though the large argument is probably not so commonly used in practice, it may still be desirable to support it if possible. (One possibility is to provide a function that converts degree to radian and reduce it into [-pi,pi] in one step.)
Reproducing Code Example
import scipy.special
print(scipy.special.sindg(2e14))
# prints 0.0
# expects sindg(2e14 % 360) = sindg(200) = -0.34
Error message
SciPy/NumPy/Python version and system information
SciPy 1.12 / Python 3.10 / Windows, though I think the issue is platform independent and also exists in HEAD.
Describe your issue.
scipy.special.sindg(x)computes the sine ofxwherexis measured in degree. It returns0.0whenx > 1e14.From the source code it appears this behavior is expected. However, when I use Jupyter Notebook I didn’t get an error or warning message and the function “silently” returned zero.
Though the large argument is probably not so commonly used in practice, it may still be desirable to support it if possible. (One possibility is to provide a function that converts degree to radian and reduce it into
[-pi,pi]in one step.)Reproducing Code Example
Error message
SciPy/NumPy/Python version and system information
SciPy 1.12 / Python 3.10 / Windows, though I think the issue is platform independent and also exists in HEAD.