8000 Release 1.0.0: Fix Floor() and Ceil() for integer values (#64) · zhanglei/decimal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

1.0.0

@tbrs tbrs tagged this 08 Nov 22:52
Implementation of aforementioned methods applied an integer multiplier
to int part, and rejected the exponent. This did not work well for
positive exponent values - multiplier was supposed to be a non-integer
value less than 1, but was rounded up to it. This caused different
results for equal Decimal values like decimal.New(19, 1) and
decimal.New(1900, -1).

Now functions return the receiver if it represents an integer value.
This also reduces execution time for previously broken cases.
Assets 2
Loading
0