Awesome Go

rootfinding

CategoryScience and Data Analysis
SubcategoryScience and Data Analysis
Stars0

root-finding algorithms library for finding roots of quadratic functions

About rootfinding

rootfinding

GoDoc Build Status codecov Go Report Card

github.com/khezen/rootfinding

  • Brent's Method

Example

package main

import(
    "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)
}		
0.366025403784438

Frequently Asked Questions

What is rootfinding?

rootfinding is a Science and Data Analysis library for the Go programming language. root-finding algorithms library for finding roots of quadratic functions

How do I install rootfinding?

Install rootfinding with the Go module system using `go get khezen/rootfinding`. Check the repository for the current installation instructions.

What category does rootfinding belong to?

rootfinding is listed under Science and Data Analysis, specifically Science and Data Analysis.

← Back to Science and Data Analysis