bigint

package module
v0.0.0-...-74ec22e Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Unlicense Imports: 2 Imported by: 2

README

bigint

Immutable wrapper over std lib big.Int

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Zero  = FromInt(0)
	One   = FromInt(1)
	Two   = FromInt(2)
	Three = FromInt(3)
	Four  = FromInt(4)
	Five  = FromInt(5)
	Six   = FromInt(6)
	Seven = FromInt(7)
	Eight = FromInt(8)
	Nine  = FromInt(9)
	Ten   = FromInt(10)
)

Functions

This section is empty.

Types

type Int

type Int struct {
	// contains filtered or unexported fields
}

func Copy

func Copy(x Int) Int

func Exp

func Exp(a Int, y Int, n Int) Int

func FromBigInt

func FromBigInt(x *big.Int) Int

func FromBytes

func FromBytes(b []byte) Int

func FromInt

func FromInt(i int) Int

func FromString

func FromString(s string, base int) (Int, bool)

func RandInt

func RandInt(n Int) Int

func (Int) Add

func (b Int) Add(x Int) Int

func (Int) BitLen

func (b Int) BitLen() int

func (Int) Bytes

func (b Int) Bytes() []byte

func (Int) Cmp

func (b Int) Cmp(x Int) int

func (Int) Div

func (b Int) Div(x Int) Int

func (Int) Equal

func (b Int) Equal(x Int) bool

func (Int) Int

func (b Int) Int() int

func (Int) IsInt64

func (b Int) IsInt64() bool

func (Int) Mod

func (b Int) Mod(x Int) Int

func (Int) Mul

func (b Int) Mul(x Int) Int

func (Int) Sqrt

func (b Int) Sqrt() Int

func (Int) String

func (b Int) String() string

func (Int) Sub

func (b Int) Sub(x Int) Int

func (Int) Text

func (b Int) Text(base int) string

Jump to

Keyboard shortcuts

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