[libc-commits] [libc] [libc][NFC] Rename `MAX_EXPONENT` to `MAX_BIASED_EXPONENT` (PR #75932)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Tue Dec 19 06:07:22 PST 2023


================
@@ -338,7 +338,7 @@ simple_decimal_conversion(const char *__restrict numStart,
   // float, return inf.
   if (hpd.get_decimal_point() > 0 &&
       exp10_to_exp2(hpd.get_decimal_point() - 1) > FloatProp::EXP_BIAS) {
-    output.num = {0, fputil::FPBits<T>::MAX_EXPONENT};
+    output.num = {0, fputil::FPBits<T>::MAX_BIASED_EXPONENT};
----------------
gchatelet wrote:

@michaelrj-google What are the semantics of `exponent` in
https://github.com/llvm/llvm-project/blob/ab41ea4be364dcac32d0c4ec990735c8adb279c8/libc/src/__support/str_to_float.h#L31-L34

Is it biased (aka unsigned) or regular exponent?

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


More information about the libc-commits mailing list