Skip to content

Commit 54f7f17

Browse files
authored
Merge pull request #7 from koba-e964/patch-1
Fix mistakes in internal_math.hpp
2 parents 61a1371 + 4f284ea commit 54f7f17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

atcoder/internal_math.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ constexpr long long safe_mod(long long x, long long m) {
1515
return x;
1616
}
1717

18-
// Fast modular by barrett reduction
18+
// Fast modular multiplication by barrett reduction
1919
// Reference: https://en.wikipedia.org/wiki/Barrett_reduction
2020
// NOTE: reconsider after Ice Lake
2121
struct barrett {
2222
unsigned int _m;
2323
unsigned long long im;
2424

25-
// @param m `1 <= m`
25+
// @param m `1 <= m < 2^31`
2626
barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
2727

2828
// @return m

0 commit comments

Comments
 (0)