Documentation ¶
Index ¶
- Constants
- Variables
- func BigMax(x, y *big.Int) *big.Int
- func BigMin(x, y *big.Int) *big.Int
- func BigPow(a, b int64) *big.Int
- func Byte(bigint *big.Int, padlength, n int) byte
- func Exp(base, exponent *big.Int) *big.Int
- func FirstBitSet(v *big.Int) int
- func MustParseBig256(s string) *big.Int
- func MustParseUint64(s string) uint64
- func PaddedBigBytes(bigint *big.Int, n int) []byte
- func ParseBig256(s string) (*big.Int, bool)
- func ParseUint64(s string) (uint64, bool)
- func ReadBits(bigint *big.Int, buf []byte)
- func S256(x *big.Int) *big.Int
- func SafeAdd(x, y uint64) (uint64, bool)
- func SafeMul(x, y uint64) (uint64, bool)
- func SafeSub(x, y uint64) (uint64, bool)
- func U256(x *big.Int) *big.Int
- type HexOrDecimal256
- type HexOrDecimal64
Constants ¶
View Source
const ( MaxInt8 = 1<<7 - 1 MinInt8 = -1 << 7 MaxInt16 = 1<<15 - 1 MinInt16 = -1 << 15 MaxInt32 = 1<<31 - 1 MinInt32 = -1 << 31 MaxInt64 = 1<<63 - 1 MinInt64 = -1 << 63 MaxUint8 = 1<<8 - 1 MaxUint16 = 1<<16 - 1 MaxUint32 = 1<<32 - 1 MaxUint64 = 1<<64 - 1 )
Variables ¶
Functions ¶
func FirstBitSet ¶
func MustParseBig256 ¶
func MustParseUint64 ¶
func ParseUint64 ¶
Types ¶
type HexOrDecimal256 ¶
func (*HexOrDecimal256) MarshalText ¶
func (i *HexOrDecimal256) MarshalText() ([]byte, error)
func (*HexOrDecimal256) UnmarshalText ¶
func (i *HexOrDecimal256) UnmarshalText(input []byte) error
type HexOrDecimal64 ¶
type HexOrDecimal64 uint64
func (HexOrDecimal64) MarshalText ¶
func (i HexOrDecimal64) MarshalText() ([]byte, error)
func (*HexOrDecimal64) UnmarshalText ¶
func (i *HexOrDecimal64) UnmarshalText(input []byte) error
Click to show internal directories.
Click to hide internal directories.