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] PowerPC: fix hypot/hypof FP exceptions


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


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