Documentation
¶
Index ¶
- Constants
- func F128ToI32(a Float128, roundingMode uint8, exact bool) int32
- func F128ToI64(a Float128, roundingMode uint8, exact bool) int64
- func F128ToUi32(a Float128, roundingMode uint8, exact bool) uint32
- func F128ToUi64(a Float128, roundingMode uint8, exact bool) uint64
- func Floattidf(a Int128) float64
- func Floatuntidf(a Uint128) float64
- func MustParseUint64(s string) uint64
- func ParseUint64(s string) (uint64, bool)
- func SafeAdd(x, y uint64) (uint64, bool)
- func SafeMul(x, y uint64) (uint64, bool)
- func SafeSub(x, y uint64) (uint64, bool)
- type ExtFloat80M
- type ExtFloat80_t
- type Float128
- func (a Float128) Add(b Float128) Float128
- func (f Float128) Bytes() []byte
- func (a Float128) Div(b Float128) Float128
- func (f Float128) F128EQ(b Float128) bool
- func (f Float128) F128Lt(b Float128) bool
- func (f *Float128) IsNan() bool
- func (a Float128) Mul(b Float128) Float128
- func (f Float128) String() string
- func (a Float128) Sub(b Float128) Float128
- type Float16
- type Float32
- type Float64
- type HexOrDecimal64
- type Int128
- func (u Int128) Add(v Int128) Int128
- func (u Int128) Div(v Int128) (Int128, Int128)
- func (u Int128) GetAt(i uint) bool
- func (u Int128) IsZero() bool
- func (u *Int128) LeftShift()
- func (u *Int128) LeftShifts(shift int)
- func (u Int128) Mul(v Int128) Int128
- func (u *Int128) RightShift()
- func (u *Int128) RightShifts(shift int)
- func (u *Int128) Set(i uint, b uint)
- func (u Int128) String() string
- func (u Int128) Sub(v Int128) Int128
- func (u Int128) ToTrueForm() Uint128
- type Mant
- type Uint128
- func (u Uint128) Add(v Uint128) Uint128
- func (u Uint128) And(v Uint128) Uint128
- func (u Uint128) Compare(v Uint128) int
- func (u Uint128) Div(divisor Uint128) (Uint128, Uint128)
- func (u Uint128) GetAt(i uint) bool
- func (u Uint128) IsZero() bool
- func (u *Uint128) LeftShift()
- func (u *Uint128) LeftShifts(shift int)
- func (u Uint128) Mul(v Uint128) Uint128
- func (u Uint128) Or(v Uint128) Uint128
- func (u *Uint128) RightShift()
- func (u *Uint128) RightShifts(shift int)
- func (u *Uint128) RightShifts2(shift int) Uint128
- func (u *Uint128) Set(i uint, b uint)
- func (u Uint128) Sqrt() uint64
- func (u Uint128) String() string
- func (u Uint128) Sub(v Uint128) Uint128
- func (u Uint128) ToComplement() Int128
- func (u Uint128) ToUint128Bytes() Uint128Bytes
- type Uint128Bytes
- type Uint256
- func (u Uint256) Add(v Uint256) Uint256
- func (u Uint256) Compare(v Uint256) int
- func (u Uint256) Div(divisor Uint256) (Uint256, Uint256)
- func (u Uint256) GetAt(i uint) bool
- func (u Uint256) IsZero() bool
- func (u *Uint256) LeftShift()
- func (u *Uint256) LeftShifts(shift int)
- func (u Uint256) Mul(v Uint256) Uint256
- func (u *Uint256) RightShift()
- func (u *Uint256) RightShifts(shift int)
- func (u *Uint256) Set(i uint, b uint)
- func (u Uint256) String() string
- func (u Uint256) Sub(v Uint256) Uint256
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 )
Integer limit values.
View Source
const DBL_MANT_DIG = 53
seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
Variables ¶
This section is empty.
Functions ¶
func Floatuntidf ¶
seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
func MustParseUint64 ¶
MustParseUint64 parses s as an integer and panics if the string is invalid.
func ParseUint64 ¶
ParseUint64 parses s as an integer in decimal or hexadecimal syntax. Leading zeros are accepted. The empty string parses as zero.
Types ¶
type ExtFloat80M ¶
type ExtFloat80M struct {
// contains filtered or unexported fields
}
type ExtFloat80_t ¶
type ExtFloat80_t ExtFloat80M
type HexOrDecimal64 ¶
type HexOrDecimal64 uint64
HexOrDecimal64 marshals uint64 as hex or decimal.
func (HexOrDecimal64) MarshalText ¶
func (i HexOrDecimal64) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*HexOrDecimal64) UnmarshalText ¶
func (i *HexOrDecimal64) UnmarshalText(input []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
type Int128 ¶
func CreateInt128 ¶
func (*Int128) LeftShifts ¶
func (*Int128) RightShift ¶
func (u *Int128) RightShift()
func (*Int128) RightShifts ¶
func (Int128) ToTrueForm ¶
type Uint128 ¶
func CreateUint128 ¶
func Fixunsdfti ¶
func Fixunssfti ¶
func Fixunstfti ¶
func MaxUint128 ¶
func MaxUint128() Uint128
func MinUint128 ¶
func MinUint128() Uint128
func (*Uint128) LeftShifts ¶
func (*Uint128) RightShift ¶
func (u *Uint128) RightShift()
func (*Uint128) RightShifts ¶
func (*Uint128) RightShifts2 ¶
func (Uint128) ToComplement ¶
func (Uint128) ToUint128Bytes ¶
func (u Uint128) ToUint128Bytes() Uint128Bytes
type Uint128Bytes ¶
type Uint256 ¶
func (*Uint256) LeftShifts ¶
func (*Uint256) RightShift ¶
func (u *Uint256) RightShift()
func (*Uint256) RightShifts ¶
Source Files
¶
- decimal.go
- f128_add.go
- f128_div.go
- f128_lt.go
- f128_mul.go
- f128_string.go
- f128_sub.go
- f128_to_extF80.go
- f128_to_f.go
- f128_to_i.go
- f_to_f128.go
- fixdfti.go
- fixsfti.go
- fixtfti.go
- fixunsdfti.go
- fixunssfti.go
- fixunstfti.go
- float_types.go
- floattidf.go
- floatuntidf.go
- i32_to_f64.go
- i_to_f128.go
- int128.go
- integer.go
- primitives.go
- s_roundPackToF128.go
- s_shiftRightJam128.go
- uint128.go
- uint256.go
Click to show internal directories.
Click to hide internal directories.