bigmath

package
v1.3.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package bigmath compensates for awkward big.Int API. Can cause an extra allocation or two.

Index

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

func Add(addend1, addend2 interface{}) *big.Int

Add performs addition with the given values after coercing them to big.Int, or panics if it cannot.

func Div

func Div(dividend, divisor interface{}) *big.Int

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

func Exp(base, exponent, modulus interface{}) *big.Int

Exp performs modular eponentiation with the given values after coercing them to big.Int, or panics if it cannot.

func I

func I() *big.Int

I returns a new big.Int.

func Mod

func Mod(dividend, divisor interface{}) *big.Int

Mod performs modulus with the given values after coercing them to big.Int, or panics if it cannot.

func Mul

func Mul(multiplicand, multiplier interface{}) *big.Int

Mul performs multiplication with the given values after coercing them to big.Int, or panics if it cannot.

func Sub

func Sub(minuend, subtrahend interface{}) *big.Int

Sub performs subtraction with the given values after coercing them to big.Int, or panics if it cannot.

Types

This section is empty.

Jump to

Keyboard shortcuts

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