-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Go] rounding errors in decimal256 string functions #38395
Comments
zeroshade
added a commit
to zeroshade/arrow
that referenced
this issue
Oct 23, 2023
zeroshade
added a commit
that referenced
this issue
Oct 24, 2023
…8426) ### Rationale for this change Slight modifications to the `ToString` and `FromString` methods of decimal 256 to ensure proper accurate and proper conversion given precision and scale. ### Are these changes tested? Yes * Closes: #38395 Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
JerAguilon
pushed a commit
to JerAguilon/arrow
that referenced
this issue
Oct 25, 2023
…ns (apache#38426) ### Rationale for this change Slight modifications to the `ToString` and `FromString` methods of decimal 256 to ensure proper accurate and proper conversion given precision and scale. ### Are these changes tested? Yes * Closes: apache#38395 Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
@zeroshade Thanks for the fix. I did some testing.
fails with
|
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this issue
Nov 13, 2023
…ns (apache#38426) ### Rationale for this change Slight modifications to the `ToString` and `FromString` methods of decimal 256 to ensure proper accurate and proper conversion given precision and scale. ### Are these changes tested? Yes * Closes: apache#38395 Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…ns (apache#38426) ### Rationale for this change Slight modifications to the `ToString` and `FromString` methods of decimal 256 to ensure proper accurate and proper conversion given precision and scale. ### Are these changes tested? Yes * Closes: apache#38395 Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are rounding errors when constructing decimal256 values from string and when serializing them to string.
Affected version: main branch, v13 (maybe even older versions).
Similar issues were already reported in the past (#35310).
fails with
The hex numbers show that the error is in the FromString function.
However, there are also rounding issues in the ToString function:
fails with
In case of ToString it seem to be off-by-one errors only.
Component(s)
Go
The text was updated successfully, but these errors were encountered: