about summary refs log tree commit diff
path: root/sysdeps/generic/math_private.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-09-25 19:43:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-09-25 19:43:49 +0000
commitd032e0d29b6ed9d3844916ada0ead19c3190ff9a (patch)
treea0ebd8e356dd8608c8e207d6a509a48b716ca537 /sysdeps/generic/math_private.h
parentc8cb2a522493dc4a2d7f41694b00274eea2f5782 (diff)
downloadglibc-d032e0d29b6ed9d3844916ada0ead19c3190ff9a.tar.gz
glibc-d032e0d29b6ed9d3844916ada0ead19c3190ff9a.tar.xz
glibc-d032e0d29b6ed9d3844916ada0ead19c3190ff9a.zip
Fix inaccuracy of clog, clog10 near |z| = 1 (bug 13629).
Diffstat (limited to 'sysdeps/generic/math_private.h')
-rw-r--r--sysdeps/generic/math_private.h7
1 files changed, 7 insertions, 0 deletions
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; })