[all-commits] [llvm/llvm-project] b39f1e: [libc] Fix printf %f rounding condition
michaelrj-google via All-commits
all-commits at lists.llvm.org
Wed Mar 1 10:57:39 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b39f1e5c13897b69c314febd014895a5ed23696e
https://github.com/llvm/llvm-project/commit/b39f1e5c13897b69c314febd014895a5ed23696e
Author: Michael Jones <michaelrj at google.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M libc/src/stdio/printf_core/float_dec_converter.h
M libc/test/src/stdio/sprintf_test.cpp
Log Message:
-----------
[libc] Fix printf %f rounding condition
When running the tbin2dec tests I found a rounding error in my code.
Upon inspection I realized it was due to a lack of parenthesis when
calculating the number of trailing digits. This patch fixes that mistake
and adds unit tests to catch regressions in future.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D145011
More information about the All-commits
mailing list