Documentation ¶
Index ¶
- type Calculator
- func (Calculator) Add(augend, addend *big.Int) *big.Int
- func (Calculator) Compare(a, b *big.Int) calculator.CompareResult
- func (Calculator) Decrement(value *big.Int) *big.Int
- func (Calculator) Increment(value *big.Int) *big.Int
- func (Calculator) IntegerDivide(dividend, divisor *big.Int) (*big.Int, error)
- func (Calculator) Modulo(dividend, divisor *big.Int) (*big.Int, error)
- func (Calculator) Multiply(multiplicand, multiplier *big.Int) *big.Int
- func (c Calculator) Power(base, exponent *big.Int) *big.Int
- func (Calculator) Subtract(minuend, subtrahend *big.Int) *big.Int
- func (Calculator) ToInt(v *big.Int) int
- func (Calculator) ToString(v *big.Int) string
- func (Calculator) Zero() *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator struct{}
func (Calculator) Compare ¶
func (Calculator) Compare(a, b *big.Int) calculator.CompareResult
func (Calculator) Decrement ¶
func (Calculator) Decrement(value *big.Int) *big.Int
Returns an decremented number.
@param value - The number to decrement.
@returns The decremented number.
func (Calculator) Increment ¶
func (Calculator) Increment(value *big.Int) *big.Int
Returns an incremented number.
@param value - The number to increment.
@returns The incremented number.
func (Calculator) IntegerDivide ¶
Returns the quotient of two numbers with no fractional part.
func (Calculator) Multiply ¶
func (Calculator) Multiply(multiplicand, multiplier *big.Int) *big.Int
Returns the product of two numbers.
@param multiplicand - The number to multiply. @param multiplier - The number to multiply with.
@returns The product of the two numbers.
func (Calculator) Power ¶
func (c Calculator) Power(base, exponent *big.Int) *big.Int
Returns the product of two numbers.
Click to show internal directories.
Click to hide internal directories.