This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/3] PowerPC: remove wrong nearbyintl implementation for, PowerPC64
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Fri, 14 Mar 2014 14:48:36 +0000
- Subject: Re: [PATCH 2/3] PowerPC: remove wrong nearbyintl implementation for, PowerPC64
- Authentication-results: sourceware.org; auth=none
- References: <532309C7 dot 6070303 at linux dot vnet dot ibm dot com> <Pine dot LNX dot 4 dot 64 dot 1403141432230 dot 17775 at digraph dot polyomino dot org dot uk>
On Fri, 14 Mar 2014, Joseph S. Myers wrote:
> On Fri, 14 Mar 2014, Adhemerval Zanella wrote:
>
> > +#ifdef TEST_LDOUBLE
> > + /* Check cases where first double is a exact integer higher than 2^52 and
> > + the precision is determined by second long double for IBM long double. */
> > + TEST_f_f (nearbyint, 34503599627370498.515625L, 34503599627370499.0L),
> > + TEST_f_f (nearbyint, 1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L),
> > + TEST_f_f (nearbyint, -34503599627370498.515625L, -34503599627370499.0L),
> > + TEST_f_f (nearbyint, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L),
> > +#endif
>
> What are the precision requirements on long double for these inputs to be
> representable? If any require more than 64-bit mantissa, they should be
> conditional appropriately on LDBL_MANT_DIG (which may be 64, 106 or 113).
Note that this applies to the other functions as well. In some cases a
test may accidentally pass without such a conditional, if both the input
and expected output round-to-nearest to the same long double value. But
that won't help for these tests when I make rint and nearbyint use the
same tests (once
<https://sourceware.org/ml/libc-alpha/2014-03/msg00214.html> is reviewed),
with the tests for rint systematically expecting "inexact". (These
nearbyint tests in your patch are also missing NO_INEXACT_EXCEPTION, which
should be specified as that's the whole difference between rint and
nearbyint.)
--
Joseph S. Myers
joseph@codesourcery.com