Skip to content

Commit a2e17f8

Browse files
committed
Fixes
1 parent b9a76f2 commit a2e17f8

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

cp-algo/linalg/frobenius.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace cp_algo::linalg {
2525
}
2626
y.normalize();
2727
if(vec<base>(y[std::slice(0, n, 1)]) == vec<base>(n)) {
28-
return polyn(polyn::Vector(begin(y) + n, end(y)));
28+
return polyn(typename polyn::Vector(begin(y) + n, end(y)));
2929
} else {
3030
basis_init.push_back(x);
3131
basis.push_back(y);

cp-algo/math/fft.hpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ namespace cp_algo::math::fft {
1111
struct dft {
1212
cvector A, B;
1313
static base factor, ifactor;
14+
using Int2 = base::Int2;
1415
static bool init;
1516
static int split;
1617

@@ -28,7 +29,7 @@ namespace cp_algo::math::fft {
2829
auto ai = i < size(a) ? (a[i] * mul).rem_direct() : 0;
2930
auto rem = ai % split;
3031
auto quo = (ai - rem) / split;
31-
return std::pair{rem, quo};
32+
return std::pair{(ftype)rem, (ftype)quo};
3233
};
3334
auto [rai, qai] = splt(i, cur);
3435
auto [rani, qani] = splt(n + i, cur * step);
@@ -91,15 +92,15 @@ namespace cp_algo::math::fft {
9192
auto Ai = A.get(i) * rt;
9293
auto Bi = B.get(i) * rt;
9394
auto Ci = C.get(i) * rt;
94-
int64_t A0 = llround(real(Ai));
95-
int64_t A1 = llround(real(Ci));
96-
int64_t A2 = llround(real(Bi));
95+
Int2 A0 = llround(real(Ai));
96+
Int2 A1 = llround(real(Ci));
97+
Int2 A2 = llround(real(Bi));
9798
res[i].setr_direct(base::m_reduce(A0 + A1 * split + A2 * splitsplit));
9899
res[i] *= cur;
99100
if(n + i < k) {
100-
int64_t B0 = llround(imag(Ai));
101-
int64_t B1 = llround(imag(Ci));
102-
int64_t B2 = llround(imag(Bi));
101+
Int2 B0 = llround(imag(Ai));
102+
Int2 B1 = llround(imag(Ci));
103+
Int2 B2 = llround(imag(Bi));
103104
res[n + i].setr_direct(base::m_reduce(B0 + B1 * split + B2 * splitsplit));
104105
res[n + i] *= cur * step;
105106
}

cp-algo/math/poly.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ namespace cp_algo::math {
441441
if(n == 1) {
442442
return *this;
443443
} else {
444-
return std::vector{(*this)[1], (*this)[0] - (*this)[1]};
444+
return Vector{(*this)[1], (*this)[0] - (*this)[1]};
445445
}
446446
}
447447
Vector y(n);

0 commit comments

Comments
 (0)