Help us shape the future of Go! Take the 2026 Go Developer Survey

managedbigint

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Zero = BigIntHandle{
	// contains filtered or unexported fields
}

Zero is a reference to Zero value. Zero doesn't need storage.

Functions

This section is empty.

Types

type BigIntContainer

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

BigIntContainer is a structure holding the data for big.Int numbers without pointers.

func NewBigIntContainer

func NewBigIntContainer() *BigIntContainer

NewBigIntContainer constructs a new BigIntContainer.

func (*BigIntContainer) Add

func (c *BigIntContainer) Add(dest, x, y BigIntHandle) BigIntHandle

func (*BigIntContainer) Get

func (c *BigIntContainer) Get(handler BigIntHandle) *big.Int

Get yields a copy of a BigIntContainer number, as big.Int.

func (*BigIntContainer) GetUnsafe

func (c *BigIntContainer) GetUnsafe(handler BigIntHandle) *big.Int

GetUnsafe casts a BigIntContainer number to big.Int. Changing the resulting big.Int will also change the underlying data.

func (*BigIntContainer) Insert

func (c *BigIntContainer) Insert(bi *big.Int) BigIntHandle

Insert adds a copy of a big number into the BigIntContainer.

func (*BigIntContainer) InsertUint64

func (c *BigIntContainer) InsertUint64(x uint64) BigIntHandle

InsertUint64 adds a uint64 number into the BigIntContainer.

func (*BigIntContainer) Mul

func (c *BigIntContainer) Mul(dest, x, y BigIntHandle) BigIntHandle

func (*BigIntContainer) Sub

func (c *BigIntContainer) Sub(dest, x, y BigIntHandle) BigIntHandle

type BigIntHandle

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

BigIntHandle acts like a pointer to a big.Int value in a BigIntContainer.

Jump to

Keyboard shortcuts

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