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: Rework tst-strtod-round handling of inexact results


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


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