File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 88
99#include " src/__support/libc_errno.h"
1010#include " src/math/asinpif16.h"
11- #include " src/math/fabs.h"
1211#include " test/UnitTest/FPMatcher.h"
1312
1413using LlvmLibcAsinpif16Test = LIBC_NAMESPACE::testing::FPTest<float16>;
@@ -75,10 +74,13 @@ TEST_F(LlvmLibcAsinpif16Test, SymmetryProperty) {
7574 0 .9f16, 0 .99f16, 1 .0f16};
7675
7776 for (float16 x : TEST_VALS) {
77+ FPBits neg_x_bits (x);
78+ neg_x_bits.set_sign (Sign::NEG);
79+ float16 neg_x = neg_x_bits.get_val ();
80+
7881 float16 pos_result = LIBC_NAMESPACE::asinpif16 (x);
79- float16 neg_result = LIBC_NAMESPACE::asinpif16 (-x );
82+ float16 neg_result = LIBC_NAMESPACE::asinpif16 (neg_x );
8083
81- EXPECT_FP_EQ (pos_result,
82- static_cast <float16>(LIBC_NAMESPACE::fabs (neg_result)));
84+ EXPECT_FP_EQ (pos_result, FPBits (neg_result).abs ().get_val ());
8385 }
8486}
You can’t perform that action at this time.
0 commit comments