Fix casinh, casin inaccuracy from cancellation (bug 14994)
Andreas Jaeger
aj@suse.com
Fri Jan 4 09:49:00 GMT 2013
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
More information about the Libc-alpha
mailing list