Documentation
¶
Index ¶
- type BigInt
- func (x *BigInt) Add(y *BigInt) *BigInt
- func (x *BigInt) Bytes() []byte
- func (x *BigInt) Cmp(y *BigInt) int
- func (x *BigInt) Div(y *BigInt) *BigInt
- func (x *BigInt) MarshalJSON() ([]byte, error)
- func (x *BigInt) Mul(y *BigInt) *BigInt
- func (x *BigInt) Neg() *BigInt
- func (x *BigInt) Scan(value interface{}) error
- func (x *BigInt) String() string
- func (x *BigInt) Sub(y *BigInt) *BigInt
- func (x *BigInt) ToBigInt() *big.Int
- func (x *BigInt) ToInt64() int64
- func (x *BigInt) ToUInt64() uint64
- func (x *BigInt) UnmarshalJSON(p []byte) error
- func (x *BigInt) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigInt ¶
func FromString ¶
FromString allocates and returns a new BigInt set to x, interpreted in the base 10.
func (*BigInt) Bytes ¶
Bytes returns the absolute value of x as a big-endian byte slice.
To use a fixed length slice, or a preallocated one, use FillBytes.
func (*BigInt) Div ¶
Div sets new BigInt to the quotient x/y for y != 0 and returns it. If y == 0, a division-by-zero run-time panic occurs.
func (*BigInt) MarshalJSON ¶
func (*BigInt) String ¶
String returns the decimal representation of x as generated by x.ToBigInt().Text(10).
func (*BigInt) ToInt64 ¶
ToInt64 returns the int64 representation of x. If x cannot be represented in an int64, the result is undefined.
func (*BigInt) ToUInt64 ¶
ToUInt64 returns the uint64 representation of x. If x cannot be represented in a uint64, the result is undefined.