Fix VpDivd to fully use quotient array#377
Merged
tompng merged 1 commit intoruby:masterfrom Jul 16, 2025
Merged
Conversation
c34a916 to
b54e1b4
Compare
b54e1b4 to
38e449b
Compare
VpDivd was using 1-index in quotient and remainder digits array. c->frac[0] and r->frac[0] was always zero. Fix to use 0-index. Required MaxPrec of remainder reduces. Add Test for VpDivd expected calculation.
38e449b to
b994982
Compare
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.
VpDivd was using 1-index in quotient and remainder digits array.
c->frac[0]andr->frac[0]was always zero.Fix to use 0-index. Required MaxPrec of remainder reduces.
Adds a direct test for VpDivd and VpMult.
Added methods
BigDecimal#vpdivdBigDecimal#vpmultare enabled only in test build.test_vpdivd_with_oneandtest_vpdivd_intermediate_zeroare tests for bug found and fixed in #374