diff --git a/libc/test/src/math/FmaTest.h b/libc/test/src/math/FmaTest.h --- a/libc/test/src/math/FmaTest.h +++ b/libc/test/src/math/FmaTest.h @@ -67,7 +67,7 @@ } void test_subnormal_range(Func func) { - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 100'001; constexpr UIntType STEP = (FPBits::MAX_SUBNORMAL - FPBits::MIN_SUBNORMAL) / COUNT; for (UIntType v = FPBits::MIN_SUBNORMAL, w = FPBits::MAX_SUBNORMAL; @@ -82,7 +82,7 @@ } void test_normal_range(Func func) { - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 100'001; constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; for (UIntType v = FPBits::MIN_NORMAL, w = FPBits::MAX_NORMAL; v <= FPBits::MAX_NORMAL && w >= FPBits::MIN_NORMAL; diff --git a/libc/test/src/math/HypotTest.h b/libc/test/src/math/HypotTest.h --- a/libc/test/src/math/HypotTest.h +++ b/libc/test/src/math/HypotTest.h @@ -59,7 +59,7 @@ } void test_subnormal_range(Func func) { - constexpr UIntType COUNT = 100001; + constexpr UIntType COUNT = 10'001; for (unsigned scale = 0; scale < 4; ++scale) { UIntType max_value = FPBits::MAX_SUBNORMAL << scale; UIntType step = (max_value - FPBits::MIN_SUBNORMAL) / COUNT; @@ -84,7 +84,7 @@ } void test_normal_range(Func func) { - constexpr UIntType COUNT = 100001; + constexpr UIntType COUNT = 10'001; constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; for (int signs = 0; signs < 4; ++signs) { for (UIntType v = FPBits::MIN_NORMAL, w = FPBits::MAX_NORMAL; diff --git a/libc/test/src/math/RIntTest.h b/libc/test/src/math/RIntTest.h --- a/libc/test/src/math/RIntTest.h +++ b/libc/test/src/math/RIntTest.h @@ -93,7 +93,7 @@ } void testSubnormalRange(RIntFunc func) { - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 100'001; constexpr UIntType STEP = (FPBits::MAX_SUBNORMAL - FPBits::MIN_SUBNORMAL) / COUNT; for (UIntType i = FPBits::MIN_SUBNORMAL; i <= FPBits::MAX_SUBNORMAL; @@ -108,7 +108,7 @@ } void testNormalRange(RIntFunc func) { - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 100'001; constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; for (UIntType i = FPBits::MIN_NORMAL; i <= FPBits::MAX_NORMAL; i += STEP) { T x = T(FPBits(i)); diff --git a/libc/test/src/math/RemQuoTest.h b/libc/test/src/math/RemQuoTest.h --- a/libc/test/src/math/RemQuoTest.h +++ b/libc/test/src/math/RemQuoTest.h @@ -95,7 +95,7 @@ } void testSubnormalRange(RemQuoFunc func) { - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 100'001; constexpr UIntType STEP = (FPBits::MAX_SUBNORMAL - FPBits::MIN_SUBNORMAL) / COUNT; for (UIntType v = FPBits::MIN_SUBNORMAL, w = FPBits::MAX_SUBNORMAL; @@ -110,7 +110,7 @@ } void testNormalRange(RemQuoFunc func) { - constexpr UIntType COUNT = 234561; + constexpr UIntType COUNT = 1'001; constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; for (UIntType v = FPBits::MIN_NORMAL, w = FPBits::MAX_NORMAL; v <= FPBits::MAX_NORMAL && w >= FPBits::MIN_NORMAL; diff --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h --- a/libc/test/src/math/RoundToIntegerTest.h +++ b/libc/test/src/math/RoundToIntegerTest.h @@ -214,7 +214,7 @@ } void testSubnormalRange(RoundToIntegerFunc func) { - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 1'000'001; constexpr UIntType STEP = (FPBits::MAX_SUBNORMAL - FPBits::MIN_SUBNORMAL) / COUNT; for (UIntType i = FPBits::MIN_SUBNORMAL; i <= FPBits::MAX_SUBNORMAL; @@ -258,7 +258,7 @@ if (sizeof(I) > sizeof(long)) return; - constexpr UIntType COUNT = 1000001; + constexpr UIntType COUNT = 1'000'001; constexpr UIntType STEP = (FPBits::MAX_NORMAL - FPBits::MIN_NORMAL) / COUNT; for (UIntType i = FPBits::MIN_NORMAL; i <= FPBits::MAX_NORMAL; i += STEP) { F x = F(FPBits(i)); diff --git a/libc/test/src/math/SqrtTest.h b/libc/test/src/math/SqrtTest.h --- a/libc/test/src/math/SqrtTest.h +++ b/libc/test/src/math/SqrtTest.h @@ -45,7 +45,7 @@ test_all_rounding_modes(func, T(denormal)); } - constexpr UIntType COUNT = 1'000'001; + constexpr UIntType COUNT = 200'001; constexpr UIntType STEP = HIDDEN_BIT / COUNT; for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = __llvm_libc::cpp::bit_cast(v); @@ -54,7 +54,7 @@ } void test_normal_range(SqrtFunc func) { - constexpr UIntType COUNT = 1'234'561; + constexpr UIntType COUNT = 200'001; constexpr UIntType STEP = UIntType(-1) / COUNT; for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) { T x = __llvm_libc::cpp::bit_cast(v); diff --git a/libc/test/src/math/asinhf_test.cpp b/libc/test/src/math/asinhf_test.cpp --- a/libc/test/src/math/asinhf_test.cpp +++ b/libc/test/src/math/asinhf_test.cpp @@ -43,7 +43,7 @@ } TEST(LlvmLibcAsinhfTest, InFloatRange) { - constexpr uint32_t COUNT = 234561; + constexpr uint32_t COUNT = 1'001; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = float(FPBits_t(v)); diff --git a/libc/test/src/math/log10_test.cpp b/libc/test/src/math/log10_test.cpp --- a/libc/test/src/math/log10_test.cpp +++ b/libc/test/src/math/log10_test.cpp @@ -78,7 +78,7 @@ } TEST(LlvmLibcLog10Test, InDoubleRange) { - constexpr uint64_t COUNT = 234561; + constexpr uint64_t COUNT = 1'001; 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/log1p_test.cpp b/libc/test/src/math/log1p_test.cpp --- a/libc/test/src/math/log1p_test.cpp +++ b/libc/test/src/math/log1p_test.cpp @@ -81,7 +81,7 @@ } TEST(LlvmLibcLog1pTest, InDoubleRange) { - constexpr uint64_t COUNT = 234561; + constexpr uint64_t COUNT = 4501; auto test = [&](uint64_t start, uint64_t stop, mpfr::RoundingMode rounding_mode) { diff --git a/libc/test/src/math/log2_test.cpp b/libc/test/src/math/log2_test.cpp --- a/libc/test/src/math/log2_test.cpp +++ b/libc/test/src/math/log2_test.cpp @@ -78,7 +78,7 @@ } TEST(LlvmLibcLog2Test, InDoubleRange) { - constexpr uint64_t COUNT = 234561; + constexpr uint64_t COUNT = 1'001; 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/sincosf_test.cpp b/libc/test/src/math/sincosf_test.cpp --- a/libc/test/src/math/sincosf_test.cpp +++ b/libc/test/src/math/sincosf_test.cpp @@ -90,7 +90,7 @@ } TEST(LlvmLibcSinCosfTest, InFloatRange) { - constexpr uint32_t COUNT = 234561; + constexpr uint32_t COUNT = 1'001; constexpr uint32_t STEP = UINT32_MAX / COUNT; for (uint32_t i = 0, v = 0; i <= COUNT; ++i, v += STEP) { float x = float(FPBits((v)));