[libc-commits] [libc] [llvm] [libc][math] Added missing floating point exception for atanpif16 (PR #186597)
via libc-commits
libc-commits at lists.llvm.org
Sun Mar 15 04:26:39 PDT 2026
================
@@ -119,14 +113,34 @@ LLVM_LIBC_FUNCTION(float16, atanpif16, (float16 x)) {
// Case 1: |x| <= 0.5 - Direct polynomial evaluation
if (LIBC_LIKELY(x_abs <= 0.5)) {
+
+ if (LIBC_UNLIKELY(xbits.is_zero()))
+ return x;
+
+ if (LIBC_UNLIKELY(xbits.uintval() == 0x0a48 || xbits.uintval() == 0x8a48)) {
----------------
lntue wrote:
both of them have the same absolute value. Just check with `x_abs` instead.
https://github.com/llvm/llvm-project/pull/186597
More information about the libc-commits
mailing list