[PowerPC64] Correct IBM long double nextafterl

Alan Modra amodra@gmail.com
Tue Mar 25 13:15:00 GMT 2014


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



More information about the Libc-alpha mailing list