Documentation
¶
Index ¶
- Constants
- func FormatInt128(i Int128, base int) string
- func FormatUint128(i Uint128, base int) string
- type Int128
- func Int128_Cast__0() Int128
- func Int128_Cast__1(v int) Int128
- func Int128_Cast__2(v int64) (out Int128)
- func Int128_Cast__3(v uint64) Int128
- func Int128_Cast__4(v int32) Int128
- func Int128_Cast__5(v int16) Int128
- func Int128_Cast__6(v int8) Int128
- func Int128_Cast__7(v Uint128) (out Int128)
- func Int128_Cast__8(v *big.Int) Int128
- func Int128_Cast__9(v *big.Int) (out Int128, inRange bool)
- func Int128_Init__0(v int) (out Int128)
- func ParseInt128(s string, base int) (out Int128, err error)
- func (i Int128) AbsU() Uint128
- func (i Int128) Abs__0() Int128
- func (i Int128) Abs__1() (ret Int128, inRange bool)
- func (i Int128) BigInt() *big.Int
- func (i Int128) Cmp__0(n int64) int
- func (i Int128) Cmp__1(n Int128) int
- func (i Int128) Format(s fmt.State, c rune)
- func (i Int128) IsZero() bool
- func (i Int128) QuoRem__0(by int64) (q, r Int128)
- func (i Int128) QuoRem__1(by Int128) (q, r Int128)
- func (i *Int128) Scan(state fmt.ScanState, verb rune) (err error)
- func (i Int128) Sign() int
- func (i Int128) String() string
- func (i Int128) Text(base int) string
- func (i Int128) ToBigInt(b *big.Int)
- func (i *Int128) XGo_AddAssign(b Int128)
- func (i Int128) XGo_Add__0(n int64) (v Int128)
- func (i Int128) XGo_Add__1(n Int128) (v Int128)
- func (i Int128) XGo_And(n Int128) Int128
- func (i *Int128) XGo_AndAssign(b Int128)
- func (i Int128) XGo_AndNot(n Int128) Int128
- func (i *Int128) XGo_AndNotAssign(b Int128)
- func (i *Int128) XGo_Dec()
- func (i Int128) XGo_Dup() (v Int128)
- func (i Int128) XGo_EQ__0(n int64) bool
- func (i Int128) XGo_EQ__1(n Int128) bool
- func (i Int128) XGo_GE__0(n int64) bool
- func (i Int128) XGo_GE__1(n Int128) bool
- func (i Int128) XGo_GT__0(n int64) bool
- func (i Int128) XGo_GT__1(n Int128) bool
- func (i *Int128) XGo_Inc()
- func (i Int128) XGo_LE__0(n int64) bool
- func (i Int128) XGo_LE__1(n Int128) bool
- func (i Int128) XGo_LT__0(n int64) bool
- func (i Int128) XGo_LT__1(n Int128) bool
- func (i Int128) XGo_Lsh(n XGo_ninteger) Int128
- func (i *Int128) XGo_LshAssign(n XGo_ninteger)
- func (i *Int128) XGo_MulAssign(b Int128)
- func (i Int128) XGo_Mul__0(n int64) Int128
- func (i Int128) XGo_Mul__1(n Int128) (dest Int128)
- func (i Int128) XGo_Neg() (v Int128)
- func (i Int128) XGo_Not() Int128
- func (i Int128) XGo_Or(n Int128) Int128
- func (i *Int128) XGo_OrAssign(b Int128)
- func (i *Int128) XGo_QuoAssign(b Int128)
- func (i Int128) XGo_Quo__0(by int64) (q Int128)
- func (i Int128) XGo_Quo__1(by Int128) (q Int128)
- func (i Int128) XGo_Rcast__0() Uint128
- func (i Int128) XGo_Rcast__1() (out Uint128, inRange bool)
- func (i Int128) XGo_Rcast__2() int64
- func (i Int128) XGo_Rcast__3() (out int64, inRange bool)
- func (i Int128) XGo_Rcast__4() uint64
- func (i Int128) XGo_Rcast__5() (out uint64, inRange bool)
- func (i *Int128) XGo_RemAssign(b Int128)
- func (i Int128) XGo_Rem__0(by int64) (r Int128)
- func (i Int128) XGo_Rem__1(by Int128) (r Int128)
- func (i Int128) XGo_Rsh(n XGo_ninteger) Int128
- func (i *Int128) XGo_RshAssign(n XGo_ninteger)
- func (i *Int128) XGo_SubAssign(b Int128)
- func (i Int128) XGo_Sub__0(n int64) (v Int128)
- func (i Int128) XGo_Sub__1(n Int128) (v Int128)
- func (i Int128) XGo_Xor(v Int128) Int128
- func (i *Int128) XGo_XorAssign(b Int128)
- type Int128T
- type Uint128
- func ParseUint128(s string, base int) (out Uint128, err error)
- func Uint128_Cast__0(v int) Uint128
- func Uint128_Cast__1(v uint) Uint128
- func Uint128_Cast__2(v uint64) Uint128
- func Uint128_Cast__3(v uint32) Uint128
- func Uint128_Cast__4(v uint16) Uint128
- func Uint128_Cast__5(v uint8) Uint128
- func Uint128_Cast__6(v int64) (out Uint128)
- func Uint128_Cast__7(v int64) (out Uint128, inRange bool)
- func Uint128_Cast__8(v *big.Int) Uint128
- func Uint128_Cast__9(v *big.Int) (out Uint128, inRange bool)
- func Uint128_Cast__a() Uint128
- func Uint128_Cast__b(hi, lo uint64) Uint128
- func Uint128_Init__0(v int) (out Uint128)
- func (u Uint128) BigInt() *big.Int
- func (u Uint128) Bit(i int) uint
- func (u Uint128) BitLen() int
- func (u Uint128) Cmp__0(n uint64) int
- func (u Uint128) Cmp__1(n Uint128) int
- func (u Uint128) Format(s fmt.State, c rune)
- func (u Uint128) IsZero() bool
- func (u Uint128) LeadingZeros() int
- func (u Uint128) OnesCount() int
- func (u Uint128) QuoRem__0(by uint64) (q, r Uint128)
- func (u Uint128) QuoRem__1(by Uint128) (q, r Uint128)
- func (u Uint128) Reverse() Uint128
- func (u Uint128) ReverseBytes() Uint128
- func (u *Uint128) Scan(state fmt.ScanState, verb rune) (err error)
- func (u Uint128) SetBit(i int, b uint) (out Uint128)
- func (u Uint128) String() string
- func (u Uint128) Text(base int) string
- func (u Uint128) ToBigInt(b *big.Int)
- func (u Uint128) TrailingZeros() int
- func (u *Uint128) XGo_AddAssign(b Uint128)
- func (u Uint128) XGo_Add__0(n uint64) (v Uint128)
- func (u Uint128) XGo_Add__1(n Uint128) (v Uint128)
- func (u *Uint128) XGo_AndAssign(b Uint128)
- func (u Uint128) XGo_AndNot(n Uint128) Uint128
- func (u *Uint128) XGo_AndNotAssign(b Uint128)
- func (u Uint128) XGo_And__0(n uint64) Uint128
- func (u Uint128) XGo_And__1(n Uint128) Uint128
- func (u *Uint128) XGo_Dec()
- func (u Uint128) XGo_Dup() (v Uint128)
- func (u Uint128) XGo_EQ__0(n uint64) bool
- func (u Uint128) XGo_EQ__1(n Uint128) bool
- func (u Uint128) XGo_GE__0(n uint64) bool
- func (u Uint128) XGo_GE__1(n Uint128) bool
- func (u Uint128) XGo_GT__0(n uint64) bool
- func (u Uint128) XGo_GT__1(n Uint128) bool
- func (u *Uint128) XGo_Inc()
- func (u Uint128) XGo_LE__0(n uint64) bool
- func (u Uint128) XGo_LE__1(n Uint128) bool
- func (u Uint128) XGo_LT__0(n uint64) bool
- func (u Uint128) XGo_LT__1(n Uint128) bool
- func (u Uint128) XGo_Lsh(n XGo_ninteger) Uint128
- func (u *Uint128) XGo_LshAssign(n XGo_ninteger)
- func (u *Uint128) XGo_MulAssign(b Uint128)
- func (u Uint128) XGo_Mul__0(n uint64) (dest Uint128)
- func (u Uint128) XGo_Mul__1(n Uint128) Uint128
- func (u Uint128) XGo_Not() Uint128
- func (u *Uint128) XGo_OrAssign(b Uint128)
- func (u Uint128) XGo_Or__0(n uint64) Uint128
- func (u Uint128) XGo_Or__1(n Uint128) Uint128
- func (u *Uint128) XGo_QuoAssign(b Uint128)
- func (u Uint128) XGo_Quo__0(by uint64) (q Uint128)
- func (u Uint128) XGo_Quo__1(by Uint128) (q Uint128)
- func (u Uint128) XGo_Rcast__0() float64
- func (u Uint128) XGo_Rcast__1() uint64
- func (u Uint128) XGo_Rcast__2() (out uint64, inRange bool)
- func (u Uint128) XGo_Rcast__3() int64
- func (u Uint128) XGo_Rcast__4() (out int64, inRange bool)
- func (u *Uint128) XGo_RemAssign(b Uint128)
- func (u Uint128) XGo_Rem__0(by uint64) (r Uint128)
- func (u Uint128) XGo_Rem__1(by Uint128) (r Uint128)
- func (u Uint128) XGo_Rsh(n XGo_ninteger) Uint128
- func (u *Uint128) XGo_RshAssign(n XGo_ninteger)
- func (u *Uint128) XGo_SubAssign(b Uint128)
- func (u Uint128) XGo_Sub__0(n uint64) (v Uint128)
- func (u Uint128) XGo_Sub__1(n Uint128) (v Uint128)
- func (u *Uint128) XGo_XorAssign(b Uint128)
- func (u Uint128) XGo_Xor__0(v uint64) Uint128
- func (u Uint128) XGo_Xor__1(v Uint128) Uint128
- type Uint128T
- type XGo_ninteger
Constants ¶
const ( Int128_Max = 1<<127 - 1 Int128_Min = -1 << 127 Int128_IsUntyped = true )
const ( Uint128_Max = 1<<128 - 1 Uint128_Min = 0 Uint128_IsUntyped = true )
const (
XGoPackage = true // to indicate this is a XGo package
)
Variables ¶
This section is empty.
Functions ¶
func FormatInt128 ¶
func FormatUint128 ¶
Types ¶
type Int128 ¶
type Int128 struct {
// contains filtered or unexported fields
}
func Int128_Cast__1 ¶
Int128_Cast: func int128(v untyped_int) int128
func Int128_Cast__2 ¶
Int128_Cast: func int128(v int64) int128
func Int128_Cast__3 ¶
Int128_Cast: func int128(v uint64) int128
func Int128_Cast__7 ¶
Int128_Cast: func int128(v uint18) int128
func Int128_Cast__8 ¶
Int128_Cast: func int128(v *big.Int) int128
func Int128_Init__0 ¶
Int128_Init: func int128.init(v int) int128
func (Int128) AbsU ¶
AbsU returns the absolute value of i as an unsigned integer. All values of i are representable using this function, but the type is changed.
func (Int128) Cmp__0 ¶
Cmp64 compares 'i' to 64-bit int 'n' and returns:
< 0 if i < n 0 if i == n > 0 if i > n
The specific value returned by Cmp is undefined, but it is guaranteed to satisfy the above constraints.
func (Int128) Cmp__1 ¶
Cmp compares i to n and returns:
< 0 if i < n 0 if i == n > 0 if i > n
The specific value returned by Cmp is undefined, but it is guaranteed to satisfy the above constraints.
func (Int128) QuoRem__1 ¶
QuoRem returns the quotient q and remainder r for y != 0. If y == 0, a division-by-zero run-time panic occurs.
QuoRem implements T-division and modulus (like Go):
q = x/y with the result truncated to zero r = x - y*q
U128 does not support big.Int.DivMod()-style Euclidean division.
Note: dividing MinI128 by -1 will overflow, returning MinI128, as per the Go spec (https://golang.org/ref/spec#Integer_operators):
The one exception to this rule is that if the dividend x is the most negative value for the int type of x, the quotient q = x / -1 is equal to x (and r = 0) due to two's-complement integer overflow.
func (*Int128) XGo_AddAssign ¶
XGo_AddAssign: func (a *int128) += (b int128)
func (Int128) XGo_Add__0 ¶
func (Int128) XGo_Add__1 ¶
func (*Int128) XGo_AndAssign ¶
XGo_AndAssign: func (a *int128) &= (b int128)
func (Int128) XGo_AndNot ¶
func (*Int128) XGo_AndNotAssign ¶
XGo_AndNotAssign: func (a *int128) &^= (b int128)
func (Int128) XGo_Lsh ¶
func (i Int128) XGo_Lsh(n XGo_ninteger) Int128
func (*Int128) XGo_LshAssign ¶
func (i *Int128) XGo_LshAssign(n XGo_ninteger)
XGo_LshAssign: func (a *int128) <<= (n untyped_uint)
func (*Int128) XGo_MulAssign ¶
XGo_MulAssign: func (a *int128) *= (b int128)
func (Int128) XGo_Mul__0 ¶
func (Int128) XGo_Mul__1 ¶
Mul returns the product of two I128s.
Overflow should wrap around, as per the Go spec.
func (*Int128) XGo_OrAssign ¶
XGo_OrAssign: func (a *int128) |= (b int128)
func (*Int128) XGo_QuoAssign ¶
XGo_QuoAssign: func (a *int128) /= (b int128) {
func (Int128) XGo_Quo__0 ¶
func (Int128) XGo_Quo__1 ¶
Quo returns the quotient x/y for y != 0. If y == 0, a division-by-zero run-time panic occurs. Quo implements truncated division (like Go); see QuoRem for more details.
func (Int128) XGo_Rcast__0 ¶
XGo_Rcast: func uint128(v int128) uint128
func (Int128) XGo_Rcast__1 ¶
XGo_Rcast: func uint128(v int128) (uint128, bool)
func (Int128) XGo_Rcast__2 ¶
XGo_Rcast: func int64(v int128) int64
func (Int128) XGo_Rcast__3 ¶
XGo_Rcast: func int64(v int128) (int64, bool)
func (Int128) XGo_Rcast__4 ¶
XGo_Rcast: func uint64(v int128) uint64
func (Int128) XGo_Rcast__5 ¶
XGo_Rcast: func uint64(v int128) (uint64, bool)
func (*Int128) XGo_RemAssign ¶
XGo_RemAssign: func (a *int128) %= (b int128)
func (Int128) XGo_Rem__0 ¶
func (Int128) XGo_Rem__1 ¶
XGo_Rem returns the remainder of x%y for y != 0. If y == 0, a division-by-zero run-time panic occurs. XGo_Rem implements truncated modulus (like Go); see QuoRem for more details.
func (Int128) XGo_Rsh ¶
func (i Int128) XGo_Rsh(n XGo_ninteger) Int128
func (*Int128) XGo_RshAssign ¶
func (i *Int128) XGo_RshAssign(n XGo_ninteger)
XGo_RshAssign: func (a *int128) >>= (n untyped_uint)
func (*Int128) XGo_SubAssign ¶
XGo_SubAssign: func (a *int128) -= (b int128)
func (Int128) XGo_Sub__0 ¶
func (Int128) XGo_Sub__1 ¶
func (*Int128) XGo_XorAssign ¶
XGo_XorAssign: func (a *int128) ^= (b int128)
type Int128T ¶ added in v0.6.3
type Int128T = Int128
The int128 aliases pull in math/big and fmt through c/types. Bare-metal targets currently omit these types to keep the base C bindings usable.
type Uint128 ¶
type Uint128 struct {
// contains filtered or unexported fields
}
func Uint128_Cast__0 ¶
Uint128_Cast: func uint128(v untyped_int) uint128
func Uint128_Cast__1 ¶
Uint128_Cast: func uint128(v uint) uint128
func Uint128_Cast__2 ¶
Uint128_Cast: func uint128(v uint64) uint128
func Uint128_Cast__3 ¶
Uint128_Cast: func uint128(v uint32) uint128
func Uint128_Cast__4 ¶
Uint128_Cast: func uint128(v uint16) uint128
func Uint128_Cast__5 ¶
Uint128_Cast: func uint128(v uint8) uint128
func Uint128_Cast__6 ¶
Uint128_Cast: func uint128(v int64) uint128
func Uint128_Cast__7 ¶
Uint128_Cast: func uint128(v int64) (uint128, bool)
func Uint128_Cast__8 ¶
Uint128_Cast: func uint128(v *big.Int) uint128
func Uint128_Cast__9 ¶
Uint128_Cast: func uint128(v *big.Int) (uint128, bool)
func Uint128_Cast__b ¶
Uint128_Cast: func uint128(hi, lo uint64) uint128
func Uint128_Init__0 ¶
Uint128_Init: func uint128.init(v int) uint128
func (Uint128) Bit ¶
Bit returns the value of the i'th bit of x. That is, it returns (x>>i)&1. The bit index i must be 0 <= i < 128
func (Uint128) BitLen ¶
BitLen returns the length of the absolute value of u in bits. The bit length of 0 is 0.
func (Uint128) Cmp__1 ¶
Cmp compares 'u' to 'n' and returns:
< 0 if u < n 0 if u == n > 0 if u > n
The specific value returned by Cmp is undefined, but it is guaranteed to satisfy the above constraints.
func (Uint128) LeadingZeros ¶
func (Uint128) ReverseBytes ¶
func (Uint128) SetBit ¶
SetBit returns a Uint128 with u's i'th bit set to b (0 or 1). If b is not 0 or 1, SetBit will panic. If i < 0, SetBit will panic.
func (Uint128) TrailingZeros ¶
func (*Uint128) XGo_AddAssign ¶
XGo_AddAssign: func (a *uint128) += (b uint128)
func (Uint128) XGo_Add__0 ¶
func (Uint128) XGo_Add__1 ¶
func (*Uint128) XGo_AndAssign ¶
XGo_AndAssign: func (a *uint128) &= (b uint128)
func (Uint128) XGo_AndNot ¶
func (*Uint128) XGo_AndNotAssign ¶
XGo_AndNotAssign: func (a *uint128) &^= (b uint128)
func (Uint128) XGo_And__0 ¶
func (Uint128) XGo_And__1 ¶
func (Uint128) XGo_Lsh ¶
func (u Uint128) XGo_Lsh(n XGo_ninteger) Uint128
func (*Uint128) XGo_LshAssign ¶
func (u *Uint128) XGo_LshAssign(n XGo_ninteger)
XGo_LshAssign: func (a *uint128) <<= (n untyped_uint)
func (*Uint128) XGo_MulAssign ¶
XGo_MulAssign: func (a *uint128) *= (b uint128)
func (Uint128) XGo_Mul__0 ¶
func (Uint128) XGo_Mul__1 ¶
func (*Uint128) XGo_OrAssign ¶
XGo_OrAssign: func (a *uint128) |= (b uint128)
func (*Uint128) XGo_QuoAssign ¶
XGo_QuoAssign: func (a *uint128) /= (b uint128) {
func (Uint128) XGo_Quo__0 ¶
func (Uint128) XGo_Quo__1 ¶
func (Uint128) XGo_Rcast__0 ¶
XGo_Rcast: func float64(v uint128) float64
func (Uint128) XGo_Rcast__1 ¶
XGo_Rcast: func uint64(v uint128) uint64
func (Uint128) XGo_Rcast__2 ¶
XGo_Rcast: func uint64(v uint128) (uint64, bool)
func (Uint128) XGo_Rcast__3 ¶
XGo_Rcast: func int64(v uint128) int64
func (Uint128) XGo_Rcast__4 ¶
XGo_Rcast: func int64(v uint128) (int64, bool)
func (*Uint128) XGo_RemAssign ¶
XGo_RemAssign: func (a *uint128) %= (b uint128)
func (Uint128) XGo_Rem__0 ¶
func (Uint128) XGo_Rem__1 ¶
XGo_Rem: func (a uint128) % (b uint128) uint128
func (Uint128) XGo_Rsh ¶
func (u Uint128) XGo_Rsh(n XGo_ninteger) Uint128
func (*Uint128) XGo_RshAssign ¶
func (u *Uint128) XGo_RshAssign(n XGo_ninteger)
XGo_RshAssign: func (a *uint128) >>= (n untyped_uint)
func (*Uint128) XGo_SubAssign ¶
XGo_SubAssign: func (a *uint128) -= (b uint128)
func (Uint128) XGo_Sub__0 ¶
func (Uint128) XGo_Sub__1 ¶
func (*Uint128) XGo_XorAssign ¶
XGo_XorAssign: func (a *uint128) ^= (b uint128)
func (Uint128) XGo_Xor__0 ¶
func (Uint128) XGo_Xor__1 ¶
type Uint128T ¶ added in v0.6.3
type Uint128T = Uint128
The int128 aliases pull in math/big and fmt through c/types. Bare-metal targets currently omit these types to keep the base C bindings usable.
type XGo_ninteger ¶
type XGo_ninteger = uint