[libc-commits] [libc] [libc] Avoid C++23 f16 floating-point literals in erf headers (PR #209455)

via libc-commits libc-commits at lists.llvm.org
Tue Jul 14 07:12:30 PDT 2026


================
@@ -109,7 +109,7 @@ LIBC_INLINE float16 erfcf16(float16 x) {
     if (fputil::fenv_is_round_up())
       return FPBits::min_subnormal().get_val();
 #endif
-    return 0.0f16;
----------------
lntue wrote:

We can use `FPBits::zero()` and `FPBits::one(sign)` for zeros and ones.  https://github.com/llvm/llvm-project/blob/main/libc/src/__support/FPUtil/FPBits.h#L389-L393

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


More information about the libc-commits mailing list