Skip to content

Commit e908de2

Browse files
committed
Update fft
1 parent 52c1fa2 commit e908de2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cp-algo/math/fft.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ namespace cp_algo::math::fft {
9696
pt cur;
9797
pt arg = to_pt<pt>(root<point>(n, step));
9898
for(size_t i = 0; i < m; i += step) {
99-
cur = (i & 63) == 0 || n < pre_roots ? root<pt>(n, i) : cur * arg;
99+
if(i % 64 == 0 || n < pre_roots) {
100+
cur = root<pt>(n, i);
101+
} else {
102+
cur *= arg;
103+
}
100104
callback(i, cur);
101105
}
102106
}

0 commit comments

Comments
 (0)