diff --git a/libc/test/src/math/AddTest.h b/libc/test/src/math/AddTest.h index 370cc2bbde8b3..4105add4ef4ab 100644 --- a/libc/test/src/math/AddTest.h +++ b/libc/test/src/math/AddTest.h @@ -40,7 +40,7 @@ class AddTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class AddTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 3af87420a739f..d30bd200b02ba 100644 --- a/libc/test/src/math/CeilTest.h +++ b/libc/test/src/math/CeilTest.h @@ -70,7 +70,7 @@ class CeilTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 7c46d1bbf134f..d23ad933a1c89 100644 --- a/libc/test/src/math/CopySignTest.h +++ b/libc/test/src/math/CopySignTest.h @@ -35,7 +35,7 @@ class CopySignTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 c14d16fb5773b..b990484cdcfce 100644 --- a/libc/test/src/math/DivTest.h +++ b/libc/test/src/math/DivTest.h @@ -39,7 +39,7 @@ class DivTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class DivTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 7b4ea93e4db99..b3188d0310b87 100644 --- a/libc/test/src/math/FAbsTest.h +++ b/libc/test/src/math/FAbsTest.h @@ -37,7 +37,7 @@ class FAbsTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 03ff26ab23798..72063b0234bb1 100644 --- a/libc/test/src/math/FDimTest.h +++ b/libc/test/src/math/FDimTest.h @@ -64,7 +64,7 @@ class FDimTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 772409062ef5a..3f62dffa16b93 100644 --- a/libc/test/src/math/FMaxTest.h +++ b/libc/test/src/math/FMaxTest.h @@ -60,7 +60,7 @@ class FMaxTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 3822d7cb73785..d4bf26906c231 100644 --- a/libc/test/src/math/FMinTest.h +++ b/libc/test/src/math/FMinTest.h @@ -61,7 +61,7 @@ class FMinTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 cce0c731ebbc0..0ac31c0306cfa 100644 --- a/libc/test/src/math/FloorTest.h +++ b/libc/test/src/math/FloorTest.h @@ -70,7 +70,7 @@ class FloorTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 902ff0413b0fa..c1e0fab482026 100644 --- a/libc/test/src/math/FmaTest.h +++ b/libc/test/src/math/FmaTest.h @@ -58,7 +58,7 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 d1151c83efbd3..36207b54dda86 100644 --- a/libc/test/src/math/FrexpTest.h +++ b/libc/test/src/math/FrexpTest.h @@ -95,7 +95,7 @@ class FrexpTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 b37abf7e156d3..146f85d0b3601 100644 --- a/libc/test/src/math/HypotTest.h +++ b/libc/test/src/math/HypotTest.h @@ -70,7 +70,7 @@ class HypotTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 @@ class HypotTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 5d805ef7a1e22..3357ef4df73d5 100644 --- a/libc/test/src/math/ILogbTest.h +++ b/libc/test/src/math/ILogbTest.h @@ -80,7 +80,7 @@ class LlvmLibcILogbTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class LlvmLibcILogbTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 5ef3b2675a49e..83ac99b7d4ebd 100644 --- a/libc/test/src/math/LogbTest.h +++ b/libc/test/src/math/LogbTest.h @@ -74,7 +74,7 @@ class LogbTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 3377290169610..a6def094c07eb 100644 --- a/libc/test/src/math/ModfTest.h +++ b/libc/test/src/math/ModfTest.h @@ -86,7 +86,7 @@ class ModfTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 cb81a795be36b..5f74087a6bc5c 100644 --- a/libc/test/src/math/MulTest.h +++ b/libc/test/src/math/MulTest.h @@ -48,7 +48,7 @@ class MulTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class MulTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 88cdf453f0556..6e79f318a194d 100644 --- a/libc/test/src/math/NearbyIntTest.h +++ b/libc/test/src/math/NearbyIntTest.h @@ -70,7 +70,7 @@ class NearbyIntTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 @@ class NearbyIntTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 86e73bb5b0548..0ee7690c8f46b 100644 --- a/libc/test/src/math/RIntTest.h +++ b/libc/test/src/math/RIntTest.h @@ -104,7 +104,7 @@ class RIntTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 @@ class RIntTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 e664000fd18d1..40b4ce748fa6b 100644 --- a/libc/test/src/math/RemQuoTest.h +++ b/libc/test/src/math/RemQuoTest.h @@ -104,7 +104,7 @@ class RemQuoTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 @@ class RemQuoTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 5ecda66ccb588..761c258fc5573 100644 --- a/libc/test/src/math/RoundEvenTest.h +++ b/libc/test/src/math/RoundEvenTest.h @@ -72,7 +72,7 @@ class RoundEvenTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 d571d5d8feed4..a32b24a7a7719 100644 --- a/libc/test/src/math/RoundTest.h +++ b/libc/test/src/math/RoundTest.h @@ -70,7 +70,7 @@ class RoundTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 469db111302c2..1795b85576649 100644 --- a/libc/test/src/math/RoundToIntegerTest.h +++ b/libc/test/src/math/RoundToIntegerTest.h @@ -240,7 +240,7 @@ class RoundToIntegerTestTemplate } 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 @@ class RoundToIntegerTestTemplate 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 d11d708f644d9..253cacd7d2cec 100644 --- a/libc/test/src/math/RsqrtTest.h +++ b/libc/test/src/math/RsqrtTest.h @@ -39,7 +39,7 @@ class RsqrtTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } // 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 @@ class RsqrtTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { // 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 fdfc4f9bb9943..d59f5309a085c 100644 --- a/libc/test/src/math/SqrtTest.h +++ b/libc/test/src/math/SqrtTest.h @@ -32,7 +32,7 @@ class SqrtTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class SqrtTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 b799d78515fa4..6cf3e7ba751ef 100644 --- a/libc/test/src/math/SubTest.h +++ b/libc/test/src/math/SubTest.h @@ -40,7 +40,7 @@ class SubTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class SubTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 76c9740a917bf..db0f19c83265f 100644 --- a/libc/test/src/math/TruncTest.h +++ b/libc/test/src/math/TruncTest.h @@ -70,7 +70,7 @@ class TruncTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 8678fe620d6d3..843a43ee52440 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 40b87021109f9..ec5d3e4dc0732 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 45900aed18b32..9af569b984b8e 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 96215bdc577eb..59bcbde6e0f72 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 4e3638410b484..0ac891cd09439 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 20702c5c15e88..304790eea68d2 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 361362bac3f8a..334b74062e74a 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 75dfbc6608eac..38480b7f07684 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 72fda596131b8..2a3c77a29cc02 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 7fa0dffd607e2..9622d3f9687e8 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 a342fc0f02305..629497da43514 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 87391383752be..c9759c4d14875 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 61b8583cbc7ff..553f0a8104342 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 1d7d2189d5268..829a87a147491 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 40c43f9894639..cb402f74ecac0 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 3d573b211f4b4..2ee925b82d5f6 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 d5d5dc3b4cd50..444633dff5cb9 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 6c53fdadbd354..86152d1def9a8 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 17ff6c43f7717..505b0e011c2be 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 f6a8cf57ed13c..4dbe04845257e 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 b41a412b3bddc..13861e1c4f8c1 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 5e5fd699ab4ac..7f54fbce31505 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 16b20d72e2958..b7e86164f2553 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 05167b80ec06a..b04473d2bfe7a 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 2f7a9f2de78f3..4ded9e2e21b23 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 3e48f7447b6cb..62de9f5424697 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 1a1bd14a65d84..e162163b529c0 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 dd720739ac569..8a6157ad00deb 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 b3ac3dbf3ae08..07a3329ea8db3 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 9eada859ced84..b05b3bd43c5c9 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 78544893c520e..ce6486e388089 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 c9a030a89c2fd..e949805b897df 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 fb99080435915..1c85222af6732 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 7eac0348ee6d4..79c803887b34f 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 30bfec646eee9..343afaae5f340 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 9e6263bb52a67..67eaad2e1da2a 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 33aab965ba386..3f6d41785176e 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 516941ba49b9e..d3cdf3a542e40 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 93a1eecc6186c..a96e65824c99f 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 7dc6f5abe6389..e3063a1f82710 100644 --- a/libc/test/src/math/smoke/CopySignTest.h +++ b/libc/test/src/math/smoke/CopySignTest.h @@ -36,7 +36,7 @@ class CopySignTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 56cc70c985ba2..8c86b3d8231e3 100644 --- a/libc/test/src/math/smoke/FDimTest.h +++ b/libc/test/src/math/smoke/FDimTest.h @@ -63,7 +63,7 @@ class FDimTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 1cb105aa00778..6b47930965d1d 100644 --- a/libc/test/src/math/smoke/FMaxTest.h +++ b/libc/test/src/math/smoke/FMaxTest.h @@ -56,7 +56,7 @@ class FMaxTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 b52169e5e8680..b5c4347857d4c 100644 --- a/libc/test/src/math/smoke/FMaximumMagNumTest.h +++ b/libc/test/src/math/smoke/FMaximumMagNumTest.h @@ -69,7 +69,7 @@ class FMaximumMagNumTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 81a232d96ec94..6a45ad13fc293 100644 --- a/libc/test/src/math/smoke/FMaximumMagTest.h +++ b/libc/test/src/math/smoke/FMaximumMagTest.h @@ -57,7 +57,7 @@ class FMaximumMagTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 f4e05b9f455ed..14b70f029009d 100644 --- a/libc/test/src/math/smoke/FMaximumNumTest.h +++ b/libc/test/src/math/smoke/FMaximumNumTest.h @@ -68,7 +68,7 @@ class FMaximumNumTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 5e71a41d7b345..a839eb02b25d8 100644 --- a/libc/test/src/math/smoke/FMaximumTest.h +++ b/libc/test/src/math/smoke/FMaximumTest.h @@ -56,7 +56,7 @@ class FMaximumTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 049d94eb1b340..ae3943d13f779 100644 --- a/libc/test/src/math/smoke/FMinTest.h +++ b/libc/test/src/math/smoke/FMinTest.h @@ -56,7 +56,7 @@ class FMinTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 4cec6f08b2daa..a5809ea471f63 100644 --- a/libc/test/src/math/smoke/FMinimumMagNumTest.h +++ b/libc/test/src/math/smoke/FMinimumMagNumTest.h @@ -69,7 +69,7 @@ class FMinimumMagNumTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 18b43815bdeca..ee24042cfe242 100644 --- a/libc/test/src/math/smoke/FMinimumMagTest.h +++ b/libc/test/src/math/smoke/FMinimumMagTest.h @@ -57,7 +57,7 @@ class FMinimumMagTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 dddcdc28d30c8..10b7d7aab9343 100644 --- a/libc/test/src/math/smoke/FMinimumNumTest.h +++ b/libc/test/src/math/smoke/FMinimumNumTest.h @@ -68,7 +68,7 @@ class FMinimumNumTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 b5c0e98d17b99..6770fdd2e648c 100644 --- a/libc/test/src/math/smoke/FMinimumTest.h +++ b/libc/test/src/math/smoke/FMinimumTest.h @@ -56,7 +56,7 @@ class FMinimumTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 605698e1d3452..7d53b3376d393 100644 --- a/libc/test/src/math/smoke/ILogbTest.h +++ b/libc/test/src/math/smoke/ILogbTest.h @@ -78,7 +78,7 @@ class LlvmLibcILogbTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 @@ class LlvmLibcILogbTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 a9f34e7517b83..d876eb6fe17a6 100644 --- a/libc/test/src/math/smoke/LogbTest.h +++ b/libc/test/src/math/smoke/LogbTest.h @@ -70,7 +70,7 @@ class LogbTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { 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 71f1c6bf4be28..a21555d5f3765 100644 --- a/libc/test/src/math/smoke/ModfTest.h +++ b/libc/test/src/math/smoke/ModfTest.h @@ -90,7 +90,7 @@ class ModfTest : public LIBC_NAMESPACE::testing::FEnvSafeTest { } 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 70fc361c2e244..857bc72b77fe3 100644 --- a/libc/test/src/math/smoke/RoundToIntegerTest.h +++ b/libc/test/src/math/smoke/RoundToIntegerTest.h @@ -118,7 +118,7 @@ class RoundToIntegerTestTemplate 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 62f8994c9143a..dbd9481d41447 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 b384d8cab4ea7..fa04d870912e7 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 106a51a449532..1b5a377dbe2ea 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 d7a4e148e8acd..ae69dc28470cd 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 8d16869b2e816..e13331263266f 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);