num

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BigZero = NewBig(0)

Functions

func BigCmp

func BigCmp(a, b Big) int

Types

type Big

type Big big.Int

A variable length sequence of bytes representing an unsigned Big integer number with unlimited precision. Negative bigints are unsupported for binary marshaling to enable native comparisons operators on encoded binary data (data is stored as big-endian variable length byte slice).

func MaxBig

func MaxBig(args ...Big) Big

func MinBig

func MinBig(args ...Big) Big

func MustParseBig

func MustParseBig(s string) Big

func NewBig

func NewBig(i int64) Big

func NewFromBigInt

func NewFromBigInt(b *big.Int) Big

func ParseBig

func ParseBig(s string) (Big, error)

func (Big) Add

func (z Big) Add(y Big) Big

func (Big) Add64

func (z Big) Add64(y int64) Big

func (Big) Big

func (z Big) Big() *big.Int

func (Big) Bytes

func (z Big) Bytes() []byte

func (Big) CeilDiv

func (z Big) CeilDiv(y Big) Big

func (Big) CeilScale

func (z Big) CeilScale(n int) Big

func (Big) Clone

func (z Big) Clone() Big

func (Big) Cmp

func (z Big) Cmp(b Big) int

func (Big) Decimals

func (z Big) Decimals(d int) string

func (*Big) DecodeBuffer

func (z *Big) DecodeBuffer(buf *bytes.Buffer) error

func (Big) Div

func (z Big) Div(y Big) Big

func (Big) Div64

func (z Big) Div64(y int64) Big

func (Big) EncodeBuffer

func (z Big) EncodeBuffer(buf *bytes.Buffer) error

func (Big) Equal

func (z Big) Equal(x Big) bool

func (Big) Float64

func (z Big) Float64(dec int) float64

func (Big) Int64

func (z Big) Int64() int64

func (Big) IsBigZero

func (z Big) IsBigZero() bool

func (Big) IsLess

func (z Big) IsLess(b Big) bool

func (Big) IsLessEqual

func (z Big) IsLessEqual(b Big) bool

func (Big) IsNeg

func (z Big) IsNeg() bool

func (Big) Lsh

func (z Big) Lsh(n uint) Big

func (Big) MarshalBinary

func (z Big) MarshalBinary() ([]byte, error)

func (Big) MarshalText

func (z Big) MarshalText() ([]byte, error)

func (Big) Mul

func (z Big) Mul(y Big) Big

func (Big) Mul64

func (z Big) Mul64(y int64) Big

func (Big) Neg

func (z Big) Neg() Big

func (Big) Rsh

func (z Big) Rsh(n uint) Big

func (Big) Scale

func (z Big) Scale(n int) Big

func (*Big) Set

func (z *Big) Set(val string) (err error)

Set implements the flags.Value interface for use in command line argument parsing.

func (*Big) SetBig

func (z *Big) SetBig(b *big.Int) *Big

func (*Big) SetInt64

func (z *Big) SetInt64(i int64) *Big

func (Big) String

func (z Big) String() string

func (Big) Sub

func (z Big) Sub(y Big) Big

func (Big) Sub64

func (z Big) Sub64(y int64) Big

func (*Big) UnmarshalBinary

func (z *Big) UnmarshalBinary(buf []byte) error

func (*Big) UnmarshalText

func (z *Big) UnmarshalText(d []byte) error

Jump to

Keyboard shortcuts

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