Update module github.com/shopspring/decimal to v1.5.0 #23

Merged
renovate[bot] merged 1 commits from renovate/all-digest into master 2026-10-06 04:11:15 +04:00
Collaborator

This PR contains the following updates:

Package Change Age Confidence
github.com/shopspring/decimal v1.4.0 → v1.5.0 age confidence

Release Notes

shopspring/decimal (github.com/shopspring/decimal)

v1.5.0

Compare Source

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
  • Document that NewFromFloat returns the shortest decimal that converts back to the same float, and how to convert large whole numbers exactly #​442
  • Split decimal.go into decimal.go, math.go and encoding.go #​452
  • Lint with golangci-lint in CI, and test on Go 1.26 and 1.27 #​453 #​454
BUGFIXES
  • Fix Float64 hanging on decimals with huge exponents #​438
  • Fix ExpHullAbrham returning 10^exp instead of 1 for tiny inputs #​433
  • Fix a data race in ExpTaylor #​414
  • Fix NumDigits for some exact powers of ten #​425
  • Fix the omitzero struct tag for Decimal fields in nested structs #​415
  • Fix RoundCash giving wrong results with a low DivisionPrecision #​443
  • NullDecimal is no longer Valid after a failed Scan, UnmarshalJSON or DecodeSpanner #​443

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/shopspring/decimal](https://github.com/shopspring/decimal) | `v1.4.0` → `v1.5.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshopspring%2fdecimal/v1.5.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshopspring%2fdecimal/v1.4.0/v1.5.0?slim=true) | --- ### Release Notes <details> <summary>shopspring/decimal (github.com/shopspring/decimal)</summary> ### [`v1.5.0`](https://github.com/shopspring/decimal/blob/HEAD/CHANGELOG.md#Decimal-v150) [Compare Source](https://github.com/shopspring/decimal/compare/v1.4.0...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 [#&#8203;440](https://github.com/shopspring/decimal/pull/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 [#&#8203;439](https://github.com/shopspring/decimal/pull/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 [#&#8203;426](https://github.com/shopspring/decimal/pull/426) [#&#8203;441](https://github.com/shopspring/decimal/pull/441) - `Truncate` supports negative precision: `5432` truncated to `-2` is `5400`. Before, it returned `5432` unchanged [#&#8203;426](https://github.com/shopspring/decimal/pull/426) - `Shift` panics when the exponent overflows an int32, instead of wrapping around [#&#8203;437](https://github.com/shopspring/decimal/pull/437) - `NewFromString` rejects a sign right after a leading decimal point, such as `".-5"` [#&#8203;447](https://github.com/shopspring/decimal/pull/447) ##### FEATURES - Add `TrimTrailingZeros` and `UseScientificNotation` settings for string output [#&#8203;389](https://github.com/shopspring/decimal/pull/389) [#&#8203;416](https://github.com/shopspring/decimal/pull/416) - Add Spanner support with `EncodeSpanner` and `DecodeSpanner` for `Decimal` and `NullDecimal` [#&#8203;395](https://github.com/shopspring/decimal/pull/395) ##### ENHANCEMENTS - Most operations are faster and allocate less, about twice as fast on average across the benchmarks [#&#8203;444](https://github.com/shopspring/decimal/pull/444) [#&#8203;445](https://github.com/shopspring/decimal/pull/445) [#&#8203;446](https://github.com/shopspring/decimal/pull/446) [#&#8203;447](https://github.com/shopspring/decimal/pull/447) [#&#8203;448](https://github.com/shopspring/decimal/pull/448) [#&#8203;449](https://github.com/shopspring/decimal/pull/449) [#&#8203;451](https://github.com/shopspring/decimal/pull/451) - Faster `UnmarshalJSON`, `Scan` and `NewFromString` [#&#8203;403](https://github.com/shopspring/decimal/pull/403) - `ExpHullAbrham` raises its partial sum to a power by squaring. Large inputs that took minutes now take seconds [#&#8203;450](https://github.com/shopspring/decimal/pull/450) - Document that `NewFromFloat` returns the shortest decimal that converts back to the same float, and how to convert large whole numbers exactly [#&#8203;442](https://github.com/shopspring/decimal/pull/442) - Split `decimal.go` into `decimal.go`, `math.go` and `encoding.go` [#&#8203;452](https://github.com/shopspring/decimal/pull/452) - Lint with golangci-lint in CI, and test on Go 1.26 and 1.27 [#&#8203;453](https://github.com/shopspring/decimal/pull/453) [#&#8203;454](https://github.com/shopspring/decimal/pull/454) ##### BUGFIXES - Fix `Float64` hanging on decimals with huge exponents [#&#8203;438](https://github.com/shopspring/decimal/pull/438) - Fix `ExpHullAbrham` returning `10^exp` instead of 1 for tiny inputs [#&#8203;433](https://github.com/shopspring/decimal/pull/433) - Fix a data race in `ExpTaylor` [#&#8203;414](https://github.com/shopspring/decimal/pull/414) - Fix `NumDigits` for some exact powers of ten [#&#8203;425](https://github.com/shopspring/decimal/pull/425) - Fix the `omitzero` struct tag for `Decimal` fields in nested structs [#&#8203;415](https://github.com/shopspring/decimal/pull/415) - Fix `RoundCash` giving wrong results with a low `DivisionPrecision` [#&#8203;443](https://github.com/shopspring/decimal/pull/443) - `NullDecimal` is no longer `Valid` after a failed `Scan`, `UnmarshalJSON` or `DecodeSpanner` [#&#8203;443](https://github.com/shopspring/decimal/pull/443) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzguMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImF1dG9tYXRlZCIsImRlcGVuZGVuY2llcyJdfQ==-->
renovate[bot] added 1 commit 2026-10-06 04:11:15 +04:00
Update module github.com/shopspring/decimal to v1.5.0
Deploy / Test, build and deploy (push) Failing after 1m28s
60725c88e8
renovate[bot] scheduled this pull request to auto merge when all checks succeed 2026-10-06 04:11:15 +04:00
renovate[bot] merged commit 60725c88e8 into master 2026-10-06 04:11:15 +04:00
renovate[bot] deleted branch renovate/all-digest 2026-10-06 04:11:15 +04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: valentineus/overnight-trading-bot#23