public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113512] Incorrect results for std::format("{:#.3g}", flt) Date: Tue, 30 Jan 2024 14:54:49 +0000 [thread overview] Message-ID: <bug-113512-4-lqalUksF14@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113512-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113512 --- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:1bb2e52cc69902c7bf00fbdd094e948803222946 commit r13-8261-g1bb2e52cc69902c7bf00fbdd094e948803222946 Author: Jonathan Wakely <jwakely@redhat.com> Date: Sat Jan 20 00:44:12 2024 +0000 libstdc++: Fix std::format floating-point alternate forms [PR113512] The logic for handling '#' forms was ... not good. The count of significant figures just counted digits, instead of ignoring leading zeros. And when moving the result from the stack buffer to a dynamic string the exponent could get lost in some cases. libstdc++-v3/ChangeLog: PR libstdc++/113512 * include/std/format (__formatter_fp::format): Fix logic for alternate forms. * testsuite/std/format/functions/format.cc: Check buggy cases of alternate forms with g presentation type. (cherry picked from commit a57439d61937925cec48df6166b2a805ae7054d5)
next prev parent reply other threads:[~2024-01-30 14:54 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-19 23:19 [Bug libstdc++/113512] New: " redi at gcc dot gnu.org 2024-01-19 23:20 ` [Bug libstdc++/113512] " redi at gcc dot gnu.org 2024-01-21 13:35 ` cvs-commit at gcc dot gnu.org 2024-01-30 14:54 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-30 16:52 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113512-4-lqalUksF14@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).