[libc-commits] [PATCH] D150399: [libc] add options to printf decimal floats

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 7 14:49:06 PDT 2023


michaelrj added inline comments.


================
Comment at: libc/src/__support/float_to_string.h:21
+
+#ifdef LIBC_COPT_FLOAT_TO_STR_USE_MEGA_TABLE
+#include "src/__support/ryu_long_double_constants.h"
----------------
sivachandra wrote:
> s/`LIBC_COPT_FLOAT_TO_STR_USE_MEGA_TABLE`/`LIBC_COPT_FLOAT_TO_STR_USE_LARGE_LONG_DOUBLE_TABLE`
I like the name `MEGA_TABLE` since the table is several megabytes in size. Additionally, when the mega table is enabled it's used for both doubles and long doubles.


================
Comment at: libc/src/__support/float_to_string.h:427
+      val = internal::get_table_positive_df<256>(IDX_SIZE * idx, block_index);
+#elif defined(LIBC_COPT_FLOAT_TO_STR_USE_INT_CALC)
+
----------------
sivachandra wrote:
> Add commentary about how the options here compare.
I've added it to the top of the file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150399/new/

https://reviews.llvm.org/D150399



More information about the libc-commits mailing list