brick/math
Arbitrary-precision arithmetic library for PHP observed · 2026-10-09
Health v2 · maintenance only
96/100
- Activity 96
- Release rhythm 95
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 9.5
- age_days: 4433
- days_rel: 38
- days_push: 25
- n_releases_24m: 25
Adoption not part of the score
2175 stars · 102 forks observed · 2026-10-09
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A PHP library for arbitrary-precision arithmetic providing BigInteger, BigDecimal, and BigRational classes. It automatically uses the fastest available calculator implementation (GMP, BCMath, or a pure-PHP fallback).
Use cases
- do exact math with very large integers in PHP
- handle money calculations without floating-point errors
- work with arbitrary precision decimal numbers
- compute with rational numbers and fractions
- avoid integer overflow in PHP calculations
When to choose
- you need exact arithmetic beyond PHP's native int/float limits
- you want a well-tested, production-ready precision math library with optional GMP/BCMath acceleration
When to avoid
- you only need standard floating-point math
- you're on PHP < 8.2 and can't use an older release branch
Facets
library · maturity stable
math developer-tools php arbitrary-precision biginteger bigdecimal bigrational gmp bcmath algorithms
1 source
- readme: https://github.com/brick/math · fetched 2026-10-09 · 6a6e9504f9ef
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| brick/math | main | 96 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem