np.mod(np.cosh(QuadPrecision("-11357.216553474703894801348310092223")), QuadPrecision("-1.7976931345860068e+308"))
# prints QuadPrecision('1.145669756344548161919429759370211e+4898', backend='sleef')
np.mod should return a result with the same sign as the divisor, her negative, and it should be in range of the absolute value of the divisor.
The issue likely comes from rounding errors in
|
Sleef_quad quotient = Sleef_divq1_u05(*a, *b); |
|
Sleef_quad floored = Sleef_floorq1(quotient); |
|
Sleef_quad product = Sleef_mulq1_u05(floored, *b); |
|
Sleef_quad result = Sleef_subq1_u05(*a, product); |
np.modshould return a result with the same sign as the divisor, her negative, and it should be in range of the absolute value of the divisor.The issue likely comes from rounding errors in
numpy-quaddtype/src/include/ops.hpp
Lines 645 to 648 in 156edad