Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Fast modular multiplication for Word32
using 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.0
Barrett
Fast modular multiplication using barrett reduction. Reference: https://en.wikipedia.org/wiki/Barrett_reduction
Since: 1.0.0.0