big

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

type Calculator struct{}

func (Calculator) Add

func (Calculator) Add(augend, addend *big.Int) *big.Int

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

func (Calculator) IntegerDivide(dividend, divisor *big.Int) (*big.Int, error)

Returns the quotient of two numbers with no fractional part.

func (Calculator) Modulo

func (Calculator) Modulo(dividend, divisor *big.Int) (*big.Int, error)

Returns the modulous of two numbers.

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.

func (Calculator) Subtract

func (Calculator) Subtract(minuend, subtrahend *big.Int) *big.Int

Returns the difference between two numbers.

@param minuend - The number to subtract from. @param subtrahend - The number to subtract.

@returns The difference of the two numbers.

func (Calculator) ToInt

func (Calculator) ToInt(v *big.Int) int

func (Calculator) ToString

func (Calculator) ToString(v *big.Int) string

func (Calculator) Zero

func (Calculator) Zero() *big.Int

Returns a value equal to 0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL