Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khezen/rootfinding
root-finding library
https://github.com/khezen/rootfinding
brent go golang root-finding
Last synced: 3 days ago
JSON representation
root-finding library
- Host: GitHub
- URL: https://github.com/khezen/rootfinding
- Owner: khezen
- License: mit
- Created: 2018-10-30T22:31:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-22T09:14:10.000Z (over 4 years ago)
- Last Synced: 2024-07-31T20:52:49.581Z (3 months ago)
- Topics: brent, go, golang, root-finding
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 11
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - rootfinding - root-finding algorithms library for finding roots of quadratic functions. (Science and Data Analysis / HTTP Clients)
- zero-alloc-awesome-go - rootfinding - root-finding algorithms library for finding roots of quadratic functions. (Science and Data Analysis / HTTP Clients)
- awesome-go-extra - rootfinding - finding library|7|2|0|2018-10-30T22:31:48Z|2020-03-22T09:14:10Z| (Science and Data Analysis / HTTP Clients)
README
# rootfinding
[![GoDoc](https://img.shields.io/badge/go-documentation-blue.svg)](https://godoc.org/github.com/khezen/rootfinding)
[![Build Status](https://github.com/khezen/rootfinding/workflows/build/badge.svg?branch=master)](https://github.com/khezen/rootfinding/actions?query=workflow%3Abuild) [![codecov](https://img.shields.io/codecov/c/github/khezen/rootfinding/master.svg)](https://codecov.io/gh/khezen/rootfinding)
[![Go Report Card](https://goreportcard.com/badge/github.com/khezen/rootfinding)](https://goreportcard.com/report/github.com/khezen/rootfinding)`github.com/khezen/rootfinding`
* Brent's Method
## Example
```golang
package mainimport(
"fmt"
"github.com/khezen/rootfinding"
)func f(x float64) float64 {
return math.Pow(x, 4) - 2*math.Pow(x, 2) + 0.25
}const(
intervalStart = -100
intervalEnd = 100
precision = 6
)
func main(){
root, err := rootfinding.Brent(f, intervalStart, intervalEnd, precision)
if err != nil {
panic(err)
}
fmt.Println(root)
}
``````bash
0.366025403784438
```