Releases: anz-bank/decimal
Releases · anz-bank/decimal
v1.9.0
v1.8.0: performance fixes (#81)
v1.7.0
v1.6.0
v1.5.0
v1.4.0
v1.3.0
v1.2.0
tl;dr: Better testing + more useful methods + debug info + more docs
- Now all dectests in scope are individually wrapped in a
t.Run
- Previously relied on manual inspection of test results
decimal_debug
compiler tag injects helpful debug info to everyDecimal64
instance- A compiler tag ensures zero cost when not compiled in. Use only for interactive debugging.
- New
Decimal64
methodsMin
/Max
/MinMag
/MaxMag
returns smallest/largest in absolute and magnitude termsLogb
returns integral log10 (the exponent, essentially)CopySign
combines the value of one number but gives it the ± from anotherNextPlus
/NextMinus
returns the nearest neighbor above or below a number
- Add support for output precision (e.g.,
%.10f
) when formatting decimals%g
still pending- width (
%06f
) still pending
- Pin
go.mod
and CI to Go 1.20+ - Upgrade CI actions
- Helpful usage notes in README.md
Breaking change:
- Change
Decimal64.MarshalText
method signature to conform toencoding.TextMarshaler
- Breaking change was unavoidable to implement interface
v1.1.0
First release
Support 32 bit architectures Makes troublesome consts uint64's to stop integer overflow from implicit typecasting into 32 bit integers in 32 bit systems.