[libc-commits] [libc] [libc] Fix str_to_float.h clinger_fast_math for negative exponents. (PR #227391)

via libc-commits libc-commits at lists.llvm.org
Tue Sep 29 10:52:49 PDT 2026


================
@@ -582,7 +582,7 @@ clinger_fast_path(ExpandedFloat<T> init_num,
     result =
         FPBits(float_mantissa * ClingerConsts<T>::POWERS_OF_TEN_ARRAY[exp10]);
   } else if (exp10 < 0) {
-    if (-exp10 > ClingerConsts<T>::EXACT_POWERS_OF_TEN) {
+    if (exp10 < -ClingerConsts<T>::EXACT_POWERS_OF_TEN) {
----------------
lntue wrote:

since you're here, do you mind replacing the local variable name "exp10"?  It will be a keyword for exp10 functions in C23.

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


More information about the libc-commits mailing list