We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 094f2a7 commit 3e6a57aCopy full SHA for 3e6a57a
cp-algo/math/fft.hpp
@@ -87,7 +87,7 @@ namespace cp_algo::math::fft {
87
pt cur;
88
pt arg = to_pt<pt>(root<point>(n, step));
89
for(size_t i = 0; i < m; i += step) {
90
- if(i % 64 == 0 || n < pre_roots) {
+ if(i % 32 == 0 || n < pre_roots) {
91
cur = root<pt>(n, i);
92
} else {
93
cur *= arg;
@@ -274,7 +274,7 @@ namespace cp_algo::math::fft {
274
a.resize(k);
275
for(int j = int(k - 1); j >= 0; j--) {
276
a[j] *= b[0];
277
- for(size_t i = std::max<size_t>(j - n, 0) + 1; i < std::min<size_t>(j + 1, m); i++) {
+ for(int i = std::max(j - (int)n, 0) + 1; i < std::min(j + 1, (int)m); i++) {
278
a[j] += a[j - i] * b[i];
279
}
280
0 commit comments