This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Move TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Sat, 30 Nov 2013 02:17:06 +0000
- Subject: Re: Move TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1311300159330 dot 30918 at digraph dot polyomino dot org dot uk>
On Sat, 30 Nov 2013, Joseph S. Myers wrote:
> (output_for_one_input_case): Do not require ERANGE on underflow to
> zero if round-to-nearest result does not underflow to zero, unless
> exact results required.
I should have explained this change. Examining the generated test output
showed cases (atan of the least subnormal input in a directed rounding
mode) where the expected underflowing result is 0, so errno of ERANGE is
expected - but implementations may well just return the input value (which
is just a 1ulp error compared to the correctly rounded value, or a tiny
fraction of 1ulp compared to the mathematical result) in which case they
would also not generate ERANGE (if the result is checked against 0 to
determine whether to generate ERANGE, which we decided to allow in our
errno goals). Really the expectation is "ERANGE if the result is 0, but
ERANGE optional if the result is not 0", but as that's not something
libm-test.inc currently supports - tests for errno and exceptions are
independent of what the actual result returned was - it's best represented
as "ERANGE optional" (much like cases very close to the underflow
threshold are "underflow optional" when if the actual value returned is
subnormal they should be "underflow required").
--
Joseph S. Myers
joseph@codesourcery.com