[libc-commits] [libc] [libc] Modify `atan2f128` to use emulated Float128 type (PR #216508)

via libc-commits libc-commits at lists.llvm.org
Mon Aug 17 17:01:07 PDT 2026


================
@@ -165,7 +165,8 @@ LIBC_INLINE float128 atan2f128(float128 y, float128 x) {
     DFloat128 result = quick_add(const_term, quotient);
     if (final_sign)
       result.sign = result.sign.negate();
-    return static_cast<float128>(result);
+    return result.template as<Float128, /*ShouldSignalExceptions=*/false>();
+    (result);
----------------
overmighty wrote:

```suggestion
    return result.template as<Float128, /*ShouldSignalExceptions=*/true>();
```

https://github.com/llvm/llvm-project/pull/216508


More information about the libc-commits mailing list