Documentation ¶
Index ¶
- Variables
- func CheckedAddU128(a, b wide.Uint128) (wide.Uint128, error)
- func CheckedAddU16(a, b uint16) (uint16, error)
- func CheckedAddU32(a, b uint32) (uint32, error)
- func CheckedAddU64(a, b uint64) (uint64, error)
- func CheckedAddU8(a, b uint8) (uint8, error)
- func CheckedDivU128(a, b wide.Uint128) (wide.Uint128, error)
- func CheckedDivU16(a, b uint16) (uint16, error)
- func CheckedDivU32(a, b uint32) (uint32, error)
- func CheckedDivU64(a, b uint64) (uint64, error)
- func CheckedDivU8(a, b uint8) (uint8, error)
- func CheckedMulU128(a, b wide.Uint128) (wide.Uint128, error)
- func CheckedMulU16(a, b uint16) (uint16, error)
- func CheckedMulU32(a, b uint32) (uint32, error)
- func CheckedMulU64(a, b uint64) (uint64, error)
- func CheckedMulU8(a, b uint8) (uint8, error)
- func CheckedSubU16(a, b uint16) (uint16, error)
- func CheckedSubU32(a, b uint32) (uint32, error)
- func CheckedSubU64(a, b uint64) (uint64, error)
- func CheckedSubU8(a, b uint8) (uint8, error)
- func SaturatingAddU128(a, b wide.Uint128) wide.Uint128
- func SaturatingAddU16(a, b uint16) uint16
- func SaturatingAddU32(a, b uint32) uint32
- func SaturatingAddU64(a, b uint64) uint64
- func SaturatingAddU8(a, b uint8) uint8
- func SaturatingMulU16(a, b uint16) uint16
- func SaturatingMulU32(a, b uint32) uint32
- func SaturatingMulU64(a, b uint64) uint64
- func SaturatingMulU8(a, b uint8) uint8
- func SaturatingPow(n uint64, m uint32) uint64
- func SaturatingSubU16(a, b uint16) uint16
- func SaturatingSubU32(a, b uint32) uint32
- func SaturatingSubU64(a, b uint64) uint64
- func SaturatingSubU8(a, b uint8) uint8
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckedAddU128 ¶
CheckedAddU128 adds two uint128's together, returning an error in the event of an overflow.
func CheckedAddU16 ¶
CheckedAddU16 adds two uint16's together, returning an error in the event of an overflow.
func CheckedAddU32 ¶
CheckedAddU32 adds two uint32's together, returning an error in the event of an overflow.
func CheckedAddU64 ¶
CheckedAddU64 adds two uint64's together, returning an error in the event of an overflow.
func CheckedAddU8 ¶
CheckedAddU8 adds two uint8's together, returning an error in the event of an overflow.
func CheckedDivU128 ¶
CheckedDivU128 multiplies two uint128's together, returning an error in the event of a would-be div-by-0
func CheckedDivU16 ¶
CheckedDivU16 computes `a / b` for two uint16's, returning an error in the event that b is 0
func CheckedDivU32 ¶
CheckedDivU32 computes `a / b` for two uint32's, returning an error in the event that b is 0
func CheckedDivU64 ¶
CheckedDivU64 computes `a / b` for two uint64's, returning an error in the event that b is 0
func CheckedDivU8 ¶
CheckedDivU8 computes `a / b` for two uint8's, returning an error in the event that b is 0
func CheckedMulU128 ¶
CheckedMulU128 multiplies two uint128's together, returning an error in the event of an overflow.
func CheckedMulU16 ¶
CheckedMulU16 multiplies two uint16's together, returning an error in the event of an overflow.
func CheckedMulU32 ¶
CheckedMulU32 multiplies two uint32's together, returning an error in the event of an overflow.
func CheckedMulU64 ¶
CheckedMulU64 multiplies two uint64's together, returning an error in the event of an overflow.
func CheckedMulU8 ¶
CheckedMulU8 multiplies two uint8's together, returning an error in the event of an overflow.
func CheckedSubU16 ¶
CheckedSubU16 computes `a - b` for two uint16's, returning an error in the event that a is smaller than b
func CheckedSubU32 ¶
CheckedSubU32 computes `a - b` for two uint32's, returning an error in the event that a is smaller than b
func CheckedSubU64 ¶
CheckedSubU64 computes `a - b` for two uint64's, returning an error in the event that a is smaller than b
func CheckedSubU8 ¶
CheckedSubU8 computes `a - b` for two uint8's returning an error in the event that a is smaller than b
func SaturatingAddU16 ¶
SaturatingAddU16 adds two uint16's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingAddU32 ¶
SaturatingAddU32 adds two uint32's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingAddU64 ¶
SaturatingAddU64 adds two uint64's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingAddU8 ¶
SaturatingAddU8 adds two uint8's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingMulU16 ¶
SaturatingMulU16 multiplies two uint16's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingMulU32 ¶
SaturatingMulU32 multiplies two uint32's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingMulU64 ¶
SaturatingMulU64 multiplies two uint64's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingMulU8 ¶
SaturatingMulU8 multiplies two uint8's together and saturates at the numerical boundary if an overflow would have occurred.
func SaturatingPow ¶
func SaturatingSubU16 ¶
SaturatingSubU16 computes `a - b` for two uint16's and saturates at the numerical boundary (zero) if an underflow would have occurred.
func SaturatingSubU32 ¶
SaturatingSubU32 computes `a - b` for two uint32's and saturates at the numerical boundary (zero) if an underflow would have occurred.
func SaturatingSubU64 ¶
SaturatingSubU64 computes `a - b` for two uint64's and saturates at the numerical boundary (zero) if an underflow would have occurred.
func SaturatingSubU8 ¶
SaturatingSubU8 computes `a - b` for two uint8's and saturates at the numerical boundary if an underflow would have occurred.
Types ¶
This section is empty.