This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] benchtests: Improve readability of JSON output
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Will Newton <will dot newton at linaro dot org>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 24 Apr 2014 12:58:27 +0200
- Subject: Re: [PATCH] benchtests: Improve readability of JSON output
- Authentication-results: sourceware.org; auth=none
- References: <1396949290-21346-1-git-send-email-will dot newton at linaro dot org> <5343C311 dot 1030101 at redhat dot com> <CANu=DmjuuVwD4iVC7+fA+7jmO_CCSuHXHAuRyCA-CLqHnGbE9Q at mail dot gmail dot com> <5343CE68 dot 1080208 at redhat dot com> <CANu=DmhKGALfv4Zy5zXv6Zhzm+qKS4URfO109jnLnthS+ee5mQ at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1404231421590 dot 13425 at digraph dot polyomino dot org dot uk> <5358BEF5 dot 2030708 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1404241026470 dot 26265 at digraph dot polyomino dot org dot uk>
On 04/24/2014 12:38 PM, Joseph S. Myers wrote:
Given snprintf_l *and* a GCC implementation of the TS 18661-1 FENV_ROUND
pragma *and* glibc defining snprintf_l to be affected by constant rounding
directions, this would reduce to a single function call in the scope of
"#pragma STDC FENV_ROUND FE_TONEAREST" (with a previous computation of a
locale_t value for the C locale to specify in that function call).
That would be fairly convenient. People will still complain that 0.2
comes out as 0.20000000000000001 (or whatever floating point values
aren't printed in their shortest representation with DBL_DECIMAL_DIG),
but at least the output is correct in a formal sense.
--
Florian Weimer / Red Hat Product Security Team