math

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exp

func Exp(base, exponent *big.Int) *big.Int

Exp implement exponentiation by squaring algorithm.

Courtesy @karalabe and @chfast

func GasPrice added in v0.9.17

func GasPrice(bp, gl, ep *big.Int) *big.Int

func GasSort added in v0.9.17

func GasSort(v1, v2 Vector) bool

func GasSum added in v0.9.17

func GasSum(v Vector) *big.Int

func PriceSort added in v0.9.17

func PriceSort(v1, v2 Vector) bool

func Sum added in v0.9.17

func Sum(slice Summer) (sum *big.Int)

Types

type Summer added in v0.9.17

type Summer interface {
	Sum(i int) *big.Int
	Len() int
}

type Vector added in v0.9.17

type Vector struct {
	Gas, Price *big.Int
}

type VectorSum added in v0.9.17

type VectorSum func(v Vector) *big.Int

func (VectorSum) Sum added in v0.9.17

func (v VectorSum) Sum(vectors []Vector) *big.Int

type VectorsBy added in v0.9.17

type VectorsBy func(v1, v2 Vector) bool

func (VectorsBy) Sort added in v0.9.17

func (self VectorsBy) Sort(vectors []Vector)

Jump to

Keyboard shortcuts

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