math

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2017 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func GasSort

func GasSort(v1, v2 Vector) bool

func GasSum

func GasSum(v Vector) *big.Int

func PriceSort

func PriceSort(v1, v2 Vector) bool

func Sum

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

Types

type Summer

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

type Vector

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

type VectorSum

type VectorSum func(v Vector) *big.Int

func (VectorSum) Sum

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

type VectorsBy

type VectorsBy func(v1, v2 Vector) bool

func (VectorsBy) Sort

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

Jump to

Keyboard shortcuts

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