This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PowerPC64] Correct IBM long double nextafterl
- From: Alan Modra <amodra at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 25 Mar 2014 23:45:22 +1030
- Subject: Re: [PowerPC64] Correct IBM long double nextafterl
- Authentication-results: sourceware.org; auth=none
- References: <20140325022618 dot GF18201 at bubble dot grove dot modra dot org> <Pine dot LNX dot 4 dot 64 dot 1403251211400 dot 12472 at digraph dot polyomino dot org dot uk>
On Tue, Mar 25, 2014 at 12:13:08PM +0000, Joseph S. Myers wrote:
> On Tue, 25 Mar 2014, Alan Modra wrote:
>
> > + TEST_ff_f (nextafter, 1.0L, -10.0L, 1.0L-0x1p-106L, NO_EXCEPTION),
> > + TEST_ff_f (nextafter, 1.0L, 10.0L, 1.0L+0x1p-105L, NO_EXCEPTION),
> > + TEST_ff_f (nextafter, 1.0L-0x1p-106L, 10.0L, 1.0L, NO_EXCEPTION),
> > + TEST_ff_f (nextafter, -1.0L, -10.0L, -1.0L-0x1p-105L, NO_EXCEPTION),
> > + TEST_ff_f (nextafter, -1.0L, 10.0L, -1.0L+0x1p-106L, NO_EXCEPTION),
> > + TEST_ff_f (nextafter, -1.0L+0x1p-106L, -10.0L, -1.0L, NO_EXCEPTION),
>
> You mean NO_INEXACT_EXCEPTION (NO_EXCEPTION makes no assertion about
> whether or not "inexact" is present; "inexact" has a different default
> from the other exceptions, following ISO C Annex F).
I deliberately did not choose NO_INEXACT_EXCEPTION, because nextafterl
on IBM long double *does* set FE_INEXACT on some of these tests. The
reason is the "x + u" or "x - u" operations inside nextafterl which
use __gcc_qadd. As you know, __gcc_qadd spuriously sets FE_INEXACT.
Also, as the description of IBM long double in the PowerPC64 ABI
states, the "Extended precision" format
* Does not support the IEEE status flags for overflow, underflow, and
other conditions. These flag have no meaning in this format.
--
Alan Modra
Australia Development Lab, IBM