[all-commits] [llvm/llvm-project] 173d50: [libc] add printf auto float conversion
michaelrj-google via All-commits
all-commits at lists.llvm.org
Fri Feb 3 15:17:50 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 173d50235fa3c5b028fa3c8efa5beec56b752e75
https://github.com/llvm/llvm-project/commit/173d50235fa3c5b028fa3c8efa5beec56b752e75
Author: Michael Jones <michaelrj at google.com>
Date: 2023-02-03 (Fri, 03 Feb 2023)
Changed paths:
M libc/src/__support/float_to_string.h
M libc/src/stdio/printf_core/converter.cpp
M libc/src/stdio/printf_core/converter_atlas.h
M libc/src/stdio/printf_core/float_dec_converter.h
M libc/test/src/stdio/sprintf_test.cpp
Log Message:
-----------
[libc] add printf auto float conversion
This patch adds the final conversion to printf, %g. This is a floating
point conversion that selects automatically between the %e and %f
formats based on the precision requested and resulting exponent.
Additionally it trims trailing zeroes. With this done all that's left
for finishing printf is adding long double support to the decimal float
conversions.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D143006
More information about the All-commits
mailing list