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 17
17
using LlvmLibcAtanhf16Test = LIBC_NAMESPACE::testing::FPTest<float16>;
18
18
namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
19
19
20
+ // Range for positive numbers: [0, 1)
20
21
static 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]
22
25
static constexpr uint16_t NEG_START = 0xBBFFU ;
23
26
static constexpr uint16_t NEG_STOP = 0x8000U ;
24
27
25
28
TEST_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) {
27
30
float16 x = FPBits (v).get_val ();
28
31
EXPECT_MPFR_MATCH_ALL_ROUNDING (mpfr::Operation::Atanh, x,
29
32
LIBC_NAMESPACE::atanhf16 (x), 0.5 );
30
33
}
31
34
}
32
35
33
36
TEST_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) {
35
38
float16 x = FPBits (v).get_val ();
36
39
EXPECT_MPFR_MATCH_ALL_ROUNDING (mpfr::Operation::Atanh, x,
37
40
LIBC_NAMESPACE::atanhf16 (x), 0.5 );
You can’t perform that action at this time.
0 commit comments