Skip to content

Commit c1d093f

Browse files
committed
fix
1 parent ede08ee commit c1d093f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cp-algo/math/fft.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace cp_algo::math::fft {
3333
base step = bpow(factor, n);
3434
for(size_t i = 0; i < std::min(n, size(a)); i++) {
3535
auto splt = [&](size_t i, auto mul) {
36-
auto ai = i < size(a) ? (a[i] * mul).getr() : 0;
36+
auto ai = i < size(a) ? (a[i] * mul).rem() : 0;
3737
auto quo = ai / split;
3838
auto rem = ai % split;
3939
return std::pair{(ftype)rem, (ftype)quo};
@@ -212,6 +212,7 @@ namespace cp_algo::math::fft {
212212
b0.resize(n); b1.resize(n);
213213
auto a01 = to<std::vector>(std::views::zip_transform(std::plus{}, a0, a1));
214214
auto b01 = to<std::vector>(std::views::zip_transform(std::plus{}, b0, b1));
215+
checkpoint("karatsuba split");
215216
mul(a0, b0);
216217
mul(a1, b1);
217218
mul(a01, b01);

0 commit comments

Comments
 (0)