From d032e0d29b6ed9d3844916ada0ead19c3190ff9a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Sep 2012 19:43:49 +0000 Subject: Fix inaccuracy of clog, clog10 near |z| = 1 (bug 13629). --- sysdeps/generic/math_private.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index 5267ec327b..b375bc0c56 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -364,6 +364,13 @@ extern double __slowexp (double __x); extern double __slowpow (double __x, double __y, double __z); extern void __docos (double __x, double __dx, double __v[]); +/* Return X^2 + Y^2 - 1, computed without large cancellation error. + It is given that 1 > X >= Y >= epsilon / 2, and that either X >= + 0.75 or Y >= 0.5. */ +extern float __x2y2m1f (float x, float y); +extern double __x2y2m1 (double x, double y); +extern long double __x2y2m1l (long double x, long double y); + #ifndef math_opt_barrier # define math_opt_barrier(x) \ ({ __typeof (x) __x = (x); __asm ("" : "+m" (__x)); __x; }) -- cgit 1.4.1