Conversation
Contributor
Author
|
I think this PR be able to backport to 9.3.x |
Member
|
@k77ch7 Can you rebase this against jruby-9.3? I think it should go back to 9.3 as well. If I change base to jruby-9.3 using PR it ends up being the worlds largest merge :) |
This commit changes the way to get the digits of an integer. In Java, the Math.log10 function treats a long as double type. When an integer is large, a rounding error occurs and sizeWithDecimalString function gets the wrong digits.
750a078 to
34df0af
Compare
Contributor
Author
|
@enebo I finish rebasing this against jruby-9.3. |
Member
|
Thanks @k77ch7 ... In what is becoming a pattern ... I wonder if we have this rounding problem elsewhere? :) |
Contributor
Author
|
@enebo I'm not sure about that... |
Member
|
@k77ch7 All fixes on jruby-9.3 will merge to master periodically. So we will get this fix there pretty soon. |
Contributor
Author
|
@enebo Thanks. I understand. |
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.
This commit changes the way to get the digits of an integer.
In Java, the Math.log10 function treats a long as double type.
When an integer is large, a rounding error occurs and sizeWithDecimalString function gets the wrong digits.