Documentation ¶
Index ¶
- Variables
- func Abs(x *int256.Int) *int256.Int
- func AbsZ(x *int256.Int, result *int256.Int) *int256.Int
- func Add(x, y *int256.Int) *int256.Int
- func Div(x, y *int256.Int) *int256.Int
- func Lsh(x *int256.Int, n uint) *int256.Int
- func Mul(x, y *int256.Int) *int256.Int
- func MustFromDecimal(s string) *int256.Int
- func Neg(x *int256.Int) *int256.Int
- func Rsh(x *int256.Int, n uint) *int256.Int
- func SafeConvertToInt256(value *uint256.Int, result *int256.Int) error
- func SafeConvertToUInt256(value *int256.Int) *uint256.Int
- func SafeToInt256(value *uint256.Int) *int256.Int
- func Set(x *int256.Int) *int256.Int
- func SetInt64(x int64) *int256.Int
- func Sub(x, y *int256.Int) *int256.Int
- func UnsafeCastToUInt256(value *int256.Int, result *uint256.Int)
- func UnsafeToUInt256(value *int256.Int) *uint256.Int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Number_1 = int256.NewInt(1) Number_2 = int256.NewInt(2) Number_3 = int256.NewInt(3) Number_4 = int256.NewInt(4) Number_10 = int256.NewInt(10) )
View Source
var (
ErrNegative = errors.New("convert negative i256 to u256")
)
Functions ¶
func MustFromDecimal ¶
func SafeConvertToInt256 ¶
safely convert uint256 to int256
func SafeConvertToUInt256 ¶
safely convert to u256 (negative numbers will panic)
func SafeToInt256 ¶
safely convert uint256 to int256
func UnsafeCastToUInt256 ¶
cast the bytes directly without checking for negative (-1 -> 2^256-1)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.