Skip to content

Releases: anz-bank/decimal

v1.9.0

18 Aug 06:41
778691a
Compare
Choose a tag to compare

Performance tweaks

  • Faster parsing and formatting

v1.8.0: performance fixes (#81)

16 Aug 23:22
dd0c83a
Compare
Choose a tag to compare
  • Much faster Quo
  • New Int64x behaves the same as Int64 but reports whether the conversion was exact.
  • ScaleB/ScaleBInt return a * 10^b.
  • Precook small integers [-10, 10].
  • make profile convenience rule

v1.7.0

15 Aug 23:49
17842dd
Compare
Choose a tag to compare
  • Simpler formatter
  • Precalculate 128-bit 10ⁱ

v1.6.0

15 Aug 02:10
04a4ec5
Compare
Choose a tag to compare
  • improve rounding algo, support half-up rounding
  • support context-controlled parsing
  • add make lint
  • fix formatting regression

v1.5.0

11 Aug 01:08
746985c
Compare
Choose a tag to compare

Context64.Rounding is now exported, providing access to alternate rounding strategies.

v1.4.0

10 Aug 15:30
b2d43eb
Compare
Choose a tag to compare
  • Improve formatting of large and small exponents.
  • Add two new methods.
    • Decimal64.Round rounds a number against a reference power of ten.
    • Decimal64.ToIntegral rounds a number to a whole number (equivalent to Round with 1 as the reference).

v1.3.0

09 Aug 15:25
751da49
Compare
Choose a tag to compare

Fix formatting issues with extremely large and small numbers when using fixed precision.

v1.2.0

09 Aug 14:12
a769a4d
Compare
Choose a tag to compare

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

v1.1.0

23 Jul 07:31
51bacdb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.1.0

First release

20 Jan 00:28
ed1ea41
Compare
Choose a tag to compare
Support 32 bit architectures

Makes troublesome consts uint64's to stop integer overflow from implicit typecasting into 32 bit integers in 32 bit systems.