Documentation ¶
Index ¶
- Variables
- func CmpInt128(lhs, rhs Int128) int
- func CmpUint128(lhs, rhs Uint128) int
- func LessInt128(lhs Int128, rhs Int128) bool
- func LessUint128(lhs Uint128, rhs Uint128) bool
- type Int128
- func AddCI128(lhs Int128, rhs Int128, carry uint64) (sum Int128, carryOut uint64)
- func AddI128(lhs Int128, rhs Int128) (sum Int128)
- func MustInt128FromString(s string) Int128
- func NewInt128FromString(s string, base int) (r Int128, ok bool)
- func SubCI128(lhs Int128, rhs Int128, borrow uint64) (diff Int128, borrowOut uint64)
- func SubI128(lhs Int128, rhs Int128) (diff Int128)
- func (lhs Int128) Add(rhs Int128) Int128
- func (lhs *Int128) AddAssign(rhs Int128) *Int128
- func (lhs Int128) BigInt() *big.Int
- func (lhs Int128) Equal(rhs Int128) bool
- func (lhs *Int128) FromBigEndian(buf []byte)
- func (lhs *Int128) FromLittleEndian(buf []byte)
- func (lhs Int128) IsNeg() bool
- func (lhs Int128) IsZero() bool
- func (lhs Int128) Less(rhs Int128) bool
- func (lhs Int128) MarshalJSON() ([]byte, error)
- func (lhs Int128) Neg() (neg Int128)
- func (lhs Int128) PutBigEndian(buf []byte)
- func (lhs Int128) PutLittleEndian(buf []byte)
- func (lhs Int128) String() string
- func (lhs Int128) Sub(rhs Int128) Int128
- func (lhs *Int128) SubAssign(rhs Int128) *Int128
- func (lhs *Int128) UnmarshalJSON(p []byte) (err error)
- type Uint128
- func AddCU128(lhs Uint128, rhs Uint128, carry uint64) (sum Uint128, carryOut uint64)
- func AddU128(lhs Uint128, rhs Uint128) (sum Uint128)
- func MustUint128FromString(s string) Uint128
- func NewUint128FromString(s string, base int) (r Uint128, ok bool)
- func SubCU128(lhs Uint128, rhs Uint128, borrow uint64) (diff Uint128, borrowOut uint64)
- func SubU128(lhs Uint128, rhs Uint128) (diff Uint128)
- func (lhs Uint128) Add(rhs Uint128) Uint128
- func (lhs *Uint128) AddAssign(rhs Uint128) *Uint128
- func (lhs Uint128) BigInt() *big.Int
- func (lhs Uint128) Equal(rhs Uint128) bool
- func (lhs *Uint128) FromBigEndian(buf []byte)
- func (lhs *Uint128) FromLittleEndian(buf []byte)
- func (lhs Uint128) IsNeg() bool
- func (lhs Uint128) IsZero() bool
- func (lhs Uint128) Less(rhs Uint128) bool
- func (lhs Uint128) MarshalJSON() ([]byte, error)
- func (lhs Uint128) Neg() (neg Uint128)
- func (lhs Uint128) PutBigEndian(buf []byte)
- func (lhs Uint128) PutLittleEndian(buf []byte)
- func (lhs Uint128) String() string
- func (lhs Uint128) Sub(rhs Uint128) Uint128
- func (lhs *Uint128) SubAssign(rhs Uint128) *Uint128
- func (lhs *Uint128) UnmarshalJSON(p []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnmarshalError = errors.New("wrong i128 value")
)
View Source
var ( ZeroInt128 = Int128{ // contains filtered or unexported fields } )
View Source
var ( ZeroUint128 = Uint128{ // contains filtered or unexported fields } )
Functions ¶
func CmpUint128 ¶
func LessInt128 ¶ added in v1.0.0
func LessUint128 ¶ added in v1.0.0
Types ¶
type Int128 ¶
type Int128 struct {
// contains filtered or unexported fields
}
func MustInt128FromString ¶ added in v1.0.0
func NewInt128FromString ¶ added in v1.0.0
func (*Int128) FromBigEndian ¶
func (*Int128) FromLittleEndian ¶
func (Int128) MarshalJSON ¶
func (Int128) PutBigEndian ¶
func (Int128) PutLittleEndian ¶
func (*Int128) UnmarshalJSON ¶
type Uint128 ¶
type Uint128 struct {
// contains filtered or unexported fields
}
func MustUint128FromString ¶ added in v1.0.0
func NewUint128FromString ¶ added in v1.0.0
func (*Uint128) FromBigEndian ¶
func (*Uint128) FromLittleEndian ¶
func (Uint128) MarshalJSON ¶
func (Uint128) PutBigEndian ¶
func (Uint128) PutLittleEndian ¶
func (*Uint128) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.