[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:27:35 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)) {
+ int rounding = fputil::quick_get_round();
+
+ if (rounding == FE_UPWARD && xbits.uintval() == 0x0a48)
----------------
lntue wrote:
Just return the results explicitly for all rounding modes for both inputs.
https://github.com/llvm/llvm-project/pull/186597
More information about the libc-commits
mailing list