We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ede08ee commit c1d093fCopy full SHA for c1d093f
cp-algo/math/fft.hpp
@@ -33,7 +33,7 @@ namespace cp_algo::math::fft {
33
base step = bpow(factor, n);
34
for(size_t i = 0; i < std::min(n, size(a)); i++) {
35
auto splt = [&](size_t i, auto mul) {
36
- auto ai = i < size(a) ? (a[i] * mul).getr() : 0;
+ auto ai = i < size(a) ? (a[i] * mul).rem() : 0;
37
auto quo = ai / split;
38
auto rem = ai % split;
39
return std::pair{(ftype)rem, (ftype)quo};
@@ -212,6 +212,7 @@ namespace cp_algo::math::fft {
212
b0.resize(n); b1.resize(n);
213
auto a01 = to<std::vector>(std::views::zip_transform(std::plus{}, a0, a1));
214
auto b01 = to<std::vector>(std::views::zip_transform(std::plus{}, b0, b1));
215
+ checkpoint("karatsuba split");
216
mul(a0, b0);
217
mul(a1, b1);
218
mul(a01, b01);
0 commit comments