This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Rework tst-strtod-round handling of inexact results
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 13 Jun 2013 16:30:33 +0200
- Subject: Re: Rework tst-strtod-round handling of inexact results
- References: <Pine dot LNX dot 4 dot 64 dot 1306131255310 dot 10141 at digraph dot polyomino dot org dot uk>
On 06/13/2013 02:56 PM, Joseph S. Myers wrote:
Another testcase failing for some soft-float cases with incomplete
support for floating-point rounding modes is stdlib/tst-strtod-round.
This test already has logic to ignore inaccurate results for IBM long
double where the result isn't exact in 106 bits (to avoid depending on
the implementation detail that strtold currently works as if the type
has a fixed precision of 106 bits). That's much the same as is
appropriate for the soft-float cases as well: warn but don't give an
error if the result in a not-fully-supported rounding mode is not as
expected, and the string doesn't correspond exactly to a representable
floating-point value.
This patch changes the code in preparation for making it use
ROUNDING_TESTS from math-tests.h. The generated table of tests now
stores information about whether the results are exact for all types.
The idea is that a subsequent patch will make do_test call
ROUNDING_TESTS for each type / mode and pass the relevant information
to test_in_one_mode, which will use it alongside the IBM long double
check to determine whether to count an inaccurate result as an error.
Tested x86_64 (based on revision before Adhemerval's commit).
ok, thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126