modular_arithmetic

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorIntOverflow = errors.New("Integer Overflow")

ErrorIntOverflow For asserting that the values do not overflow in Int64

View Source
var ErrorNegativeExponent = errors.New("Negative Exponent Provided")

ErrorNegativeExponent for asserting that the exponent we receive is positive

Functions

func ModularExponentiation

func ModularExponentiation(base, exponent, mod int64) (int64, error)

ModularExponentiation returns base^exponent % mod

func Multiply64BitInt

func Multiply64BitInt(left, right int64) (int64, error)

Multiply64BitInt Checking if the integer multiplication overflows

Types

This section is empty.

Jump to

Keyboard shortcuts

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