This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] benchtests: Improve readability of JSON output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]