go-approx documentation
You are reading the documentation of an outdated version, whose text may no longer be accurate. Go to the latest version.
go-approx is approximation in pure Go. Two libraries reproduce the
behaviour of the reference tools and test it against them: interp against
SciPy 1.18.1 and NumPy 2.5.4, poly against NumPy 2.5.4. Both run the
reference as an oracle from Go, write the answers to committed fixtures, and
state where the Go code differs or is slower. Chebyshev and AAA rational
approximation are planned and not written yet.
The libraries
| Library | Status | What it does |
|---|---|---|
| interp | released v0.2.0 | interpolation, splines and smoothing: interp1d, cubic splines, PCHIP, Akima and makima, B-splines, FITPACK smoothing splines and splrep, regular-grid and tensor-product interpolation |
| poly | released v0.1.0 | polynomials: evaluation, arithmetic, least-squares fitting, roots, and the Chebyshev, Legendre, Hermite, HermiteE and Laguerre bases |
Install
go get github.com/go-approx/interp@v0.2.0
go get github.com/go-approx/poly@v0.1.0Each module is pure Go (CGO_ENABLED=0).
Where each library’s own documents are
| Library | Source | Performance |
|---|---|---|
| interp | README | docs/perf.md |
| poly | README | docs/perf.md |
Part of a family
go-approx belongs to the family of go-numerics (optimisation, quadrature, special functions) and go-statistics.
Created on by tannevaled
Modified on by tannevaled