Skip to content

Commit a9deb29

Browse files
committed
enhancements
1 parent fffbb28 commit a9deb29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/math/generic/asinpif16.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ LLVM_LIBC_FUNCTION(float16, asinpif16, (float16 x)) {
4242

4343
FPBits xbits(x);
4444
uint16_t x_uint = xbits.uintval();
45-
bool is_neg = static_cast<bool>(x_uint >> 15);
46-
float16 x_abs = is_neg ? -x : x;
45+
bool is_neg = xbits.is_neg();
46+
float16 x_abs = xbits.abs().get_val();
4747

4848
auto signed_result = [is_neg](auto r) -> auto { return is_neg ? -r : r; };
4949

@@ -89,7 +89,7 @@ LLVM_LIBC_FUNCTION(float16, asinpif16, (float16 x)) {
8989
//
9090
// it's very accurate in the range [0, 0.5] and has a maximum error of
9191
// 0.0000000000000001 in the range [0, 0.5].
92-
static constexpr double POLY_COEFFS[10] = {
92+
constexpr double POLY_COEFFS[10] = {
9393
0x1.45f306dc9c889p-2, // x^1
9494
0x1.b2995e7b7b5fdp-5, // x^3
9595
0x1.8723a1d588a36p-6, // x^5

0 commit comments

Comments
 (0)