summaryrefslogtreecommitdiff
path: root/math/transforms/all.cpp
diff options
context:
space:
mode:
authorMZuenni <michi.zuendorf@gmail.com>2023-02-13 19:39:30 +0100
committerMZuenni <michi.zuendorf@gmail.com>2023-02-13 19:39:30 +0100
commit3a98de95336d3deb5d78cafdde6cc63dc3fd5f4f (patch)
tree30f0428accc66062a07026a2bfa15fb88647523d /math/transforms/all.cpp
parent54946c9945857e42b8eb4025a66d3344bd53f07c (diff)
squezed in new code :D
Diffstat (limited to 'math/transforms/all.cpp')
-rw-r--r--math/transforms/all.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/math/transforms/all.cpp b/math/transforms/all.cpp
index 4f4d83b..22cd5b5 100644
--- a/math/transforms/all.cpp
+++ b/math/transforms/all.cpp
@@ -24,8 +24,7 @@ void fft(vector<cplx>& a, bool inverse = 0) {
t %= mod;
a[j + k] = (u + t) % mod;
a[j + s + k] = (u - t + mod) % mod;
- w *= ws;
- w %= mod;*/
+ w = (w * ws) % mod;*/
/*ll u = a[j + k], t = a[j + s + k]; @\hl{xor only}@
a[j + k] = u + t;
a[j + s + k] = u - t;*/
@@ -52,8 +51,7 @@ void fft(vector<cplx>& a, bool inverse = 0) {
/*if (inverse) { @\hl{NTT only}@
ll div = powMod(n, mod - 2, mod);
for (ll i = 0; i < n; i++) {
- a[i] *= div;
- a[i] %= mod;
+ a[i] = (a[i] * div) % mod;
}}*/
/*if (inverse) { @\hl{xor only}@
for (ll i = 0; i < n; i++) {