Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 366 Bytes

README.md

File metadata and controls

13 lines (10 loc) · 366 Bytes

go-exptable

Compute tables to speed up Go's math/big.Int modular exponentiation for fixed base.

var table exptable.Table
table.Compute(&base, &m, 4)   // precomputes table for the given base
table.Exp(&result, &exponent) // sets result to base^exponent modulo m

Documentation at godoc.