This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: fix hypot/hypof FP exceptions
- From: "Joseph S. Myers" <joseph at codesourcery 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: Mon, 29 Apr 2013 20:35:07 +0000
- Subject: Re: [PATCH] PowerPC: fix hypot/hypof FP exceptions
- References: <517EADAF dot 8000601 at linux dot vnet dot ibm dot com>
On Mon, 29 Apr 2013, Adhemerval Zanella wrote:
> This patch fixes spurious overflow FP generated in PowerPC hypot code triggered
> by recent cacos/cacosh/casin/casinh tests with argument as [+/-]0x1.fp-129 for
> float and [+/-] 0x1.fp-1025 for double.
>
> For hypotf I removed the unneeded tests (since sqrt for double precision will be
> used in the end).
>
> For hypot I adjusted the test to check if x/y with x>y is higher than 2^60 by
> checking if first y * 2^60 will overflow. If so, the test used is x > (y*2^60).
>
> With this patch and the previous ULPs update , I'm not seeing any more issues
> on float and double testcases for PowerPC. Tested on PPC32 and PPC64.
>
> Any tips, comments, advices?
In a case such as this I advise:
* File a bug in Bugzilla for the user-visible hypot issues, and reference
the bug number as [BZ #N] in the ChangeLog entry for the fix.
* As part of the patch fixing the bug, add testcases that directly test
those hypot issues, rather than relying on the tests for another function
to cover this bug.
--
Joseph S. Myers
joseph@codesourcery.com