summaryrefslogtreecommitdiff
path: root/modules/sqrtl
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-03-14 01:51:10 +0100
committerBruno Haible <bruno@clisp.org>2012-03-14 01:51:26 +0100
commit7fd1d13152633fbfae103abb555d4aec6ec60273 (patch)
tree634dc17ae9b1e249c077d44223159ae4cca5c1d3 /modules/sqrtl
parenta2c6cf038c0758e8825f2b020fbbcce9a0d4983f (diff)
downloadgnulib-7fd1d13152633fbfae103abb555d4aec6ec60273.tar.gz
sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
* lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1. * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro. (gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces too big rounding errors. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL. * modules/math (Makefile.am): Substitute REPLACE_SQRTL. * modules/sqrtl (configure.ac): Consider REPLACE_SQRTL. (Depends-on): Update conditions. * tests/test-sqrtl.c (my_ldexpl): New function. (main): Add test of a particular value. * doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
Diffstat (limited to 'modules/sqrtl')
-rw-r--r--modules/sqrtl12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/sqrtl b/modules/sqrtl
index 9bfa38181e..65a91d7c98 100644
--- a/modules/sqrtl
+++ b/modules/sqrtl
@@ -8,15 +8,15 @@ m4/sqrtl.m4
Depends-on:
math
extensions
-sqrt [test $HAVE_SQRTL = 0]
-float [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-isnanl [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-frexpl [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-ldexpl [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+sqrt [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; }]
+float [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
configure.ac:
gl_FUNC_SQRTL
-if test $HAVE_SQRTL = 0; then
+if test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; then
AC_LIBOBJ([sqrtl])
fi
gl_MATH_MODULE_INDICATOR([sqrtl])