Safe Haskell | None |
---|---|
Language | GHC2021 |
Fast modular multiplication by barrett reduction. Reference: https://en.wikipedia.org/wiki/Barrett_reduction
Example
>>>
let bt = new32 10 -- mod 10
>>>
umod bt
10>>>
mulMod bt 7 7
9
Since: 1.0.0
Barrett
Fast modular multiplication by barrett reduction. Reference: https://en.wikipedia.org/wiki/Barrett_reduction
Since: 1.0.0
Instances
Constructors
Creates barret reduction for modulus \(m\) from a Word32
value.
Since: 1.0.0
Creates barret reduction for modulus \(m\) from a Word64
value.
Since: 1.0.0