Hash :
7fd1d131
Author :
Date :
2012-03-14T01:51:10
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.
Description:
sqrtl() function: square root with long double argument.
Files:
lib/sqrtl.c
m4/sqrtl.m4
Depends-on:
math
extensions
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 || test $REPLACE_SQRTL = 1; then
AC_LIBOBJ([sqrtl])
fi
gl_MATH_MODULE_INDICATOR([sqrtl])
Makefile.am:
Include:
<math.h>
Link:
$(SQRTL_LIBM)
License:
LGPL
Maintainer:
Paolo Bonzini