Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quotient sign in remquo when the remainder is 0 #317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ararslan
Copy link
Member

The commit here is freebsd/freebsd-src@1cbd288, which fixed this upstream. The commit authorship is preserved, and the commit message is reproduced below:

Fix a bug in remquo{,f,l}, in which the quotient didn't always have the correct sign when the remainder was 0.

Fix a separate bug in remquo alone, in which the remainder and quotient were both off by a bit in certain cases involving subnormal remainders.

The bugs affected all platforms except amd64 and i386, on which the routines are implemented in assembly.

PR: 166463
Submitted by: Ilya Burylov
MFC after: 2 weeks

Fixes #283

…he correct sign when the remainder was 0.

Fix a separate bug in remquo alone, in which the remainder and
quotient were both off by a bit in certain cases involving subnormal
remainders.

The bugs affected all platforms except amd64 and i386, on which the
routines are implemented in assembly.

PR:		166463
Submitted by:	Ilya Burylov
MFC after:	2 weeks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C versions of remquo deliver wrong quotient if x == -y
1 participant