File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,9 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
5858
5959 void test_subnormal_range (FmaFunc func) {
6060 constexpr InStorageType COUNT = 100'001 ;
61- constexpr InStorageType STEP =
61+ constexpr InStorageType RAW_STEP =
6262 (IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT;
63+ constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP);
6364 LIBC_NAMESPACE::srand (1 );
6465 for (InStorageType v = IN_MIN_SUBNORMAL_U, w = IN_MAX_SUBNORMAL_U;
6566 v <= IN_MAX_SUBNORMAL_U && w >= IN_MIN_SUBNORMAL_U;
@@ -75,7 +76,9 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
7576
7677 void test_normal_range (FmaFunc func) {
7778 constexpr InStorageType COUNT = 100'001 ;
78- constexpr InStorageType STEP = (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT;
79+ constexpr InStorageType RAW_STEP =
80+ (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT;
81+ constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP);
7982 LIBC_NAMESPACE::srand (1 );
8083 for (InStorageType v = IN_MIN_NORMAL_U, w = IN_MAX_NORMAL_U;
8184 v <= IN_MAX_NORMAL_U && w >= IN_MIN_NORMAL_U; v += STEP, w -= STEP) {
You can’t perform that action at this time.
0 commit comments