big_sense

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(first, second *big.Int) *big.Int

func AddAll

func AddAll(first *big.Int, rest ...*big.Int) *big.Int

func Atobi added in v0.1.6

func Atobi(number string) (*big.Int, error)

Atobi ASCII to Big Int. Allias of FromString.

func Cmp added in v0.1.6

func Cmp(x, y *big.Int) int

func Div

func Div(dividend, divisor *big.Int) *big.Int

func Empty added in v0.1.6

func Empty() *big.Int

func FromString

func FromString(number string) (*big.Int, error)

func FromStringBase

func FromStringBase(number string, base int) (*big.Int, error)

func Mul

func Mul(first, second *big.Int) *big.Int

func MulAll

func MulAll(first *big.Int, rest ...*big.Int) *big.Int

func MulRange added in v0.1.4

func MulRange(a, b int64) *big.Int

func One

func One() *big.Int

One returns immediate 1 value big.Int

func Sqrt added in v0.1.6

func Sqrt(number *big.Int) *big.Int

func Sub

func Sub(first, second *big.Int) *big.Int

func Val added in v0.1.6

func Val[T Number](number T) *big.Int

Val is allias of ValueOf

func ValueOf

func ValueOf[T Number](number T) *big.Int

ValueOf takes int or float and returns a new Int sets to integer part of the number.

func Zero

func Zero() *big.Int

Zero returns immediate 0 value big.Int

Types

type Number

type Number interface {
	constraints.Float | constraints.Integer
}

Jump to

Keyboard shortcuts

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