Skip to content
@go-numerics

go-numerics

go-numerics

go-numerics

🌐 Website · 📚 Documentation

Numerical methods in pure Go (CGO=0): optimisation and root finding, quadrature and ODE solvers, special functions — on go-ndarray.

Each library ports reference algorithms (MINPACK, L-BFGS-B, QUADPACK, the Runge–Kutta, Radau and BDF solvers, Cephes and Boost.Math) statement by statement, and its tests replay recorded answers: SciPy 1.18.1 runs for optimize and integrate, with the netlib Fortran as a second oracle, and mpmath at high precision for special, with SciPy measured on the same points. Where the Go code is slower than the reference, the documentation says so.

r, err := integrate.Quad(func(x float64) float64 { return math.Log(x) / math.Sqrt(x) }, 0, 1, nil)
// r.Value = -4, r.AbsErr = 2.3e-13, r.NEval = 315

root, _ := optimize.Brentq(func(x float64) float64 { return x*x*x - 2*x - 5 }, 2, 3, nil)
// root.Root = 2.094551481542…, 7 iterations

fmt.Println(special.Erfc(10)) // 2.088487583762545e-45

Repositories

Repo What it is
optimize minimisation (Nelder–Mead, Powell, CG, BFGS, Newton-CG, L-BFGS-B), scalar and system roots, nonlinear least squares, curve fitting with covariance, linear programming
integrate adaptive quadrature (QUADPACK), fixed and sample rules, multiple integrals, initial value problems (RK45, RK23, DOP853, Radau, BDF, stiffness switching)
special gamma, beta, error and normal functions, incomplete gamma and beta and their inverses, Bessel, zeta, elliptic integrals, with an element-wise layer over go-ndarray
docs the documentation site (Hugo + Hextra), served at /docs/
go-numerics.github.io the landing page (Hugo)
brand logo, icons and social images

Every library needs Go 1.27.2 or later. It is part of an ecosystem with go-ndarray (N-dimensional arrays), go-plot (figures), go-dataframe (labelled tables) and go-notebook (Go notebooks).

Popular repositories Loading

  1. optimize optimize Public

    Optimisation and root finding in pure Go: minimize, least squares, curve fitting, scalar and system roots

    Go

  2. special special Public

    Special mathematical functions in pure Go: gamma, beta, erf, incomplete gamma/beta, Bessel, zeta — accuracy measured against mpmath

    Go

  3. integrate integrate Public

    Numerical integration and ODE solvers in pure Go: adaptive quadrature, RK45, DOP853, Radau, BDF, stiffness switching

    Go

  4. .github .github Public

    Organisation profile and shared Renovate preset for go-numerics

    JavaScript

  5. brand brand Public

    Logo, icons and social images of go-numerics

    Python

  6. docs docs Public

    Documentation site of go-numerics (Hugo + Hextra)

    HTML

Repositories

Showing 7 of 7 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…