From 387a7385ce5e5d5e141359b2106e0759c7b4a000 Mon Sep 17 00:00:00 2001 From: lntue Date: Fri, 22 May 2026 21:45:01 -0400 Subject: [PATCH] [libc][NFC] Reduce the test size for math functions by default. (#199308) --- libc/test/src/math/AddTest.h | 4 ++-- libc/test/src/math/CeilTest.h | 2 +- libc/test/src/math/CopySignTest.h | 2 +- libc/test/src/math/DivTest.h | 4 ++-- libc/test/src/math/FAbsTest.h | 2 +- libc/test/src/math/FDimTest.h | 2 +- libc/test/src/math/FMaxTest.h | 2 +- libc/test/src/math/FMinTest.h | 2 +- libc/test/src/math/FloorTest.h | 2 +- libc/test/src/math/FmaTest.h | 4 ++-- libc/test/src/math/FrexpTest.h | 2 +- libc/test/src/math/HypotTest.h | 4 ++-- libc/test/src/math/ILogbTest.h | 4 ++-- libc/test/src/math/LogbTest.h | 2 +- libc/test/src/math/ModfTest.h | 2 +- libc/test/src/math/MulTest.h | 4 ++-- libc/test/src/math/NearbyIntTest.h | 4 ++-- libc/test/src/math/RIntTest.h | 4 ++-- libc/test/src/math/RemQuoTest.h | 4 ++-- libc/test/src/math/RoundEvenTest.h | 2 +- libc/test/src/math/RoundTest.h | 2 +- libc/test/src/math/RoundToIntegerTest.h | 4 ++-- libc/test/src/math/RsqrtTest.h | 4 ++-- libc/test/src/math/SqrtTest.h | 4 ++-- libc/test/src/math/SubTest.h | 4 ++-- libc/test/src/math/TruncTest.h | 2 +- libc/test/src/math/acos_test.cpp | 2 +- libc/test/src/math/acosf_test.cpp | 2 +- libc/test/src/math/acoshf_test.cpp | 2 +- libc/test/src/math/acospif_test.cpp | 2 +- libc/test/src/math/asin_test.cpp | 2 +- libc/test/src/math/asinf_test.cpp | 2 +- libc/test/src/math/asinhf_test.cpp | 2 +- libc/test/src/math/asinpi_test.cpp | 2 +- libc/test/src/math/asinpif_test.cpp | 2 +- libc/test/src/math/atan_test.cpp | 2 +- libc/test/src/math/atanf_test.cpp | 2 +- libc/test/src/math/atanhf_test.cpp | 2 +- libc/test/src/math/cbrt_test.cpp | 2 +- libc/test/src/math/cbrtf_test.cpp | 2 +- libc/test/src/math/cos_test.cpp | 2 +- libc/test/src/math/cosf_float_test.cpp | 2 +- libc/test/src/math/cosf_test.cpp | 2 +- libc/test/src/math/coshf_test.cpp | 2 +- libc/test/src/math/erff_test.cpp | 2 +- libc/test/src/math/exp10f_test.cpp | 2 +- libc/test/src/math/exp10m1f_test.cpp | 2 +- libc/test/src/math/exp2f_test.cpp | 2 +- libc/test/src/math/exp2m1f_test.cpp | 2 +- libc/test/src/math/expf_test.cpp | 2 +- libc/test/src/math/expm1f_test.cpp | 2 +- libc/test/src/math/log10_test.cpp | 2 +- libc/test/src/math/log10f_test.cpp | 2 +- libc/test/src/math/log1p_test.cpp | 2 +- libc/test/src/math/log1pf_test.cpp | 2 +- libc/test/src/math/log2_test.cpp | 2 +- libc/test/src/math/log2f_test.cpp | 2 +- libc/test/src/math/log_test.cpp | 2 +- libc/test/src/math/logf_test.cpp | 2 +- libc/test/src/math/sin_test.cpp | 2 +- libc/test/src/math/sincos_test.cpp | 2 +- libc/test/src/math/sincosf_test.cpp | 2 +- libc/test/src/math/sinf_float_test.cpp | 2 +- libc/test/src/math/sinf_test.cpp | 2 +- libc/test/src/math/sinhf_test.cpp | 2 +- libc/test/src/math/smoke/CopySignTest.h | 2 +- libc/test/src/math/smoke/FDimTest.h | 2 +- libc/test/src/math/smoke/FMaxTest.h | 2 +- libc/test/src/math/smoke/FMaximumMagNumTest.h | 2 +- libc/test/src/math/smoke/FMaximumMagTest.h | 2 +- libc/test/src/math/smoke/FMaximumNumTest.h | 2 +- libc/test/src/math/smoke/FMaximumTest.h | 2 +- libc/test/src/math/smoke/FMinTest.h | 2 +- libc/test/src/math/smoke/FMinimumMagNumTest.h | 2 +- libc/test/src/math/smoke/FMinimumMagTest.h | 2 +- libc/test/src/math/smoke/FMinimumNumTest.h | 2 +- libc/test/src/math/smoke/FMinimumTest.h | 2 +- libc/test/src/math/smoke/ILogbTest.h | 4 ++-- libc/test/src/math/smoke/LogbTest.h | 2 +- libc/test/src/math/smoke/ModfTest.h | 2 +- libc/test/src/math/smoke/RoundToIntegerTest.h | 2 +- libc/test/src/math/tan_test.cpp | 2 +- libc/test/src/math/tanf_test.cpp | 2 +- libc/test/src/math/tanhf_test.cpp | 2 +- libc/test/src/mathvec/expf_test.cpp | 2 +- libc/test/utils/FPUtil/x86_long_double_test.cpp | 2 +- 86 files changed, 100 insertions(+), 100 deletions(-) diff --git a/libc/test/src/math/AddTest.h b/libc/test/src/math/AddTest.h index 370cc2bbde8b..4105add4ef4a 100644 --- a/libc/test/src/math/AddTest.h +++ b/libc/test/src/math/AddTest.h @@ -40,7 +40,7 @@ public: using AddFunc = OutType (*)(InType, InType); void test_subnormal_range(AddFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr InStorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT), @@ -57,7 +57,7 @@ public: } void test_normal_range(AddFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr InStorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT), InStorageType(1)); diff --git a/libc/test/src/math/CeilTest.h b/libc/test/src/math/CeilTest.h index 3af87420a739..d30bd200b02b 100644 --- a/libc/test/src/math/CeilTest.h +++ b/libc/test/src/math/CeilTest.h @@ -70,7 +70,7 @@ public: } void testRange(CeilFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/CopySignTest.h b/libc/test/src/math/CopySignTest.h index 7c46d1bbf134..d23ad933a1c8 100644 --- a/libc/test/src/math/CopySignTest.h +++ b/libc/test/src/math/CopySignTest.h @@ -35,7 +35,7 @@ public: } void testRange(CopySignFunc func) { - constexpr StorageType COUNT = 100'000; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = FPBits(v).get_val(); diff --git a/libc/test/src/math/DivTest.h b/libc/test/src/math/DivTest.h index c14d16fb5773..b990484cdcfc 100644 --- a/libc/test/src/math/DivTest.h +++ b/libc/test/src/math/DivTest.h @@ -39,7 +39,7 @@ public: using DivFunc = OutType (*)(InType, InType); void test_subnormal_range(DivFunc func) { - constexpr InStorageType COUNT = 100'001; + constexpr InStorageType COUNT = 1'231; constexpr InStorageType STEP = (IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT; for (InStorageType i = 0, v = 0, w = IN_MAX_SUBNORMAL_U; i <= COUNT; @@ -53,7 +53,7 @@ public: } void test_normal_range(DivFunc func) { - constexpr InStorageType COUNT = 100'001; + constexpr InStorageType COUNT = 1'231; constexpr InStorageType STEP = (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT; for (InStorageType i = 0, v = 0, w = IN_MAX_NORMAL_U; i <= COUNT; ++i, v += STEP, w -= STEP) { diff --git a/libc/test/src/math/FAbsTest.h b/libc/test/src/math/FAbsTest.h index 7b4ea93e4db9..b3188d0310b8 100644 --- a/libc/test/src/math/FAbsTest.h +++ b/libc/test/src/math/FAbsTest.h @@ -37,7 +37,7 @@ public: } void testRange(FabsFunc func) { - constexpr StorageType COUNT = 100'000; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = FPBits(v).get_val(); diff --git a/libc/test/src/math/FDimTest.h b/libc/test/src/math/FDimTest.h index 03ff26ab2379..72063b0234bb 100644 --- a/libc/test/src/math/FDimTest.h +++ b/libc/test/src/math/FDimTest.h @@ -64,7 +64,7 @@ public: void test_in_range(FuncPtr func) { constexpr StorageType STORAGE_MAX = LIBC_NAMESPACE::cpp::numeric_limits::max(); - constexpr StorageType COUNT = 100'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT; ++i, v += STEP, w -= STEP) { diff --git a/libc/test/src/math/FMaxTest.h b/libc/test/src/math/FMaxTest.h index 772409062ef5..3f62dffa16b9 100644 --- a/libc/test/src/math/FMaxTest.h +++ b/libc/test/src/math/FMaxTest.h @@ -60,7 +60,7 @@ public: } void testRange(FMaxFunc func) { - constexpr StorageType COUNT = 100'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT; ++i, v += STEP, w -= STEP) { diff --git a/libc/test/src/math/FMinTest.h b/libc/test/src/math/FMinTest.h index 3822d7cb7378..d4bf26906c23 100644 --- a/libc/test/src/math/FMinTest.h +++ b/libc/test/src/math/FMinTest.h @@ -61,7 +61,7 @@ public: } void testRange(FMinFunc func) { - constexpr StorageType COUNT = 100'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT; ++i, v += STEP, w -= STEP) { diff --git a/libc/test/src/math/FloorTest.h b/libc/test/src/math/FloorTest.h index cce0c731ebbc..0ac31c0306cf 100644 --- a/libc/test/src/math/FloorTest.h +++ b/libc/test/src/math/FloorTest.h @@ -70,7 +70,7 @@ public: } void testRange(FloorFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/FmaTest.h b/libc/test/src/math/FmaTest.h index 902ff0413b0f..c1e0fab48202 100644 --- a/libc/test/src/math/FmaTest.h +++ b/libc/test/src/math/FmaTest.h @@ -58,7 +58,7 @@ public: using FmaFunc = OutType (*)(InType, InType, InType); void test_subnormal_range(FmaFunc func) { - constexpr InStorageType COUNT = 10'001; + constexpr InStorageType COUNT = 1'231; constexpr InStorageType RAW_STEP = (IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT; constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP); @@ -76,7 +76,7 @@ public: } void test_normal_range(FmaFunc func) { - constexpr InStorageType COUNT = 10'001; + constexpr InStorageType COUNT = 1'231; constexpr InStorageType RAW_STEP = (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT; constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP); diff --git a/libc/test/src/math/FrexpTest.h b/libc/test/src/math/FrexpTest.h index d1151c83efbd..36207b54dda8 100644 --- a/libc/test/src/math/FrexpTest.h +++ b/libc/test/src/math/FrexpTest.h @@ -95,7 +95,7 @@ public: void testRange(FrexpFunc func) { using StorageType = typename FPBits::StorageType; - constexpr StorageType COUNT = 100'000; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = FPBits(v).get_val(); diff --git a/libc/test/src/math/HypotTest.h b/libc/test/src/math/HypotTest.h index b37abf7e156d..146f85d0b360 100644 --- a/libc/test/src/math/HypotTest.h +++ b/libc/test/src/math/HypotTest.h @@ -70,7 +70,7 @@ public: } void test_subnormal_range(Func func) { - constexpr StorageType COUNT = 10'001; + constexpr StorageType COUNT = 1'231; constexpr unsigned SCALE = (sizeof(T) < 4) ? 1 : 4; for (unsigned scale = 0; scale < SCALE; ++scale) { StorageType max_value = static_cast(MAX_SUBNORMAL << scale); @@ -95,7 +95,7 @@ public: } void test_normal_range(Func func) { - constexpr StorageType COUNT = 10'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = (MAX_NORMAL - MIN_NORMAL) / COUNT; for (int signs = 0; signs < 4; ++signs) { for (StorageType v = MIN_NORMAL, w = MAX_NORMAL; diff --git a/libc/test/src/math/ILogbTest.h b/libc/test/src/math/ILogbTest.h index 5d805ef7a1e2..3357ef4df73d 100644 --- a/libc/test/src/math/ILogbTest.h +++ b/libc/test/src/math/ILogbTest.h @@ -80,7 +80,7 @@ public: using StorageType = typename FPBits::StorageType; constexpr StorageType MIN_SUBNORMAL = FPBits::min_subnormal().uintval(); constexpr StorageType MAX_SUBNORMAL = FPBits::max_subnormal().uintval(); - constexpr StorageType COUNT = 10'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = (MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT; for (StorageType v = MIN_SUBNORMAL; v <= MAX_SUBNORMAL; v += STEP) { T x = FPBits(v).get_val(); @@ -99,7 +99,7 @@ public: using StorageType = typename FPBits::StorageType; constexpr StorageType MIN_NORMAL = FPBits::min_normal().uintval(); constexpr StorageType MAX_NORMAL = FPBits::max_normal().uintval(); - constexpr StorageType COUNT = 10'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = (MAX_NORMAL - MIN_NORMAL) / COUNT; for (StorageType v = MIN_NORMAL; v <= MAX_NORMAL; v += STEP) { T x = FPBits(v).get_val(); diff --git a/libc/test/src/math/LogbTest.h b/libc/test/src/math/LogbTest.h index 5ef3b2675a49..83ac99b7d4eb 100644 --- a/libc/test/src/math/LogbTest.h +++ b/libc/test/src/math/LogbTest.h @@ -74,7 +74,7 @@ public: void testRange(LogbFunc func) { using StorageType = typename FPBits::StorageType; - constexpr StorageType COUNT = 100'000; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = FPBits(v).get_val(); diff --git a/libc/test/src/math/ModfTest.h b/libc/test/src/math/ModfTest.h index 337729016961..a6def094c07e 100644 --- a/libc/test/src/math/ModfTest.h +++ b/libc/test/src/math/ModfTest.h @@ -86,7 +86,7 @@ public: } void testRange(ModfFunc func) { - constexpr StorageType COUNT = 100'000; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = FPBits(v).get_val(); diff --git a/libc/test/src/math/MulTest.h b/libc/test/src/math/MulTest.h index cb81a795be36..5f74087a6bc5 100644 --- a/libc/test/src/math/MulTest.h +++ b/libc/test/src/math/MulTest.h @@ -48,7 +48,7 @@ public: using MulFunc = OutType (*)(InType, InType); void test_subnormal_range(MulFunc func) { - constexpr InStorageType COUNT = 10'001; + constexpr InStorageType COUNT = 1'231; constexpr InStorageType STEP = (IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT; LIBC_NAMESPACE::srand(1); @@ -68,7 +68,7 @@ public: } void test_normal_range(MulFunc func) { - constexpr InStorageType COUNT = 10'001; + constexpr InStorageType COUNT = 1'231; constexpr InStorageType STEP = (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT; LIBC_NAMESPACE::srand(1); for (int signs = 0; signs < 4; signs++) { diff --git a/libc/test/src/math/NearbyIntTest.h b/libc/test/src/math/NearbyIntTest.h index 88cdf453f055..6e79f318a194 100644 --- a/libc/test/src/math/NearbyIntTest.h +++ b/libc/test/src/math/NearbyIntTest.h @@ -70,7 +70,7 @@ public: } void test_subnormal_range(NearbyIntFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; const StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT), StorageType(1)); @@ -85,7 +85,7 @@ public: } void test_normal_range(NearbyIntFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; const StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_NORMAL - MIN_NORMAL) / COUNT), StorageType(1)); diff --git a/libc/test/src/math/RIntTest.h b/libc/test/src/math/RIntTest.h index 86e73bb5b054..0ee7690c8f46 100644 --- a/libc/test/src/math/RIntTest.h +++ b/libc/test/src/math/RIntTest.h @@ -104,7 +104,7 @@ public: } void testSubnormalRange(RIntFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT), StorageType(1)); @@ -119,7 +119,7 @@ public: } void testNormalRange(RIntFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_NORMAL - MIN_NORMAL) / COUNT), StorageType(1)); diff --git a/libc/test/src/math/RemQuoTest.h b/libc/test/src/math/RemQuoTest.h index e664000fd18d..40b4ce748fa6 100644 --- a/libc/test/src/math/RemQuoTest.h +++ b/libc/test/src/math/RemQuoTest.h @@ -104,7 +104,7 @@ public: } void testSubnormalRange(RemQuoFunc func) { - constexpr StorageType COUNT = 100'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = (MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT; for (StorageType v = MIN_SUBNORMAL, w = MAX_SUBNORMAL; v <= MAX_SUBNORMAL && w >= MIN_SUBNORMAL; v += STEP, w -= STEP) { @@ -117,7 +117,7 @@ public: } void testNormalRange(RemQuoFunc func) { - constexpr StorageType COUNT = 1'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = (MAX_NORMAL - MIN_NORMAL) / COUNT; for (StorageType v = MIN_NORMAL, w = MAX_NORMAL; v <= MAX_NORMAL && w >= MIN_NORMAL; v += STEP, w -= STEP) { diff --git a/libc/test/src/math/RoundEvenTest.h b/libc/test/src/math/RoundEvenTest.h index 5ecda66ccb58..761c258fc557 100644 --- a/libc/test/src/math/RoundEvenTest.h +++ b/libc/test/src/math/RoundEvenTest.h @@ -72,7 +72,7 @@ public: } void testRange(RoundEvenFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/RoundTest.h b/libc/test/src/math/RoundTest.h index d571d5d8feed..a32b24a7a771 100644 --- a/libc/test/src/math/RoundTest.h +++ b/libc/test/src/math/RoundTest.h @@ -70,7 +70,7 @@ public: } void testRange(RoundFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h index 469db111302c..1795b8557664 100644 --- a/libc/test/src/math/RoundToIntegerTest.h +++ b/libc/test/src/math/RoundToIntegerTest.h @@ -240,7 +240,7 @@ public: } void testSubnormalRange(RoundToIntegerFunc func) { - constexpr int COUNT = 1'000'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT), StorageType(1)); @@ -284,7 +284,7 @@ public: if (sizeof(IntType) > sizeof(long)) return; - constexpr int COUNT = 1'000'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_NORMAL - MIN_NORMAL) / COUNT), StorageType(1)); diff --git a/libc/test/src/math/RsqrtTest.h b/libc/test/src/math/RsqrtTest.h index d11d708f644d..253cacd7d2ce 100644 --- a/libc/test/src/math/RsqrtTest.h +++ b/libc/test/src/math/RsqrtTest.h @@ -39,7 +39,7 @@ public: } // Even sampling across all subnormals. - constexpr StorageType COUNT = 200'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = HIDDEN_BIT / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { InType x = FPBits(i).get_val(); @@ -49,7 +49,7 @@ public: // Positive normal range sampling: skip NaNs and negative values. void test_normal_range(RsqrtFunc func) { - constexpr StorageType COUNT = 200'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { FPBits x_bits(v); diff --git a/libc/test/src/math/SqrtTest.h b/libc/test/src/math/SqrtTest.h index fdfc4f9bb994..d59f5309a085 100644 --- a/libc/test/src/math/SqrtTest.h +++ b/libc/test/src/math/SqrtTest.h @@ -32,7 +32,7 @@ public: ASSERT_MPFR_MATCH_ALL_ROUNDING(mpfr::Operation::Sqrt, x, func(x), 0.5); } - constexpr StorageType COUNT = 200'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = HIDDEN_BIT / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { InType x = FPBits(i).get_val(); @@ -41,7 +41,7 @@ public: } void test_normal_range(SqrtFunc func) { - constexpr StorageType COUNT = 200'001; + constexpr StorageType COUNT = 1'231; constexpr StorageType STEP = STORAGE_MAX / COUNT; for (StorageType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { FPBits x_bits(v); diff --git a/libc/test/src/math/SubTest.h b/libc/test/src/math/SubTest.h index b799d78515fa..6cf3e7ba751e 100644 --- a/libc/test/src/math/SubTest.h +++ b/libc/test/src/math/SubTest.h @@ -40,7 +40,7 @@ public: using SubFunc = OutType (*)(InType, InType); void test_subnormal_range(SubFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr InStorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT), @@ -57,7 +57,7 @@ public: } void test_normal_range(SubFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr InStorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT), InStorageType(1)); diff --git a/libc/test/src/math/TruncTest.h b/libc/test/src/math/TruncTest.h index 76c9740a917b..db0f19c83265 100644 --- a/libc/test/src/math/TruncTest.h +++ b/libc/test/src/math/TruncTest.h @@ -70,7 +70,7 @@ public: } void testRange(TruncFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/acos_test.cpp b/libc/test/src/math/acos_test.cpp index 8678fe620d6d..843a43ee5244 100644 --- a/libc/test/src/math/acos_test.cpp +++ b/libc/test/src/math/acos_test.cpp @@ -25,7 +25,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LIBC_NAMESPACE::testing::tlog; TEST_F(LlvmLibcAcosTest, InDoubleRange) { - constexpr uint64_t COUNT = 123'451; + constexpr uint64_t COUNT = 1'231; uint64_t START = FPBits(0x1.0p-60).uintval(); uint64_t STOP = FPBits(1.0).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/acosf_test.cpp b/libc/test/src/math/acosf_test.cpp index 40b87021109f..ec5d3e4dc073 100644 --- a/libc/test/src/math/acosf_test.cpp +++ b/libc/test/src/math/acosf_test.cpp @@ -47,7 +47,7 @@ TEST_F(LlvmLibcAcosfTest, SpecialNumbers) { } TEST_F(LlvmLibcAcosfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/acoshf_test.cpp b/libc/test/src/math/acoshf_test.cpp index 45900aed18b3..9af569b984b8 100644 --- a/libc/test/src/math/acoshf_test.cpp +++ b/libc/test/src/math/acoshf_test.cpp @@ -44,7 +44,7 @@ TEST_F(LlvmLibcAcoshfTest, SpecialNumbers) { } TEST_F(LlvmLibcAcoshfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/acospif_test.cpp b/libc/test/src/math/acospif_test.cpp index 96215bdc577e..59bcbde6e0f7 100644 --- a/libc/test/src/math/acospif_test.cpp +++ b/libc/test/src/math/acospif_test.cpp @@ -16,7 +16,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LlvmLibcAcospifTest = LIBC_NAMESPACE::testing::FPTest; TEST_F(LlvmLibcAcospifTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; // Test in [-1, 1] const uint32_t STEP = 0x3F800000 / COUNT; // step through [0, 1.0f] in bits for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { diff --git a/libc/test/src/math/asin_test.cpp b/libc/test/src/math/asin_test.cpp index 4e3638410b48..0ac891cd0943 100644 --- a/libc/test/src/math/asin_test.cpp +++ b/libc/test/src/math/asin_test.cpp @@ -25,7 +25,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LIBC_NAMESPACE::testing::tlog; TEST_F(LlvmLibcAsinTest, InDoubleRange) { - constexpr uint64_t COUNT = 123'451; + constexpr uint64_t COUNT = 1'231; uint64_t START = FPBits(0x1.0p-60).uintval(); uint64_t STOP = FPBits(1.0).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/asinf_test.cpp b/libc/test/src/math/asinf_test.cpp index 20702c5c15e8..304790eea68d 100644 --- a/libc/test/src/math/asinf_test.cpp +++ b/libc/test/src/math/asinf_test.cpp @@ -45,7 +45,7 @@ TEST_F(LlvmLibcAsinfTest, SpecialNumbers) { } TEST_F(LlvmLibcAsinfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/asinhf_test.cpp b/libc/test/src/math/asinhf_test.cpp index 361362bac3f8..334b74062e74 100644 --- a/libc/test/src/math/asinhf_test.cpp +++ b/libc/test/src/math/asinhf_test.cpp @@ -43,7 +43,7 @@ TEST_F(LlvmLibcAsinhfTest, SpecialNumbers) { } TEST_F(LlvmLibcAsinhfTest, InFloatRange) { - constexpr uint32_t COUNT = 1'001; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/asinpi_test.cpp b/libc/test/src/math/asinpi_test.cpp index 75dfbc6608ea..38480b7f0768 100644 --- a/libc/test/src/math/asinpi_test.cpp +++ b/libc/test/src/math/asinpi_test.cpp @@ -25,7 +25,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LIBC_NAMESPACE::testing::tlog; TEST_F(LlvmLibcAsinpiTest, InDoubleRange) { - constexpr uint64_t COUNT = 123'451; + constexpr uint64_t COUNT = 1'231; uint64_t START = FPBits(0x1.0p-60).uintval(); uint64_t STOP = FPBits(1.0).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/asinpif_test.cpp b/libc/test/src/math/asinpif_test.cpp index 72fda596131b..2a3c77a29cc0 100644 --- a/libc/test/src/math/asinpif_test.cpp +++ b/libc/test/src/math/asinpif_test.cpp @@ -16,7 +16,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LlvmLibcAsinpifTest = LIBC_NAMESPACE::testing::FPTest; TEST_F(LlvmLibcAsinpifTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; // Test in [-1, 1] const uint32_t STEP = 0x3F800000 / COUNT; // step through [0, 1.0f] in bits for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { diff --git a/libc/test/src/math/atan_test.cpp b/libc/test/src/math/atan_test.cpp index 7fa0dffd607e..9622d3f9687e 100644 --- a/libc/test/src/math/atan_test.cpp +++ b/libc/test/src/math/atan_test.cpp @@ -19,7 +19,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LIBC_NAMESPACE::testing::tlog; TEST_F(LlvmLibcAtanTest, InDoubleRange) { - constexpr uint64_t COUNT = 123'451; + constexpr uint64_t COUNT = 1'231; uint64_t START = LIBC_NAMESPACE::fputil::FPBits(0x1.0p-60).uintval(); uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits(0x1.0p60).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/atanf_test.cpp b/libc/test/src/math/atanf_test.cpp index a342fc0f0230..629497da4351 100644 --- a/libc/test/src/math/atanf_test.cpp +++ b/libc/test/src/math/atanf_test.cpp @@ -51,7 +51,7 @@ TEST_F(LlvmLibcAtanfTest, SpecialNumbers) { } TEST_F(LlvmLibcAtanfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; const uint32_t STEP = FPBits(inf).uintval() / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/atanhf_test.cpp b/libc/test/src/math/atanhf_test.cpp index 87391383752b..c9759c4d1487 100644 --- a/libc/test/src/math/atanhf_test.cpp +++ b/libc/test/src/math/atanhf_test.cpp @@ -101,7 +101,7 @@ TEST_F(LlvmLibcAtanhfTest, SpecialNumbers) { } TEST_F(LlvmLibcAtanhfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; const uint32_t STEP = FPBits(1.0f).uintval() / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/cbrt_test.cpp b/libc/test/src/math/cbrt_test.cpp index 61b8583cbc7f..553f0a810434 100644 --- a/libc/test/src/math/cbrt_test.cpp +++ b/libc/test/src/math/cbrt_test.cpp @@ -27,7 +27,7 @@ namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LIBC_NAMESPACE::testing::tlog; TEST_F(LlvmLibcCbrtTest, InDoubleRange) { - constexpr uint64_t COUNT = 123'451; + constexpr uint64_t COUNT = 1'231; uint64_t START = FPBits(1.0).uintval(); uint64_t STOP = FPBits(8.0).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/cbrtf_test.cpp b/libc/test/src/math/cbrtf_test.cpp index 1d7d2189d526..829a87a14749 100644 --- a/libc/test/src/math/cbrtf_test.cpp +++ b/libc/test/src/math/cbrtf_test.cpp @@ -18,7 +18,7 @@ using LlvmLibcCbrtfTest = LIBC_NAMESPACE::testing::FPTest; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; TEST_F(LlvmLibcCbrtfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; const uint32_t STEP = FPBits(inf).uintval() / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/cos_test.cpp b/libc/test/src/math/cos_test.cpp index 40c43f989463..cb402f74ecac 100644 --- a/libc/test/src/math/cos_test.cpp +++ b/libc/test/src/math/cos_test.cpp @@ -69,7 +69,7 @@ TEST_F(LlvmLibcCosTest, TrickyInputs) { } TEST_F(LlvmLibcCosTest, InDoubleRange) { - constexpr uint64_t COUNT = 1'234'51; + constexpr uint64_t COUNT = 1'231; uint64_t START = LIBC_NAMESPACE::fputil::FPBits(0x1.0p-50).uintval(); uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits(0x1.0p200).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/cosf_float_test.cpp b/libc/test/src/math/cosf_float_test.cpp index 3d573b211f4b..2ee925b82d5f 100644 --- a/libc/test/src/math/cosf_float_test.cpp +++ b/libc/test/src/math/cosf_float_test.cpp @@ -24,7 +24,7 @@ float cosf_fast(float x) { namespace mpfr = LIBC_NAMESPACE::testing::mpfr; TEST_F(LlvmLibcCosfFloatTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/cosf_test.cpp b/libc/test/src/math/cosf_test.cpp index d5d5dc3b4cd5..444633dff5cb 100644 --- a/libc/test/src/math/cosf_test.cpp +++ b/libc/test/src/math/cosf_test.cpp @@ -48,7 +48,7 @@ TEST_F(LlvmLibcCosfTest, SpecialNumbers) { } TEST_F(LlvmLibcCosfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/coshf_test.cpp b/libc/test/src/math/coshf_test.cpp index 6c53fdadbd35..86152d1def9a 100644 --- a/libc/test/src/math/coshf_test.cpp +++ b/libc/test/src/math/coshf_test.cpp @@ -52,7 +52,7 @@ TEST_F(LlvmLibcCoshfTest, Overflow) { } TEST_F(LlvmLibcCoshfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/erff_test.cpp b/libc/test/src/math/erff_test.cpp index 17ff6c43f771..505b0e011c2b 100644 --- a/libc/test/src/math/erff_test.cpp +++ b/libc/test/src/math/erff_test.cpp @@ -50,7 +50,7 @@ TEST_F(LlvmLibcErffTest, TrickyInputs) { } TEST_F(LlvmLibcErffTest, InFloatRange) { - constexpr uint32_t COUNT = 234561; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t START = 0; // 0 constexpr uint32_t STOP = 0x4080'0000U; // 4.0f diff --git a/libc/test/src/math/exp10f_test.cpp b/libc/test/src/math/exp10f_test.cpp index f6a8cf57ed13..4dbe04845257 100644 --- a/libc/test/src/math/exp10f_test.cpp +++ b/libc/test/src/math/exp10f_test.cpp @@ -102,7 +102,7 @@ TEST_F(LlvmLibcExp10fTest, TrickyInputs) { } TEST_F(LlvmLibcExp10fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/exp10m1f_test.cpp b/libc/test/src/math/exp10m1f_test.cpp index b41a412b3bdd..13861e1c4f8c 100644 --- a/libc/test/src/math/exp10m1f_test.cpp +++ b/libc/test/src/math/exp10m1f_test.cpp @@ -82,7 +82,7 @@ TEST_F(LlvmLibcExp10m1fTest, TrickyInputs) { } TEST_F(LlvmLibcExp10m1fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/exp2f_test.cpp b/libc/test/src/math/exp2f_test.cpp index 5e5fd699ab4a..7f54fbce3150 100644 --- a/libc/test/src/math/exp2f_test.cpp +++ b/libc/test/src/math/exp2f_test.cpp @@ -104,7 +104,7 @@ TEST_F(LlvmLibcExp2fTest, Underflow) { } TEST_F(LlvmLibcExp2fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/exp2m1f_test.cpp b/libc/test/src/math/exp2m1f_test.cpp index 16b20d72e295..b7e86164f255 100644 --- a/libc/test/src/math/exp2m1f_test.cpp +++ b/libc/test/src/math/exp2m1f_test.cpp @@ -50,7 +50,7 @@ TEST_F(LlvmLibcExp2m1fTest, TrickyInputs) { } TEST_F(LlvmLibcExp2m1fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/expf_test.cpp b/libc/test/src/math/expf_test.cpp index 05167b80ec06..b04473d2bfe7 100644 --- a/libc/test/src/math/expf_test.cpp +++ b/libc/test/src/math/expf_test.cpp @@ -105,7 +105,7 @@ TEST_F(LlvmLibcExpfTest, Borderline) { } TEST_F(LlvmLibcExpfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/expm1f_test.cpp b/libc/test/src/math/expm1f_test.cpp index 2f7a9f2de78f..4ded9e2e21b2 100644 --- a/libc/test/src/math/expm1f_test.cpp +++ b/libc/test/src/math/expm1f_test.cpp @@ -114,7 +114,7 @@ TEST_F(LlvmLibcExpm1fTest, Borderline) { } TEST_F(LlvmLibcExpm1fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/log10_test.cpp b/libc/test/src/math/log10_test.cpp index 3e48f7447b6c..62de9f542469 100644 --- a/libc/test/src/math/log10_test.cpp +++ b/libc/test/src/math/log10_test.cpp @@ -85,7 +85,7 @@ TEST_F(LlvmLibcLog10Test, AllExponents) { } TEST_F(LlvmLibcLog10Test, InDoubleRange) { - constexpr uint64_t COUNT = 1'001; + constexpr uint64_t COUNT = 1'231; constexpr uint64_t START = 0x3FD0'0000'0000'0000ULL; // 0.25 constexpr uint64_t STOP = 0x4010'0000'0000'0000ULL; // 4.0 // constexpr uint64_t START = 0x3FF0'0000'0000'0000ULL; // 1.0 diff --git a/libc/test/src/math/log10f_test.cpp b/libc/test/src/math/log10f_test.cpp index 1a1bd14a65d8..e162163b529c 100644 --- a/libc/test/src/math/log10f_test.cpp +++ b/libc/test/src/math/log10f_test.cpp @@ -71,7 +71,7 @@ TEST_F(LlvmLibcLog10fTest, TrickyInputs) { } TEST_F(LlvmLibcLog10fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/log1p_test.cpp b/libc/test/src/math/log1p_test.cpp index dd720739ac56..8a6157ad00de 100644 --- a/libc/test/src/math/log1p_test.cpp +++ b/libc/test/src/math/log1p_test.cpp @@ -87,7 +87,7 @@ TEST_F(LlvmLibcLog1pTest, AllExponents) { } TEST_F(LlvmLibcLog1pTest, InDoubleRange) { - constexpr uint64_t COUNT = 4501; + constexpr uint64_t COUNT = 1'231; auto test = [&](uint64_t start, uint64_t stop, mpfr::RoundingMode rounding_mode) { diff --git a/libc/test/src/math/log1pf_test.cpp b/libc/test/src/math/log1pf_test.cpp index b3ac3dbf3ae0..07a3329ea8db 100644 --- a/libc/test/src/math/log1pf_test.cpp +++ b/libc/test/src/math/log1pf_test.cpp @@ -75,7 +75,7 @@ TEST_F(LlvmLibcLog1pfTest, TrickyInputs) { } TEST_F(LlvmLibcLog1pfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/log2_test.cpp b/libc/test/src/math/log2_test.cpp index 9eada859ced8..b05b3bd43c5c 100644 --- a/libc/test/src/math/log2_test.cpp +++ b/libc/test/src/math/log2_test.cpp @@ -77,7 +77,7 @@ TEST_F(LlvmLibcLog2Test, AllExponents) { } TEST_F(LlvmLibcLog2Test, InDoubleRange) { - constexpr uint64_t COUNT = 1'001; + constexpr uint64_t COUNT = 1'231; constexpr uint64_t START = 0x3FD0'0000'0000'0000ULL; // 0.25 constexpr uint64_t STOP = 0x4010'0000'0000'0000ULL; // 4.0 // constexpr uint64_t START = 0x3FF0'0000'0000'0000ULL; // 1.0 diff --git a/libc/test/src/math/log2f_test.cpp b/libc/test/src/math/log2f_test.cpp index 78544893c520..ce6486e38808 100644 --- a/libc/test/src/math/log2f_test.cpp +++ b/libc/test/src/math/log2f_test.cpp @@ -46,7 +46,7 @@ TEST_F(LlvmLibcLog2fTest, TrickyInputs) { } TEST_F(LlvmLibcLog2fTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/log_test.cpp b/libc/test/src/math/log_test.cpp index c9a030a89c2f..e949805b897d 100644 --- a/libc/test/src/math/log_test.cpp +++ b/libc/test/src/math/log_test.cpp @@ -82,7 +82,7 @@ TEST_F(LlvmLibcLogTest, AllExponents) { } TEST_F(LlvmLibcLogTest, InDoubleRange) { - constexpr uint64_t COUNT = 234561; + constexpr uint64_t COUNT = 1'231; constexpr uint64_t START = 0x3FD0'0000'0000'0000ULL; // 0.25 constexpr uint64_t STOP = 0x4010'0000'0000'0000ULL; // 4.0 // constexpr uint64_t START = 0x3FF0'0000'0000'0000ULL; // 1.0 diff --git a/libc/test/src/math/logf_test.cpp b/libc/test/src/math/logf_test.cpp index fb9908043591..1c85222af673 100644 --- a/libc/test/src/math/logf_test.cpp +++ b/libc/test/src/math/logf_test.cpp @@ -88,7 +88,7 @@ TEST_F(LlvmLibcLogfTest, TrickyInputs) { } TEST_F(LlvmLibcLogfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/sin_test.cpp b/libc/test/src/math/sin_test.cpp index 7eac0348ee6d..79c803887b34 100644 --- a/libc/test/src/math/sin_test.cpp +++ b/libc/test/src/math/sin_test.cpp @@ -58,7 +58,7 @@ TEST_F(LlvmLibcSinTest, TrickyInputs) { } TEST_F(LlvmLibcSinTest, InDoubleRange) { - constexpr uint64_t COUNT = 1'234'51; + constexpr uint64_t COUNT = 1'231; uint64_t START = LIBC_NAMESPACE::fputil::FPBits(0x1.0p-50).uintval(); uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits(0x1.0p200).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/sincos_test.cpp b/libc/test/src/math/sincos_test.cpp index 30bfec646eee..343afaae5f34 100644 --- a/libc/test/src/math/sincos_test.cpp +++ b/libc/test/src/math/sincos_test.cpp @@ -110,7 +110,7 @@ TEST_F(LlvmLibcSincosTest, TrickyInputs) { } TEST_F(LlvmLibcSincosTest, InDoubleRange) { - constexpr uint64_t COUNT = 123'41; + constexpr uint64_t COUNT = 1'231; uint64_t START = LIBC_NAMESPACE::fputil::FPBits(0x1.0p-50).uintval(); uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits(0x1.0p200).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/sincosf_test.cpp b/libc/test/src/math/sincosf_test.cpp index 9e6263bb52a6..67eaad2e1da2 100644 --- a/libc/test/src/math/sincosf_test.cpp +++ b/libc/test/src/math/sincosf_test.cpp @@ -101,7 +101,7 @@ TEST_F(LlvmLibcSinCosfTest, SpecialNumbers) { } TEST_F(LlvmLibcSinCosfTest, InFloatRange) { - constexpr uint32_t COUNT = 1'001; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/sinf_float_test.cpp b/libc/test/src/math/sinf_float_test.cpp index 33aab965ba38..3f6d41785176 100644 --- a/libc/test/src/math/sinf_float_test.cpp +++ b/libc/test/src/math/sinf_float_test.cpp @@ -24,7 +24,7 @@ float sinf_fast(float x) { namespace mpfr = LIBC_NAMESPACE::testing::mpfr; TEST_F(LlvmLibcSinfFloatTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/sinf_test.cpp b/libc/test/src/math/sinf_test.cpp index 516941ba49b9..d3cdf3a542e4 100644 --- a/libc/test/src/math/sinf_test.cpp +++ b/libc/test/src/math/sinf_test.cpp @@ -53,7 +53,7 @@ TEST_F(LlvmLibcSinfTest, SpecialNumbers) { } TEST_F(LlvmLibcSinfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/sinhf_test.cpp b/libc/test/src/math/sinhf_test.cpp index 93a1eecc6186..a96e65824c99 100644 --- a/libc/test/src/math/sinhf_test.cpp +++ b/libc/test/src/math/sinhf_test.cpp @@ -45,7 +45,7 @@ TEST_F(LlvmLibcSinhfTest, SpecialNumbers) { } TEST_F(LlvmLibcSinhfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/smoke/CopySignTest.h b/libc/test/src/math/smoke/CopySignTest.h index 7dc6f5abe638..e3063a1f8271 100644 --- a/libc/test/src/math/smoke/CopySignTest.h +++ b/libc/test/src/math/smoke/CopySignTest.h @@ -36,7 +36,7 @@ public: } void testRange(CopySignFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/smoke/FDimTest.h b/libc/test/src/math/smoke/FDimTest.h index 56cc70c985ba..8c86b3d8231e 100644 --- a/libc/test/src/math/smoke/FDimTest.h +++ b/libc/test/src/math/smoke/FDimTest.h @@ -63,7 +63,7 @@ public: void test_in_range(FuncPtr func) { constexpr StorageType STORAGE_MAX = LIBC_NAMESPACE::cpp::numeric_limits::max(); - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMaxTest.h b/libc/test/src/math/smoke/FMaxTest.h index 1cb105aa0077..6b47930965d1 100644 --- a/libc/test/src/math/smoke/FMaxTest.h +++ b/libc/test/src/math/smoke/FMaxTest.h @@ -56,7 +56,7 @@ public: } void testRange(FMaxFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMaximumMagNumTest.h b/libc/test/src/math/smoke/FMaximumMagNumTest.h index b52169e5e868..b5c4347857d4 100644 --- a/libc/test/src/math/smoke/FMaximumMagNumTest.h +++ b/libc/test/src/math/smoke/FMaximumMagNumTest.h @@ -69,7 +69,7 @@ public: } void testRange(FMaximumMagNumFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMaximumMagTest.h b/libc/test/src/math/smoke/FMaximumMagTest.h index 81a232d96ec9..6a45ad13fc29 100644 --- a/libc/test/src/math/smoke/FMaximumMagTest.h +++ b/libc/test/src/math/smoke/FMaximumMagTest.h @@ -57,7 +57,7 @@ public: } void testRange(FMaximumMagFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMaximumNumTest.h b/libc/test/src/math/smoke/FMaximumNumTest.h index f4e05b9f455e..14b70f029009 100644 --- a/libc/test/src/math/smoke/FMaximumNumTest.h +++ b/libc/test/src/math/smoke/FMaximumNumTest.h @@ -68,7 +68,7 @@ public: } void testRange(FMaximumNumFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMaximumTest.h b/libc/test/src/math/smoke/FMaximumTest.h index 5e71a41d7b34..a839eb02b25d 100644 --- a/libc/test/src/math/smoke/FMaximumTest.h +++ b/libc/test/src/math/smoke/FMaximumTest.h @@ -56,7 +56,7 @@ public: } void testRange(FMaximumFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMinTest.h b/libc/test/src/math/smoke/FMinTest.h index 049d94eb1b34..ae3943d13f77 100644 --- a/libc/test/src/math/smoke/FMinTest.h +++ b/libc/test/src/math/smoke/FMinTest.h @@ -56,7 +56,7 @@ public: } void testRange(FMinFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMinimumMagNumTest.h b/libc/test/src/math/smoke/FMinimumMagNumTest.h index 4cec6f08b2da..a5809ea471f6 100644 --- a/libc/test/src/math/smoke/FMinimumMagNumTest.h +++ b/libc/test/src/math/smoke/FMinimumMagNumTest.h @@ -69,7 +69,7 @@ public: } void testRange(FMinimumMagNumFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMinimumMagTest.h b/libc/test/src/math/smoke/FMinimumMagTest.h index 18b43815bdec..ee24042cfe24 100644 --- a/libc/test/src/math/smoke/FMinimumMagTest.h +++ b/libc/test/src/math/smoke/FMinimumMagTest.h @@ -57,7 +57,7 @@ public: } void testRange(FMinimumMagFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMinimumNumTest.h b/libc/test/src/math/smoke/FMinimumNumTest.h index dddcdc28d30c..10b7d7aab934 100644 --- a/libc/test/src/math/smoke/FMinimumNumTest.h +++ b/libc/test/src/math/smoke/FMinimumNumTest.h @@ -68,7 +68,7 @@ public: } void testRange(FMinimumNumFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/FMinimumTest.h b/libc/test/src/math/smoke/FMinimumTest.h index b5c0e98d17b9..6770fdd2e648 100644 --- a/libc/test/src/math/smoke/FMinimumTest.h +++ b/libc/test/src/math/smoke/FMinimumTest.h @@ -56,7 +56,7 @@ public: } void testRange(FMinimumFunc func) { - constexpr int COUNT = 100'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0, w = STORAGE_MAX; diff --git a/libc/test/src/math/smoke/ILogbTest.h b/libc/test/src/math/smoke/ILogbTest.h index 605698e1d345..7d53b3376d39 100644 --- a/libc/test/src/math/smoke/ILogbTest.h +++ b/libc/test/src/math/smoke/ILogbTest.h @@ -78,7 +78,7 @@ public: void test_subnormal_range(Func func) { constexpr StorageType MIN_SUBNORMAL = FPBits::min_subnormal().uintval(); constexpr StorageType MAX_SUBNORMAL = FPBits::max_subnormal().uintval(); - constexpr int COUNT = 10'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT), StorageType(1)); @@ -98,7 +98,7 @@ public: void test_normal_range(Func func) { constexpr StorageType MIN_NORMAL = FPBits::min_normal().uintval(); constexpr StorageType MAX_NORMAL = FPBits::max_normal().uintval(); - constexpr int COUNT = 10'001; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_NORMAL - MIN_NORMAL) / COUNT), StorageType(1)); diff --git a/libc/test/src/math/smoke/LogbTest.h b/libc/test/src/math/smoke/LogbTest.h index a9f34e7517b8..d876eb6fe17a 100644 --- a/libc/test/src/math/smoke/LogbTest.h +++ b/libc/test/src/math/smoke/LogbTest.h @@ -70,7 +70,7 @@ public: void testRange(LogbFunc func) { using StorageType = typename FPBits::StorageType; - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/smoke/ModfTest.h b/libc/test/src/math/smoke/ModfTest.h index 71f1c6bf4be2..a21555d5f376 100644 --- a/libc/test/src/math/smoke/ModfTest.h +++ b/libc/test/src/math/smoke/ModfTest.h @@ -90,7 +90,7 @@ public: } void testRange(ModfFunc func) { - constexpr int COUNT = 100'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast(STORAGE_MAX / COUNT), StorageType(1)); StorageType v = 0; diff --git a/libc/test/src/math/smoke/RoundToIntegerTest.h b/libc/test/src/math/smoke/RoundToIntegerTest.h index 70fc361c2e24..857bc72b77fe 100644 --- a/libc/test/src/math/smoke/RoundToIntegerTest.h +++ b/libc/test/src/math/smoke/RoundToIntegerTest.h @@ -118,7 +118,7 @@ public: void testSubnormalRange(RoundToIntegerFunc func) { // Arbitrary, trades off completeness with testing time (esp. on failure) - constexpr int COUNT = 1'000; + constexpr int COUNT = 1'231; constexpr StorageType STEP = LIBC_NAMESPACE::cpp::max( static_cast((MAX_SUBNORMAL - MIN_SUBNORMAL) / COUNT), StorageType(1)); diff --git a/libc/test/src/math/tan_test.cpp b/libc/test/src/math/tan_test.cpp index 62f8994c9143..dbd9481d4144 100644 --- a/libc/test/src/math/tan_test.cpp +++ b/libc/test/src/math/tan_test.cpp @@ -67,7 +67,7 @@ TEST_F(LlvmLibcTanTest, TrickyInputs) { } TEST_F(LlvmLibcTanTest, InDoubleRange) { - constexpr uint64_t COUNT = 1'234'51; + constexpr uint64_t COUNT = 1'231; uint64_t START = LIBC_NAMESPACE::fputil::FPBits(0x1.0p-50).uintval(); uint64_t STOP = LIBC_NAMESPACE::fputil::FPBits(0x1.0p200).uintval(); uint64_t STEP = (STOP - START) / COUNT; diff --git a/libc/test/src/math/tanf_test.cpp b/libc/test/src/math/tanf_test.cpp index b384d8cab4ea..fa04d870912e 100644 --- a/libc/test/src/math/tanf_test.cpp +++ b/libc/test/src/math/tanf_test.cpp @@ -48,7 +48,7 @@ TEST_F(LlvmLibcTanfTest, SpecialNumbers) { } TEST_F(LlvmLibcTanfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/math/tanhf_test.cpp b/libc/test/src/math/tanhf_test.cpp index 106a51a44953..1b5a377dbe2e 100644 --- a/libc/test/src/math/tanhf_test.cpp +++ b/libc/test/src/math/tanhf_test.cpp @@ -37,7 +37,7 @@ TEST_F(LlvmLibcTanhfTest, SpecialNumbers) { } TEST_F(LlvmLibcTanhfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'001; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/src/mathvec/expf_test.cpp b/libc/test/src/mathvec/expf_test.cpp index d7a4e148e8ac..ae69dc28470c 100644 --- a/libc/test/src/mathvec/expf_test.cpp +++ b/libc/test/src/mathvec/expf_test.cpp @@ -115,7 +115,7 @@ TEST_F(LlvmLibcVecExpfTest, Borderline) { } TEST_F(LlvmLibcVecExpfTest, InFloatRange) { - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = FPBits(v).get_val(); diff --git a/libc/test/utils/FPUtil/x86_long_double_test.cpp b/libc/test/utils/FPUtil/x86_long_double_test.cpp index 8d16869b2e81..e13331263266 100644 --- a/libc/test/utils/FPUtil/x86_long_double_test.cpp +++ b/libc/test/utils/FPUtil/x86_long_double_test.cpp @@ -19,7 +19,7 @@ TEST(LlvmLibcX86LongDoubleTest, is_nan) { // builtin function. Hence, matching LLVM-libc's notion of NaN with the // isnan result ensures that LLVM-libc's behavior matches the compiler's // behavior. - constexpr uint32_t COUNT = 100'000; + constexpr uint32_t COUNT = 1'231; FPBits bits(0.0l); bits.set_biased_exponent(FPBits::MAX_BIASED_EXPONENT);