This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix e_logl (128ibm) spurious underflow
- From: "Carlos O'Donell" <carlos at redhat 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: Wed, 27 Feb 2013 16:17:35 -0500
- Subject: Re: Fix e_logl (128ibm) spurious underflow
- References: <512E686B.9040007@linux.vnet.ibm.com>
On 02/27/2013 03:11 PM, Adhemerval Zanella wrote:
> This patch fixes the spurious underflow exceptions triggered by cacos,
> casin, and casinh test for IBM long double. This is in fact an issue with
> __ieee754_logl implementation: in the domain reduction phase, where
> the algorithm transform log(u) -> log(t) + log(u/t) and log(u/t) -> log(1+(u-t)/t),
> if the input is high enough the calculation '1+(u-t)/t' might generate
> subnormal numbers.
>
> The patch I propose tests if the resulting coefficient used in the series
> expansion might trigger a subnormal multiplication and if it is the case,
> just set the expansion to 0. Since it is denormal multiplications and the
> expect result is orders of magnitude higher than the series expansion, I
> believe the loss of precision is acceptable.
>
> I also added the ulps update for remaining cacos tests.
>
> Any tips, comments, advices?
>
> --
>
> 2013-02-27 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
>
> * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Fix spurious
> underflow.
> * sysdeps/powerpc/fpu/libm-test-ulps: Update.
Where is the test case addition that triggers the spurious underflow?
Cheers,
Carlos.