This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix casinh, casin inaccuracy from cancellation (bug 14994)
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 04 Jan 2013 10:49:40 +0100
- Subject: Re: Fix casinh, casin inaccuracy from cancellation (bug 14994)
- References: <Pine.LNX.4.64.1301040135110.2046@digraph.polyomino.org.uk>
On 01/04/2013 02:39 AM, Joseph S. Myers wrote:
Bug 14994 is inaccuracy of casinh (and so of casin, which is
implemented to call casinh) for large arguments with negative real
part, because of cancellation in the formula clog (z + csqrt (1 +
z*z)) when the square root is close to -z instead of close to z.
This patch fixes this bug by reducing arguments to the first quadrant,
so that the square root is also in the first quadrant and no
cancellation occurs. Reducing arguments to the first quadrant will
also help simplify fixes for other casinh bugs (overflows, underflows
and inaccuracy near the line segment from -i to i - the last of these
is bug 10357).
Tested x86_64 and x86 and ulps updated accordingly.
Thanks, this is fine,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126