summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorMZuenni <michi.zuendorf@gmail.com>2023-02-13 16:46:09 +0100
committerMZuenni <michi.zuendorf@gmail.com>2023-02-13 16:46:09 +0100
commit54946c9945857e42b8eb4025a66d3344bd53f07c (patch)
tree083a4f68ac29dd31865474fcec4e0743520a13ea /math
parentcd657bcfa53ee3b5b200820b9d5bad510d098920 (diff)
reformatted lineendings
Diffstat (limited to 'math')
-rw-r--r--math/berlekampMassey.cpp3
-rw-r--r--math/bigint.cpp2
-rw-r--r--math/divisors.cpp2
-rw-r--r--math/linearCongruence.cpp2
-rw-r--r--math/matrixPower.cpp2
-rw-r--r--math/piLehmer.cpp2
-rw-r--r--math/primitiveRoot.cpp2
-rw-r--r--math/tables/nim.tex2
-rw-r--r--math/tables/series.tex2
-rw-r--r--math/tables/twelvefold.tex2
-rw-r--r--math/transforms/andTransform.cpp2
11 files changed, 12 insertions, 11 deletions
diff --git a/math/berlekampMassey.cpp b/math/berlekampMassey.cpp
index 4999254..b0c1902 100644
--- a/math/berlekampMassey.cpp
+++ b/math/berlekampMassey.cpp
@@ -1,3 +1,4 @@
+constexpr ll mod = 1000000007;
vector<ll> BerlekampMassey(const vector<ll>& s) {
int n = sz(s), L = 0, m = 0;
vector<ll> C(n), B(n), T;
@@ -27,4 +28,4 @@ vector<ll> BerlekampMassey(const vector<ll>& s) {
C.erase(C.begin());
for (auto& x : C) x = (mod - x) % mod;
return C;
-} \ No newline at end of file
+}
diff --git a/math/bigint.cpp b/math/bigint.cpp
index 59d6afe..df28a73 100644
--- a/math/bigint.cpp
+++ b/math/bigint.cpp
@@ -272,4 +272,4 @@ struct bigint {
res.trim();
return res;
}
-}; \ No newline at end of file
+};
diff --git a/math/divisors.cpp b/math/divisors.cpp
index 638c87c..5afd4fb 100644
--- a/math/divisors.cpp
+++ b/math/divisors.cpp
@@ -8,4 +8,4 @@ ll countDivisors(ll n) {
if (isPrime(n)) res *= 2;
else if (n > 1) res *= isSquare(n) ? 3 : 4;
return res;
-} \ No newline at end of file
+}
diff --git a/math/linearCongruence.cpp b/math/linearCongruence.cpp
index b4f172d..cdb5a37 100644
--- a/math/linearCongruence.cpp
+++ b/math/linearCongruence.cpp
@@ -2,4 +2,4 @@ ll solveLinearCongruence(ll a, ll b, ll m) {
ll g = gcd(a, m);
if (b % g != 0) return -1;
return ((b / g) * multInv(a / g, m / g)) % (m / g);
-} \ No newline at end of file
+}
diff --git a/math/matrixPower.cpp b/math/matrixPower.cpp
index d3c1b63..05e29f6 100644
--- a/math/matrixPower.cpp
+++ b/math/matrixPower.cpp
@@ -13,4 +13,4 @@ ll calc(int x, int y, ll b) {
b /= 2;
}
return v[y];
-} \ No newline at end of file
+}
diff --git a/math/piLehmer.cpp b/math/piLehmer.cpp
index 4d1780f..56c172d 100644
--- a/math/piLehmer.cpp
+++ b/math/piLehmer.cpp
@@ -49,4 +49,4 @@ ll pi(ll n) {
res -= pi(w / primes[j]) - j;
}}
return res;
-} \ No newline at end of file
+}
diff --git a/math/primitiveRoot.cpp b/math/primitiveRoot.cpp
index 36a9367..7973c24 100644
--- a/math/primitiveRoot.cpp
+++ b/math/primitiveRoot.cpp
@@ -20,4 +20,4 @@ ll findPrimitive(ll n) {
for (ll res = 1; res < n; res++)
if (isPrimitive(res, n, phin, phiFacs)) return res;
return -1;
-} \ No newline at end of file
+}
diff --git a/math/tables/nim.tex b/math/tables/nim.tex
index 75585f4..8490d42 100644
--- a/math/tables/nim.tex
+++ b/math/tables/nim.tex
@@ -93,4 +93,4 @@
$n \in [72,83]: \quad 4, 1, 2, 8, 1, 4, 7, 2, 1, 8, 2, 7$\newline
Periode ab $n = 72$ der Länge $12$.\\
\hline
-\end{tabularx} \ No newline at end of file
+\end{tabularx}
diff --git a/math/tables/series.tex b/math/tables/series.tex
index 13af68f..f7e7839 100644
--- a/math/tables/series.tex
+++ b/math/tables/series.tex
@@ -30,4 +30,4 @@
\binom{n + 1}{m + 1} \left(H_{n + 1} - \frac{1}{m + 1}\right)$
} \\
\hline
-\end{tabularx} \ No newline at end of file
+\end{tabularx}
diff --git a/math/tables/twelvefold.tex b/math/tables/twelvefold.tex
index 7f7e27a..b8ab56d 100644
--- a/math/tables/twelvefold.tex
+++ b/math/tables/twelvefold.tex
@@ -29,4 +29,4 @@
} \\
\hline
\end{tabularx}
-\end{expandtable} \ No newline at end of file
+\end{expandtable}
diff --git a/math/transforms/andTransform.cpp b/math/transforms/andTransform.cpp
index cdc7b22..32496d8 100644
--- a/math/transforms/andTransform.cpp
+++ b/math/transforms/andTransform.cpp
@@ -14,4 +14,4 @@ void fft(vector<cplx>& a, bool inverse = 0) {
} else {
a[j + k] = t - u;
a[j + s + k] = u;
-}}}} \ No newline at end of file
+}}}}