This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Update sparc ULPs.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]