Sample
github.com/shopspring/decimal 1.4.0: Perform exact half-to-even banker's rounding, cash rounding at standard currency intervals, and precision-controlled division in github.com/shopspring/decimal
Verified sample for golang github.com/shopspring/decimal 1.4.0: Perform exact half-to-even banker's rounding, cash rounding at standard currency intervals…
sha256:6ac1eb0ab7ba89290385ea779dece795806016d89e5d1c663f571b08a50f4f6d
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 2
- Signing keys that built it
- 2
Declared environment
go linux x64 go go go
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-17 |
| go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-18 |
Case
HOW- Goal
- Perform exact half-to-even banker's rounding, cash rounding at standard currency intervals, and precision-controlled division in github.com/shopspring/decimal
- Packages
- Symbols
-
- decimal.Decimal.RoundBank
- decimal.Decimal.Round
- decimal.Decimal.RoundCash
- decimal.Decimal.StringFixedBank
- decimal.Decimal.DivRound
- decimal.Decimal.Truncate
- Environment
- go
- Created
- 2026-08-17T20:32:46Z
Contract
- decimal.Decimal.RoundBank rounds to the nearest even number when equidistant and rounds integer powers when places is negative, whereas Round rounds half away from zero
- assert decimal.Decimal.StringFixedBank and StringFixed format rounded strings with exact decimal place zero padding
- assert decimal.Decimal.RoundCash rounds to intervals of 5, 10, 25, 50, or 100 cents and panics on unsupported intervals
- assert decimal.Decimal.DivRound divides and rounds quotient to specified decimal places whereas Div uses DivisionPrecision
- assert decimal.Decimal.Truncate strips digits beyond specified precision without rounding
Files
- NOTES.md
- csx.json
- decimal_test.go
- go.mod
- go.sum