Documentation ¶
Overview ¶
Package roots implements algorithms for finding roots of functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Poly2 ¶
func Poly2(p0, p1, p2 float64) (z0, z1 complex128)
Poly2 returns the roots of the following 2nd degree polynomial:
p0 x^2 + p1 x + p2 = 0
func Poly3 ¶
func Poly3(p0, p1, p2, p3 float64) (z0, z1, z2 complex128)
Poly3 returns the roots of the following 3rd degree polynomial:
p0 x^3 + p1 x^2 + p2 x + p3 = 0
func Poly4 ¶
func Poly4(p0, p1, p2, p3, p4 float64) (z0, z1, z2, z3 complex128)
Poly4 returns the roots of the following 4th degree polynomial:
p0 x^4 + p1 x^3 + p2 x^2 + p3 x + p4 = 0
func Polynomial ¶
func Polynomial(dst []complex128, ps []float64) []complex128
Polynomial returns the roots of an n-th degree polynomial of the form:
p[0] * x**n + p[1] * x**(n-1) + ... + p[n-1]*x + p[n]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.