Reorganize math package into subpackages

- Create math/big for big.Int utilities (HexOrDecimal256, U256, parsing)
- Create math/safe for overflow-safe arithmetic (SafeAdd, SafeMul, etc.)
- Move averager files to root package level
- Add re-exports in root package for backwards compatibility
- Update README with new package structure documentation
- Remove old math/meter directory (consolidated elsewhere)
- Remove redundant math/ subdirectory structure
This commit is contained in:
Zach Kelling
2026-01-03 18:22:33 -08:00
parent 7870d52f6f
commit fd27f2ecb0
25 changed files with 270 additions and 614 deletions
+7 -1
View File
@@ -2,4 +2,10 @@ module github.com/luxfi/math
go 1.25.5
require github.com/luxfi/sampler v1.0.0
require (
github.com/luxfi/math/big v1.0.0
github.com/luxfi/sampler v1.0.0
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
)
replace github.com/luxfi/math/big => ./big