summaryrefslogtreecommitdiff
path: root/test/math/transforms/seriesOperations.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
committermzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
commit630a5bdf06d59b8340fb4bfc0e692cbcf094026a (patch)
treeadee732c8d2cdcb46e5f400611c370b4c2ec1947 /test/math/transforms/seriesOperations.cpp
parent609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff)
run with sanitizer
Diffstat (limited to 'test/math/transforms/seriesOperations.cpp')
-rw-r--r--test/math/transforms/seriesOperations.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/test/math/transforms/seriesOperations.cpp b/test/math/transforms/seriesOperations.cpp
index ee30e00..29c91c7 100644
--- a/test/math/transforms/seriesOperations.cpp
+++ b/test/math/transforms/seriesOperations.cpp
@@ -63,9 +63,9 @@ namespace reference {//checked against yosupo
}
}
-void test_inv() {
+void test_inv(ll LIM) {
ll queries = 0;
- for (ll i = 0; i < 50'000; i++) {
+ for (ll i = 0; i < LIM; i++) {
int n = Random::integer<int>(1, 100);
int m = Random::integer<int>(1, 100);
vector<ll> a = Random::integers<ll>(n, 0, mod);
@@ -78,9 +78,9 @@ void test_inv() {
cerr << "tested inv: " << queries << endl;
}
-void test_deriv() {
+void test_deriv(ll LIM) {
ll queries = 0;
- for (ll i = 0; i < 50'000; i++) {
+ for (ll i = 0; i < LIM; i++) {
int n = Random::integer<int>(1, 100);
vector<ll> a = Random::integers<ll>(n, 0, mod);
@@ -92,9 +92,9 @@ void test_deriv() {
cerr << "tested deriv: " << queries << endl;
}
-void test_integr() {
+void test_integr(ll LIM) {
ll queries = 0;
- for (ll i = 0; i < 50'000; i++) {
+ for (ll i = 0; i < LIM; i++) {
int n = Random::integer<int>(1, 100);
vector<ll> a = Random::integers<ll>(n, 0, mod);
@@ -106,9 +106,9 @@ void test_integr() {
cerr << "tested integr: " << queries << endl;
}
-void test_log() {
+void test_log(ll LIM) {
ll queries = 0;
- for (ll i = 0; i < 50'000; i++) {
+ for (ll i = 0; i < LIM; i++) {
int n = Random::integer<int>(1, 100);
int m = Random::integer<int>(1, 100);
vector<ll> a = Random::integers<ll>(n, 0, mod);
@@ -121,9 +121,9 @@ void test_log() {
cerr << "tested log: " << queries << endl;
}
-void test_exp() {
+void test_exp(ll LIM) {
ll queries = 0;
- for (ll i = 0; i < 50'000; i++) {
+ for (ll i = 0; i < LIM; i++) {
int n = Random::integer<int>(1, 100);
int m = Random::integer<int>(1, 100);
vector<ll> a = Random::integers<ll>(n, 0, mod);
@@ -137,9 +137,10 @@ void test_exp() {
}
int main() {
- test_inv();
- test_deriv();
- test_integr();
- test_log();
- test_exp();
+ ll LIM = sanitize ? 5'000 : 50'000;
+ test_inv(LIM);
+ test_deriv(LIM);
+ test_integr(LIM);
+ test_log(LIM);
+ test_exp(LIM);
}