[libc-commits] [llvm] [libc] [libc] Move printf long double to simple calc (PR #75414)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Thu Dec 21 04:56:46 PST 2023


================
@@ -87,14 +87,25 @@ are not recommended to be adjusted except by persons familiar with the Printf
 Ryu Algorithm. Additionally they have no effect when float conversions are
 disabled.
 
+LIBC_COPT_FLOAT_TO_STR_NO_SPECIALIZE_LD
+---------------------------------------
+This flag disables the separate long double conversion implementation. It is
+not based on the Ryu algorithm, instead generating the digits by
+multiplying/dividing the written-out number by 10^9 to get blocks. It's
+significantly faster than INT_CALC, only about 10x slower than MEGA_TABLE,
+and is small in binary size. Its downside is that it always calculates all
+of the digits above the decimal point, making it slightly ineffecient for %e
+calls with large exponents. This is the default. If this flag is not set, no 
+other flags will change the long double behavior.
----------------
gchatelet wrote:

Can you rewrite without the double negation?

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


More information about the libc-commits mailing list