shopspring/decimal
Arbitrary-precision fixed-point decimal numbers in Go observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 98
- Release rhythm 8
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4207
- days_rel: n/a
- days_push: 14
- n_releases_24m: 0
Adoption not part of the score
7469 stars · 673 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Go library providing arbitrary-precision fixed-point decimal numbers to avoid floating-point rounding errors. It supports arithmetic operations, database/sql, JSON, and XML serialization.
Use cases
- calculate money amounts without floating point errors
- exact decimal arithmetic in Go
- store prices in a database with decimal precision
- parse decimal strings like 0.1 accurately
- compute taxes and fees with no precision loss
When to choose
- you need lossless addition, subtraction, and multiplication of decimals
- you work with monetary values or billing in Go
- you need database/sql and JSON serialization for decimals
When to avoid
- you need extremely high performance and can tolerate limited precision (consider alpacahq/alpacadecimal or govalues/decimal)
- you need mutable big-decimal semantics with a richer API (consider cockroachdb/apd)
Facets
library · maturity stable
math serialization fintech developer-tools e-commerce go decimal-arithmetic fixed-point money arbitrary-precision financial-calculations
1 source
- readme: https://github.com/shopspring/decimal · fetched 2026-08-28 · b36221e87f82
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| shopspring/decimal | main | 67 |
For agents
markdown · JSON · MCP: product_card(name="shopspring/decimal")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem