summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorMZuenni <michi.zuendorf@gmail.com>2023-03-01 12:50:38 +0100
committerMZuenni <michi.zuendorf@gmail.com>2023-03-01 12:50:38 +0100
commit24f0c12468a2d66dcae1a3204d949b195daffb38 (patch)
treee4692b055f15b596a9dab1c25af272a70f16c93a /math
parent12afe719ce268bb10aa93a910079a44eb08999b8 (diff)
added digit separator
Diffstat (limited to 'math')
-rw-r--r--math/berlekampMassey.cpp2
-rw-r--r--math/bigint.cpp2
-rw-r--r--math/binomial2.cpp2
-rw-r--r--math/linearRecurence.cpp2
-rw-r--r--math/linearSieve.cpp2
-rw-r--r--math/primeSieve.cpp2
-rw-r--r--math/squfof.cpp2
7 files changed, 7 insertions, 7 deletions
diff --git a/math/berlekampMassey.cpp b/math/berlekampMassey.cpp
index 734c07e..29e084f 100644
--- a/math/berlekampMassey.cpp
+++ b/math/berlekampMassey.cpp
@@ -1,4 +1,4 @@
-constexpr ll mod = 1000000007;
+constexpr ll mod = 1'000'000'007;
vector<ll> BerlekampMassey(const vector<ll>& s) {
int n = sz(s), L = 0, m = 0;
vector<ll> C(n), B(n), T;
diff --git a/math/bigint.cpp b/math/bigint.cpp
index df28a73..6f83a93 100644
--- a/math/bigint.cpp
+++ b/math/bigint.cpp
@@ -1,5 +1,5 @@
// base and base_digits must be consistent
-constexpr ll base = 1000000;
+constexpr ll base = 1'000'000;
constexpr ll base_digits = 6;
struct bigint {
vll a; ll sign;
diff --git a/math/binomial2.cpp b/math/binomial2.cpp
index 2ddcfe9..4531505 100644
--- a/math/binomial2.cpp
+++ b/math/binomial2.cpp
@@ -1,4 +1,4 @@
-constexpr ll mod = 1000000009;
+constexpr ll mod = 1'000'000'009;
ll binomPPow(ll n, ll k, ll p) {
ll res = 1;
diff --git a/math/linearRecurence.cpp b/math/linearRecurence.cpp
index 3e1f812..2501e64 100644
--- a/math/linearRecurence.cpp
+++ b/math/linearRecurence.cpp
@@ -1,4 +1,4 @@
-constexpr ll mod = 1000000007;
+constexpr ll mod = 1'000'000'007;
vector<ll> modMul(const vector<ll>& a, const vector<ll>& b,
const vector<ll>& c) {
ll n = sz(c);
diff --git a/math/linearSieve.cpp b/math/linearSieve.cpp
index e1fa7ff..b029b9a 100644
--- a/math/linearSieve.cpp
+++ b/math/linearSieve.cpp
@@ -1,4 +1,4 @@
-constexpr ll N = 10000000;
+constexpr ll N = 10'000'000;
ll smallest[N], power[N], sieved[N];
vector<ll> primes;
diff --git a/math/primeSieve.cpp b/math/primeSieve.cpp
index 3898ab7..1b0f514 100644
--- a/math/primeSieve.cpp
+++ b/math/primeSieve.cpp
@@ -1,4 +1,4 @@
-constexpr ll N = 100000000;
+constexpr ll N = 100'000'000;
bitset<N / 2> isNotPrime;
vector<ll> primes = {2};
diff --git a/math/squfof.cpp b/math/squfof.cpp
index 78bca73..1cb97de 100644
--- a/math/squfof.cpp
+++ b/math/squfof.cpp
@@ -64,7 +64,7 @@ lll squfof(lll N) {
exit(1);//try fallback to pollard rho
}
-constexpr lll trialLim = 5000;
+constexpr lll trialLim = 5'000;
void factor(lll n, map<lll, int>& facts) {
for (lll i = 2; i * i <= n && i <= trialLim; i++) {