math

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0, MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const Precision = 128

note: all coefficients for which Polyval is used would need to be updated if this precision changes

Variables

This section is empty.

Functions

func Parse

func Parse(coefs []string) []*big.Int

Parse a slice of strings (representing integers in decimal) Convention: this function is to be applied to strings representing Q.128 fixed-point numbers, and thus returns numbers in binary Q.128 representation

func Polyval

func Polyval(p []*big.Int, x *big.Int) *big.Int

polyval evaluates a polynomial given by coefficients `p` in Q.128 format at point `x` in Q.128 format. Output is in Q.128. Coefficients should be ordered from the highest order coefficient to the lowest.

Types

This section is empty.

Jump to

Keyboard shortcuts

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