Repository navigation
Let Modf ask for the remainder rather than computing it - #711
Merged
Merged
Conversation
The node carried its own FlooredRemainder because the three numeric % operators each answered differently and none of them was the floored remainder it wanted. Since #708 they all are, so the helper says by hand what the operator now says, and the switch can go back to n1 % n2. Suite 4667 passed, 0 failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The follow-up I promised on #703.
Modfcarried a privateFlooredRemainderbecause, at the time it was written, the three numeric%operators each answered differently and none of them was the floored remainder the node wanted —Integerthrew on a negative divisor,Realtruncated,Rationalwas wrong. Since #708 landed they all are, so the helper now says by hand exactly what the operator says, and the switch goes back ton1 % n2.Net -15 lines, no behaviour change. Suite
Failed: 0, Passed: 4667, Skipped: 14, Total: 4681, with the 70 modulus tests from #703 and #709 passing unchanged — which is the point: they pin the four sign pairs, so if the operator and the helper had disagreed anywhere, they would say so.First PR from a branch on this repository rather than from my fork, now that the fork has served its purpose.