[PATCH] PowerPC: fix hypot/hypof FP exceptions
Joseph S. Myers
joseph@codesourcery.com
Tue Apr 30 05:47:00 GMT 2013
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
More information about the Libc-alpha
mailing list