-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Go] Decimal types GetOneForMarshal loses precision #40693
Copy link
Copy link
Closed
Description
Describe the bug, including details regarding any error messages, version, and platform.
Decimal types seem to lose precision with GetOneForMarshal.
// Decimal128(38,20)
expected: "0.99"
actual : "0.99000000000000000000189735380184963276"
expected: "1234567890.123456789"
actual : "1234567890.1234567890000000000059023411"
// Decimal256(50,25)
expected: "0.99"
actual : "0.9899999999999999103090032649279560980669703806889"
expected: "1234567890.123456789"
actual : "1234567890.1234566771518943399663035833026736798823"
Will follow up with a PR including these tests.
Component(s)
Go
Reactions are currently unavailable