You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following test program uses all three of remquof, remquo and remquol to compute the remainder of −3 mod +3. The remainder should be zero, and the quotient should be (some low bits of) −1.
The following test program uses all three of
remquof
,remquo
andremquol
to compute the remainder of −3 mod +3. The remainder should be zero, and the quotient should be (some low bits of) −1.Compiling openlibm for amd64, so that these functions are provided by
amd64/s_remquo.S
and friends, this behaves as expected:But on aarch64, where the C versions in
src/s_remquo.c
and friends are used, the wrong quotient is delivered:Looking at the source code, it appears that there's a special case for |x| = |y|, which always sets
*quo = 1
without checking signs.(Tested against the current HEAD, commit 12f5ffc, in each case.)
The text was updated successfully, but these errors were encountered: