Skip to content

v1.2.0

Choose a tag to compare

@anzdaddy anzdaddy released this 09 Aug 14:12
· 17 commits to master since this release
a769a4d

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 every Decimal64 instance
    • A compiler tag ensures zero cost when not compiled in. Use only for interactive debugging.
  • New Decimal64 methods
    • Min/Max/MinMag/MaxMag returns smallest/largest in absolute and magnitude terms
    • Logb returns integral log10 (the exponent, essentially)
    • CopySign combines the value of one number but gives it the ± from another
    • NextPlus/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 to encoding.TextMarshaler
    • Breaking change was unavoidable to implement interface