Hi Fellow Gophers

I wonder what is the canonical Go library for finding roots of 
single-valued real functions?

In particular, I am finding an implementation of Brent's method 
<https://en.wikipedia.org/wiki/Brent's_method>.
Brent's method is the default algorithm in R, Matlab, and Scipy 
<https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.root_scalar.html#scipy.optimize.root_scalar>
.

Gonum has a pretty comprehensive list of facilities for optimization 
<https://pkg.go.dev/gonum.org/v1/gonum@v0.15.1/optimize>, but I couldn't 
find one that does simple root finding.
There seem to be two packages out there that implement Brent's method, but 
they are of dubious provenance:
* https://pkg.go.dev/github.com/cpmech/gosl/num#Brent . Relies on the 
derivative of f, f'(x), which shouldn't be the case for Brent's method. 
Plus, it pulls in a deluge of dependencies, and is not in pure Go.
* https://pkg.go.dev/go.skia.org/infra/pinpoint/go/compare/stats . The 
zeroin function is not even exported, so presumably of unknown quality.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/4c711985-1366-4309-9250-0c236fa0101en%40googlegroups.com.

Reply via email to