struct Barrett
- Barrett
- Struct
- Value
- Object
Defined in:
math/barrett.crConstructors
-
.new(mod)
Requires
1 <= mod < 2^31
Instance Method Summary
- #inv : UInt64
- #mod : UInt32
-
#mul(a : UInt32, b : UInt32) : UInt32
Caluclates
a * b % mod
.
Constructor Detail
Instance Method Detail
def mul(a : UInt32, b : UInt32) : UInt32
#
Caluclates a * b % mod
.
Requires 0 <= a < mod
and 0 <= b < mod