File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1717using LlvmLibcAtanhf16Test = LIBC_NAMESPACE::testing::FPTest<float16>;
1818namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
1919
20+ // Range for positive numbers: [0, 1)
2021static constexpr uint16_t POS_START = 0x0000U ;
21- static constexpr uint16_t POS_STOP = 0x3BFFU ;
22+ static constexpr uint16_t POS_STOP = 0x3C00 ;
23+
24+ // Range for negative numbers: (-1, 0]
2225static constexpr uint16_t NEG_START = 0xBBFFU ;
2326static constexpr uint16_t NEG_STOP = 0x8000U ;
2427
2528TEST_F (LlvmLibcAtanhf16Test, PositiveRange) {
26- for (uint16_t v = POS_START; v <= POS_STOP; ++v) {
29+ for (uint16_t v = POS_START; v < POS_STOP; ++v) {
2730 float16 x = FPBits (v).get_val ();
2831 EXPECT_MPFR_MATCH_ALL_ROUNDING (mpfr::Operation::Atanh, x,
2932 LIBC_NAMESPACE::atanhf16 (x), 0.5 );
3033 }
3134}
3235
3336TEST_F (LlvmLibcAtanhf16Test, NegativeRange) {
34- for (uint16_t v = NEG_START; v < = NEG_STOP; --v) {
37+ for (uint16_t v = NEG_START; v > = NEG_STOP; --v) {
3538 float16 x = FPBits (v).get_val ();
3639 EXPECT_MPFR_MATCH_ALL_ROUNDING (mpfr::Operation::Atanh, x,
3740 LIBC_NAMESPACE::atanhf16 (x), 0.5 );
You can’t perform that action at this time.
0 commit comments