This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Update sparc ULPs.
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 24 Sep 2012 01:27:41 +0000
- Subject: Re: [PATCH] Update sparc ULPs.
- References: <Pine.LNX.4.64.1208081955410.31240@digraph.polyomino.org.uk><20120808.145640.1140383087882421124.davem@davemloft.net><Pine.LNX.4.64.1208082319540.31240@digraph.polyomino.org.uk><20120923.210206.1999693554497853716.davem@davemloft.net>
On Sun, 23 Sep 2012, David Miller wrote:
> It turns out that the very first operation on xm1 in the ldbl-128
> implementation of log1pl triggers the underflow/inexact exception.
>
> x = xm1 + 1.0L;
>
> This unprotected expression exists in the ldbl-128ibm version of
> log1pl as well, so I'm surprised powerpc doesn't see this too.
>
> The expression "0x1p-16378L + 1.0L" should underflow, right?
No. The result is in the normal range (equal to 1.0L in round-to-nearest
mode), so no underflow.
In general, addition or subtraction should never set the underflow flag,
since if the result is below the normal exponent range then it is also
exact.
--
Joseph S. Myers
joseph@codesourcery.com