[all-commits] [llvm/llvm-project] 63f892: [libc] Fix printf g conversion with high precision

michaelrj-google via All-commits all-commits at lists.llvm.org
Fri Jul 28 14:07:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63f8922f49b2fea982856b9e696c6fe220fdfede
      https://github.com/llvm/llvm-project/commit/63f8922f49b2fea982856b9e696c6fe220fdfede
  Author: Michael Jones <michaelrj at google.com>
  Date:   2023-07-28 (Fri, 28 Jul 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 g conversion with high precision

The number of trailing zeroes was being calculated incorrectly. It was
assuming that it could add all of the implicit leading zeroes in the
final block, not accounting for the number of digits actually reqested
by the precision.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D156489




More information about the All-commits mailing list