math

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NIL_CMPLX_POLYNOMIAL = CmplxPolynomial{}
)

Functions

This section is empty.

Types

type CmplxPolynomial

type CmplxPolynomial struct {
	Terms    []PolynomialTerm
	Variable rune
}

Represents a complex polynomial

func ParseCmplxPolynomial

func ParseCmplxPolynomial(txt string) (CmplxPolynomial, error)

Constructs a CmplxPolynomial type from a mathematical expression.

func (*CmplxPolynomial) Evaluate

func (polynomial *CmplxPolynomial) Evaluate(z complex128) complex128

Evaluates the value of a complex polynomial for a given z.

func (*CmplxPolynomial) FirstDerivative

func (polynomial *CmplxPolynomial) FirstDerivative() CmplxPolynomial

Computes the first derivative of a complex polynomial.

func (*CmplxPolynomial) ToString

func (polynomial *CmplxPolynomial) ToString() string

Converts a CmplxPolynomial type to its string representation.

type PolynomialTerm

type PolynomialTerm struct {
	Coefficient float64
	Power       int
}

Represents a term of a complex polynomial.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL