Documentation ¶
Overview ¶
Package bigmath compensates for awkward big.Int API. Can cause an extra allocation or two.
Index ¶
- Variables
- func Add(addend1, addend2 interface{}) *big.Int
- func Div(dividend, divisor interface{}) *big.Int
- func Equal(left, right interface{}) bool
- func Exp(base, exponent, modulus interface{}) *big.Int
- func I() *big.Int
- func Mod(dividend, divisor interface{}) *big.Int
- func Mul(multiplicand, multiplier interface{}) *big.Int
- func Sub(minuend, subtrahend interface{}) *big.Int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Zero = big.NewInt(0) One = big.NewInt(1) Two = big.NewInt(2) Three = big.NewInt(3) Four = big.NewInt(4) Seven = big.NewInt(7) )
nolint
Functions ¶
func Add ¶
Add performs addition with the given values after coercing them to big.Int, or panics if it cannot.
func Div ¶
Div performs division with the given values after coercing them to big.Int, or panics if it cannot.
func Equal ¶
func Equal(left, right interface{}) bool
Equal compares the given values after coercing them to big.Int, or panics if it cannot.
func Exp ¶
Exp performs modular eponentiation with the given values after coercing them to big.Int, or panics if it cannot.
func Mod ¶
Mod performs modulus with the given values after coercing them to big.Int, or panics if it cannot.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.