Skip to content

Commit

Permalink
Fixed erroneous inequality
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn-martinsson committed Jun 16, 2020
1 parent 4aa1734 commit 8399462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyrival/algebra/mod_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This template is useful for problems involving a prime modulo.
The template contains a fast function for calculating a * b % MOD,
as well as precalculating factorial, inverse factorial, modular inverse
for all numbers <= maxN in O(maxN) time.
for all integers < maxN in O(maxN) time.
With this template, one can for example quickly calculate n choose k mod MOD,
or calculate matrix multiplication mod MOD.
Expand Down Expand Up @@ -38,7 +38,7 @@ def modmul(a, b):
modmul = fast_modder(MOD)

def mod_precalc():
""" Calculates fac, inv_fac and mod_inv for i <= maxN in O(maxN) time """
""" Calculates fac, inv_fac and mod_inv for i < maxN in O(maxN) time """
assert maxN <= MOD

fac = [1] * maxN
Expand Down

0 comments on commit 8399462

Please sign in to comment.