Repository navigation
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_debugcompiler tag injects helpful debug info to everyDecimal64instance- A compiler tag ensures zero cost when not compiled in. Use only for interactive debugging.
- New
Decimal64methodsMin/Max/MinMag/MaxMagreturns smallest/largest in absolute and magnitude termsLogbreturns integral log10 (the exponent, essentially)CopySigncombines the value of one number but gives it the ± from anotherNextPlus/NextMinusreturns the nearest neighbor above or below a number
- Add support for output precision (e.g.,
%.10f) when formatting decimals%gstill pending- width (
%06f) still pending
- Pin
go.modand CI to Go 1.20+ - Upgrade CI actions
- Helpful usage notes in README.md
Breaking change:
- Change
Decimal64.MarshalTextmethod signature to conform toencoding.TextMarshaler- Breaking change was unavoidable to implement interface