-
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
numpy/numpy-user-dtypes
#211Description
print(np.sin(1e100))
print(np.sin(npq.QuadPrecision("1e100")))
print(np.sin(npq.QuadPrecision("1e100", backend="longdouble")))
# output
-0.3806377310050287
0.679816461925869553732614638474571
-0.380637731005028678854529289310449This is kind of expected, since using taylor expansion for large arguments can cause higher ULP.
A possible workaround in numpy_quaddtype is we can patch the trignometric functions to use any argument reduction strategies like Payne Hanek
@ngoldbaum what is your opinion here? We can also go in the current trivial way and mention in documentation about the working ranges but this won't be similar to NumPy's default behaviour as it seems to apply the reductions before trig functions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done