Skip to content

chore: bump github.com/shopspring/decimal from 1.4.0 to 1.6.0 - #1799

Merged
ernado merged 2 commits into
mainfrom
dependabot/go_modules/github.com/shopspring/decimal-1.6.0
Nov 16, 2026
Merged

ernado merged 2 commits into
mainfrom
dependabot/go_modules/github.com/shopspring/decimal-1.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Bumps github.com/shopspring/decimal from 1.4.0 to 1.6.0.

Release notes

Sourced from github.com/shopspring/decimal's releases.

v1.6.0

What's Changed

New Contributors

Full Changelog: shopspring/decimal@v1.5.0...v1.6.0

v1.5.0

Full Changelog can be found in CHANGELOG.md. Please read its BEHAVIOR CHANGES section before upgrading.

New Contributors

Changelog

Sourced from github.com/shopspring/decimal's changelog.

Decimal v1.6.0

BEHAVIOR CHANGES

  • Decimal implements fmt.Formatter. %#v prints Go code that recreates the value, like decimal.New(314, -2), instead of the struct fields, and verbs that don't apply, like %d, print %!d(decimal.Decimal=3.14). %v, %s, %q, %x and fmt.Println print the same as before #463
  • Ln rounds correctly, so some results change in the last digit: Ln of 10 to 5 places is 2.30259, not 2.30258 #471
  • ExpHullAbrham returns overallPrecision significant figures for every input. Negative inputs used to lose digits or return 0, like -50 at precision 10, and large inputs returned extra digits #429 #470
  • Scan converts float32 with NewFromFloat32, so 54.33 stays 54.33 instead of becoming 54.33000183105469. NaN and infinite floats return an error instead of panicking #469
  • On Go 1.10 to 1.12, NewFromFloat can pick a different shortest form in rare cases (golang/go#29491). It still converts back to the same float #431

FEATURES

  • Add BSON Decimal128 support for Decimal and NullDecimal with the official MongoDB Go driver v2, without a new dependency #460
  • Add %f formatting with precision, width and flags, like %.2f and %08.2f #463
  • Add Normalize, which strips trailing zeros so equal decimals also match with reflect.DeepEqual, testify and gomock #464
  • Add Sqrt and SqrtRound #465
  • Add Root and RootRound for n-th roots #473
  • Add NewFromBigFloat constructor #457
  • Scan accepts Decimal, big.Int, *big.Int and all integer sizes, as passed by ClickHouse and other drivers #469

ENHANCEMENTS

  • NewFromFloat and NewFromFloat32 are 3 to 6 times faster. They use strconv instead of a vendored copy of it from 2009, which is removed #431
  • Ln is 3 to 14 times faster #471
  • Slightly faster IsInteger and Ceil #299
  • NewFromString accepts the Unicode minus sign − (U+2212) #428
  • Scanning NULL into a Decimal returns an error that points to NullDecimal or *Decimal #474
  • Document that global settings aren't goroutine-safe, and list them with their per-call alternatives in the README #466
  • README: show how to control the JSON format of one field, add udecimal to the alternative libraries, and update the Go doc and playground links #475 #476 #264
  • Fix doc examples that were wrong or didn't compile #468
  • Fix benchmarks that measured their setup or the wrong function #467

BUGFIXES

  • QuoRem and DivRound panic on precision math.MinInt32 instead of returning a wrong quotient #472

Decimal v1.5.0

BEHAVIOR CHANGES

  • NewFromString and UnmarshalBinary, and so JSON, text, SQL, gob and Spanner decoding, reject exponents larger than the new MaxDecodeExponent setting (default 10,000). Such input could hang the process or use gigabytes of memory. Raise MaxDecodeExponent if you need larger exponents #440
  • Pow, PowWithPrecision, PowInt32 and PowBigInt round correctly. Results for fractional exponents have PowPrecisionNegativeExponent (16) decimal places, and negative powers that used to return 0 keep 16 significant digits, so 10^-18 is 0.000000000000000001. Results too large to represent return an error, or 0 from Pow, instead of hanging or panicking #439
  • RoundUp, RoundDown, RoundCeil and RoundFloor always return exponent -places, like Round. Values don't change, but Exponent(), Coefficient() and String() with TrimTrailingZeros = false can #426 #441
  • Truncate supports negative precision: 5432 truncated to -2 is 5400. Before, it returned 5432 unchanged #426
  • Shift panics when the exponent overflows an int32, instead of wrapping around #437
  • NewFromString rejects a sign right after a leading decimal point, such as ".-5" #447

FEATURES

  • Add TrimTrailingZeros and UseScientificNotation settings for string output #389 #416
  • Add Spanner support with EncodeSpanner and DecodeSpanner for Decimal and NullDecimal #395

ENHANCEMENTS

  • Most operations are faster and allocate less, about twice as fast on average across the benchmarks #444 #445 #446 #447 #448 #449 #451
  • Faster UnmarshalJSON, Scan and NewFromString #403
  • ExpHullAbrham raises its partial sum to a power by squaring. Large inputs that took minutes now take seconds #450

... (truncated)

Commits
  • 447b833 docs: changelog for v1.6.0 (#477)
  • 4ce352f fix: reject overflowing division precision (#472)
  • 540b915 docs: add udecimal to the alternative libraries (#476)
  • 5474883 docs: show how to control the JSON format of one field (#475)
  • ddb96d1 fix: clearer error when scanning NULL into a Decimal (#474)
  • 59f775d README: Fix URLs for the official Go pages (#264)
  • 100aebf feat: add Root and RootRound (#473)
  • bed77f5 fix: Ln rounds correctly, computed with error bounds like Pow (#471)
  • 37aad64 feat: add NewFromBigFloat constructor (#457)
  • 78a38f8 perf: NewFromFloat uses strconv, drop the vendored strconv copy (#431)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Nov 16, 2026
Bumps [github.com/shopspring/decimal](https://github.com/shopspring/decimal) from 1.4.0 to 1.6.0.
- [Release notes](https://github.com/shopspring/decimal/releases)
- [Changelog](https://github.com/shopspring/decimal/blob/master/CHANGELOG.md)
- [Commits](shopspring/decimal@v1.4.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/shopspring/decimal
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/github.com/shopspring/decimal-1.6.0 branch from fecedc3 to 97bf396 Compare November 16, 2026 07:12
[dependabot skip]
@ernado
ernado merged commit 98dae30 into main Nov 16, 2026
17 checks passed
@ernado
ernado deleted the dependabot/go_modules/github.com/shopspring/decimal-1.6.0 branch November 16, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant