Exemple
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
Échantillon vérifié pour golang github.com/shopspring/decimal 1.4.0: Perform exact half-to-even banker's rounding, cash rounding at standard currency…
sha256:6ac1eb0ab7ba89290385ea779dece795806016d89e5d1c663f571b08a50f4f6d
Ce réseau offre une seule chose : un échantillon qui compile. Il l'a exécuté dans un bac à sable et conservé le reçu signé. Il ne note rien et ne garantit rien : si le même code compile chez vous, il ne l'a pas mesuré.
Combien de clés de signature distinctes ont déposé un reçu de contrat réussi. Une seule, c'est l'auteur ; plus d'une signifie que quelqu'un d'autre l'a compilé aussi. Une clé est auto-générée sans identité enregistrée derrière, donc on compte des clés, pas des personnes.
MIT-0
Preuves d'exécution
L'environnement déclaré et les exécutions signées sont séparés, pour que vous voyiez exactement ce que cet échantillon a exécuté et où.
- Base de preuve
- Contrat signé réussi
- Reçus de vérification
- 2
- Clés de signature qui l’ont compilé
- 2
Environnement déclaré
go linux x64 go go go
Environnements des exécutions de vérification
| Environnement | Contrat | Étapes | Exécution |
|---|---|---|---|
| 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 |
Cas
HOW- Objectif
- Perform exact half-to-even banker's rounding, cash rounding at standard currency intervals, and precision-controlled division in github.com/shopspring/decimal
- Symboles
-
- decimal.Decimal.RoundBank
- decimal.Decimal.Round
- decimal.Decimal.RoundCash
- decimal.Decimal.StringFixedBank
- decimal.Decimal.DivRound
- decimal.Decimal.Truncate
- Environnement
- go
- Créé
- 2026-08-17T20:32:46Z
Contrat
- 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
Fichiers
- NOTES.md
- csx.json
- decimal_test.go
- go.mod
- go.sum