@@ -48,7 +48,8 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
4848 InStorageType get_random_bit_pattern () {
4949 InStorageType bits{0 };
5050 for (InStorageType i = 0 ; i < sizeof (InStorageType) / 2 ; ++i) {
51- bits = (bits << 2 ) + static_cast <uint16_t >(LIBC_NAMESPACE::rand ());
51+ bits = static_cast <InStorageType>(
52+ (bits << 2 ) + static_cast <uint16_t >(LIBC_NAMESPACE::rand ()));
5253 }
5354 return bits;
5455 }
@@ -57,7 +58,7 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
5758 using FmaFunc = OutType (*)(InType, InType, InType);
5859
5960 void test_subnormal_range (FmaFunc func) {
60- constexpr InStorageType COUNT = 100 '001 ;
61+ constexpr InStorageType COUNT = 10 '001 ;
6162 constexpr InStorageType RAW_STEP =
6263 (IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT;
6364 constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP);
@@ -75,7 +76,7 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
7576 }
7677
7778 void test_normal_range (FmaFunc func) {
78- constexpr InStorageType COUNT = 100 '001 ;
79+ constexpr InStorageType COUNT = 10 '001 ;
7980 constexpr InStorageType RAW_STEP =
8081 (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT;
8182 constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP);
0 commit comments