Skip to content

Commit 07ec53a

Browse files
committed
Add denorm testing
1 parent 251d0a3 commit 07ec53a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/github_issue_1105.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ void test()
3535
const auto prev_sig {frexp10(prev, &prev_exp)};
3636
BOOST_TEST_EQ(prev_exp, val_exp - 1);
3737
BOOST_TEST_EQ(prev_sig, detail::max_significand_v<T>);
38+
39+
const auto zero_next {nextafter(zero, one)};
40+
BOOST_TEST_EQ(zero_next, std::numeric_limits<T>::denorm_min());
41+
42+
const auto two_next_zero {nextafter(zero_next, one)};
43+
BOOST_TEST_EQ(two_next_zero, T(2, detail::etiny_v<T>));
3844
}
3945

4046
int main()

0 commit comments

Comments
 (0)