File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ void butterfly(std::vector<mint>& a) {
77
77
a[i + offset] = l + r;
78
78
a[i + offset + p] = l - r;
79
79
}
80
- if (s + 1 != (1 << len)) rot *= info.rate2 [bsf (~(unsigned int )(s))];
80
+ if (s + 1 != (1 << len))
81
+ rot *= info.rate2 [bsf (~(unsigned int )(s))];
81
82
}
82
83
len++;
83
84
} else {
@@ -102,7 +103,8 @@ void butterfly(std::vector<mint>& a) {
102
103
a[i + offset + 2 * p] = a0 + na2 + a1na3imag;
103
104
a[i + offset + 3 * p] = a0 + na2 + (mod2 - a1na3imag);
104
105
}
105
- if (s + 1 != (1 << len)) rot *= info.rate3 [bsf (~(unsigned int )(s))];
106
+ if (s + 1 != (1 << len))
107
+ rot *= info.rate3 [bsf (~(unsigned int )(s))];
106
108
}
107
109
len += 2 ;
108
110
}
@@ -132,7 +134,8 @@ void butterfly_inv(std::vector<mint>& a) {
132
134
irot.val ();
133
135
;
134
136
}
135
- if (s + 1 != (1 << len)) irot *= info.irate2 [bsf (~(unsigned int )(s))];
137
+ if (s + 1 != (1 << (len - 1 )))
138
+ irot *= info.irate2 [bsf (~(unsigned int )(s))];
136
139
}
137
140
len--;
138
141
} else {
@@ -163,7 +166,8 @@ void butterfly_inv(std::vector<mint>& a) {
163
166
(a0 + (mint::mod () - a1) + (mint::mod () - a2na3iimag)) *
164
167
irot3.val ();
165
168
}
166
- if (s + 1 != (1 << len)) irot *= info.irate3 [bsf (~(unsigned int )(s))];
169
+ if (s + 1 != (1 << (len - 2 )))
170
+ irot *= info.irate3 [bsf (~(unsigned int )(s))];
167
171
}
168
172
len -= 2 ;
169
173
}
You can’t perform that action at this time.
0 commit comments