summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2012-03-21 09:17:16 +0100
committerSimon Josefsson <simon@josefsson.org>2012-03-21 09:18:30 +0100
commita9ab41c4a5207e280dda6c47aa34dff82334f030 (patch)
treef2deaac16e612ffa9082574e109f93d6d4e7361d /gl
parent9567d93c07f87ecb5c8560b7a45125de28710bc1 (diff)
downloadgnutls-a9ab41c4a5207e280dda6c47aa34dff82334f030.tar.gz
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am76
-rw-r--r--gl/fpucw.h3
-rw-r--r--gl/glthread/threadlib.c (renamed from gl/tests/glthread/threadlib.c)0
-rw-r--r--gl/isnanf-nolibm.h7
-rw-r--r--gl/m4/frexpl.m47
-rw-r--r--gl/m4/gnulib-comp.m48
-rw-r--r--gl/m4/ldexpl.m47
-rw-r--r--gl/m4/math_h.m476
-rw-r--r--gl/m4/timer_time.m416
-rw-r--r--gl/math.in.h522
-rw-r--r--gl/tests/Makefile.am18
-rw-r--r--gl/tests/macros.h5
-rw-r--r--gl/tests/randomd.c1028
-rw-r--r--gl/tests/randoml.c1028
-rw-r--r--gl/tests/test-frexp.c174
-rw-r--r--gl/tests/test-frexp.h179
-rw-r--r--gl/tests/test-frexpl.c163
-rw-r--r--gl/tests/test-math.c43
18 files changed, 3004 insertions, 356 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 1d46f424fe..5f2c06469f 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -23,7 +23,7 @@
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp base64 bind byteswap c-ctype close connect error extensions func gendocs getaddrinfo getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto servent setsockopt shutdown snprintf socket sockets socklen stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r timer-time timespec u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
-AUTOMAKE_OPTIONS = 1.5 gnits
+AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
SUBDIRS =
noinst_HEADERS =
@@ -60,6 +60,7 @@ libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
libgnu_la_LDFLAGS += $(LIB_SELECT)
libgnu_la_LDFLAGS += $(LIB_TIMER_TIME)
libgnu_la_LDFLAGS += $(LTLIBINTL)
+libgnu_la_LDFLAGS += $(LTLIBTHREAD)
libgnu_la_LDFLAGS += $(SERVENT_LIB)
## begin gnulib module accept
@@ -717,6 +718,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \
-e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \
-e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \
+ -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \
+ -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \
+ -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \
-e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \
-e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \
-e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \
@@ -728,6 +732,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \
-e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \
-e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \
+ -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \
+ -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \
+ -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \
+ -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \
+ -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \
+ -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \
-e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \
-e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \
-e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \
@@ -742,6 +752,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \
-e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \
-e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \
+ -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \
+ -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \
+ -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \
-e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \
-e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \
-e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \
@@ -751,10 +764,17 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \
-e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \
-e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
+ -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \
-e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \
-e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \
-e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \
-e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \
+ -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \
+ -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \
+ -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \
+ -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \
+ -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \
+ -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \
-e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \
-e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \
-e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \
@@ -788,14 +808,18 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \
-e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
-e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \
+ -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \
+ -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
+ -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
-e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
- -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \
-e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
-e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
-e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
-e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \
-e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \
-e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+ -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \
+ -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \
-e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \
-e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \
-e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \
@@ -804,6 +828,8 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \
-e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \
-e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \
+ -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \
+ -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \
-e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
-e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
-e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
@@ -812,14 +838,15 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
-e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \
-e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \
+ -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \
+ -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \
+ -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \
-e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \
-e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \
-e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \
-e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \
-e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \
- -e 's|@''HAVE_REMAINDERL''@|$(HAVE_REMAINDERL)|g' \
-e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \
- -e 's|@''HAVE_RINTF''@|$(HAVE_RINTF)|g' \
-e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \
-e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \
-e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
@@ -832,10 +859,17 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
-e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
-e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+ -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \
+ -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
-e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
-e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+ -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+ -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \
+ -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \
+ -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \
+ -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \
-e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
-e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
-e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
@@ -843,7 +877,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
-e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
-e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \
+ -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \
+ -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \
+ -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \
-e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \
+ -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \
+ -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \
-e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
-e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
-e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
@@ -854,9 +893,15 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
| \
- sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
+ sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
+ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \
+ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
-e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
-e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \
+ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \
+ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \
+ -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \
-e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \
-e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
-e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
@@ -871,11 +916,23 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
-e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
-e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+ -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \
+ -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \
+ -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \
-e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
-e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
-e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
-e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
-e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+ -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \
+ -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \
+ -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \
+ -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \
+ -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \
+ -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \
+ -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \
+ -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \
+ -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \
-e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \
-e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \
-e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \
@@ -888,6 +945,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
-e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
@@ -2192,6 +2250,14 @@ EXTRA_DIST += sysexits.in.h
## end gnulib module sysexits
+## begin gnulib module threadlib
+
+libgnu_la_SOURCES += glthread/threadlib.c
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module threadlib
+
## begin gnulib module time
BUILT_SOURCES += time.h
diff --git a/gl/fpucw.h b/gl/fpucw.h
index a62c51daba..23e4c81411 100644
--- a/gl/fpucw.h
+++ b/gl/fpucw.h
@@ -30,7 +30,8 @@
On some platforms, such as NetBSD, the default precision is set to
"double precision". This means that 'long double' instructions will operate
- only as 'double', i.e. lead wrong results.
+ only as 'double', i.e. lead to wrong results. Similarly on FreeBSD 6.4, at
+ least for the division of 'long double' numbers.
The FPU control word is under control of the application, i.e. it is
not required to be set either way by the ABI. (In fact, the i386 ABI
diff --git a/gl/tests/glthread/threadlib.c b/gl/glthread/threadlib.c
index 946268e911..946268e911 100644
--- a/gl/tests/glthread/threadlib.c
+++ b/gl/glthread/threadlib.c
diff --git a/gl/isnanf-nolibm.h b/gl/isnanf-nolibm.h
index 52703870a2..9d550e0977 100644
--- a/gl/isnanf-nolibm.h
+++ b/gl/isnanf-nolibm.h
@@ -24,6 +24,13 @@
# elif defined isnan
# undef isnanf
# define isnanf(x) isnan ((float)(x))
+# else
+ /* Get declaration of isnanf(), if not declared in <math.h>. */
+# if defined __sgi
+ /* We can't include <ieeefp.h>, because it conflicts with our definition of
+ isnand. Therefore declare isnanf separately. */
+extern int isnanf (float x);
+# endif
# endif
#else
/* Test whether X is a NaN. */
diff --git a/gl/m4/frexpl.m4 b/gl/m4/frexpl.m4
index 8e71420a30..9df87ab82f 100644
--- a/gl/m4/frexpl.m4
+++ b/gl/m4/frexpl.m4
@@ -1,4 +1,4 @@
-# frexpl.m4 serial 18
+# frexpl.m4 serial 19
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,9 +8,14 @@ AC_DEFUN([gl_FUNC_FREXPL],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
+ dnl Persuade glibc <math.h> to declare frexpl().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
dnl Check whether it's declared.
dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
+
FREXPL_LIBM=
if test $HAVE_DECL_FREXPL = 1; then
gl_CHECK_FREXPL_NO_LIBM
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index db4b7893e8..461d7e5bab 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -38,6 +38,7 @@ AC_DEFUN([gl_EARLY],
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([gl_PROG_AR_RANLIB])
+ AC_REQUIRE([AM_PROG_CC_C_O])
# Code from module accept:
# Code from module accept-tests:
# Code from module alloca:
@@ -807,6 +808,7 @@ AC_PROG_MKDIR_P
gl_HEADER_SYS_UIO
AC_PROG_MKDIR_P
gl_SYSEXITS
+gl_THREADLIB
gl_HEADER_TIME_H
gl_TIME_R
if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
@@ -1004,7 +1006,6 @@ gl_UNISTD_MODULE_INDICATOR([symlink])
gl_SYS_IOCTL_H
AC_PROG_MKDIR_P
AC_CHECK_FUNCS_ONCE([shutdown])
-gl_THREADLIB
gl_FUNC_UNSETENV
if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
AC_LIBOBJ([unsetenv])
@@ -1186,6 +1187,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/gettext.h
lib/gettime.c
lib/gettimeofday.c
+ lib/glthread/threadlib.c
lib/inet_ntop.c
lib/inet_pton.c
lib/intprops.h
@@ -1480,6 +1482,8 @@ AC_DEFUN([gl_FILE_LIST], [
tests/macros.h
tests/minus-zero.h
tests/nan.h
+ tests/randomd.c
+ tests/randoml.c
tests/signature.h
tests/test-accept.c
tests/test-alloca-opt.c
@@ -1506,6 +1510,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-fputc.c
tests/test-fread.c
tests/test-frexp.c
+ tests/test-frexp.h
tests/test-frexpl.c
tests/test-fseek.c
tests/test-fseek.sh
@@ -1649,7 +1654,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/getpagesize.c
tests=lib/glthread/lock.c
tests=lib/glthread/lock.h
- tests=lib/glthread/threadlib.c
tests=lib/ignore-value.h
tests=lib/inttypes.in.h
tests=lib/ioctl.c
diff --git a/gl/m4/ldexpl.m4 b/gl/m4/ldexpl.m4
index 9c9ec6705e..11f20ca2a8 100644
--- a/gl/m4/ldexpl.m4
+++ b/gl/m4/ldexpl.m4
@@ -1,4 +1,4 @@
-# ldexpl.m4 serial 14
+# ldexpl.m4 serial 15
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,9 +9,14 @@ AC_DEFUN([gl_FUNC_LDEXPL],
AC_REQUIRE([gl_MATH_H_DEFAULTS])
AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
AC_REQUIRE([gl_FUNC_ISNANL]) dnl for ISNANL_LIBM
+
+ dnl Persuade glibc <math.h> to declare ldexpl().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
dnl Check whether it's declared.
dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
+
LDEXPL_LIBM=
if test $HAVE_DECL_LDEXPL = 1; then
gl_CHECK_LDEXPL_NO_LIBM
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index 6f9389dc18..ff1654ec7f 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 71
+# math_h.m4 serial 104
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -40,10 +40,13 @@ AC_DEFUN([gl_MATH_H],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <math.h>]],
[acosf acosl asinf asinl atanf atanl
- ceilf ceill copysign copysignf copysignl cosf cosl coshf
- expf expl fabsf fabsl floorf floorl fma fmaf fmal
- fmod fmodf fmodl frexpf frexpl
- ldexpf ldexpl logb logf logl log10f log10l modf modff modfl powf
+ cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
+ expf expl exp2 exp2f exp2l expm1 expm1f expm1l
+ fabsf fabsl floorf floorl fma fmaf fmal
+ fmod fmodf fmodl frexpf frexpl hypotf hypotl
+ ldexpf ldexpl
+ logb log logf logl log10f log10l log1p log1pf log1pl log2 log2f log2l
+ modf modff modfl powf
remainder remainderf remainderl
rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
tanf tanl tanhf trunc truncf truncl])
@@ -67,6 +70,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF])
GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F])
+ GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT])
+ GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF])
+ GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL])
GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL])
GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
@@ -78,6 +84,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF])
GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF])
GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
+ GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2])
+ GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F])
+ GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L])
+ GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1])
+ GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F])
+ GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L])
GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF])
GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL])
GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR])
@@ -92,6 +104,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF])
GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
+ GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT])
+ GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF])
+ GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL])
GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
@@ -101,10 +116,17 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF])
GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB])
+ GNULIB_LOG=0; AC_SUBST([GNULIB_LOG])
GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF])
GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F])
GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L])
+ GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P])
+ GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF])
+ GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL])
+ GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2])
+ GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F])
+ GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L])
GNULIB_MODF=0; AC_SUBST([GNULIB_MODF])
GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF])
GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL])
@@ -138,14 +160,18 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_ATANF=1; AC_SUBST([HAVE_ATANF])
HAVE_ATANL=1; AC_SUBST([HAVE_ATANL])
HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F])
+ HAVE_CBRT=1; AC_SUBST([HAVE_CBRT])
+ HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF])
+ HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL])
HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN])
- HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF])
HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL])
HAVE_COSF=1; AC_SUBST([HAVE_COSF])
HAVE_COSL=1; AC_SUBST([HAVE_COSL])
HAVE_COSHF=1; AC_SUBST([HAVE_COSHF])
HAVE_EXPF=1; AC_SUBST([HAVE_EXPF])
HAVE_EXPL=1; AC_SUBST([HAVE_EXPL])
+ HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1])
+ HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F])
HAVE_FABSF=1; AC_SUBST([HAVE_FABSF])
HAVE_FABSL=1; AC_SUBST([HAVE_FABSL])
HAVE_FMA=1; AC_SUBST([HAVE_FMA])
@@ -154,6 +180,8 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_FMODF=1; AC_SUBST([HAVE_FMODF])
HAVE_FMODL=1; AC_SUBST([HAVE_FMODL])
HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF])
+ HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF])
+ HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL])
HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF])
HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND])
HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL])
@@ -162,14 +190,15 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_LOGL=1; AC_SUBST([HAVE_LOGL])
HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F])
HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L])
+ HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P])
+ HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF])
+ HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL])
HAVE_MODFF=1; AC_SUBST([HAVE_MODFF])
HAVE_MODFL=1; AC_SUBST([HAVE_MODFL])
HAVE_POWF=1; AC_SUBST([HAVE_POWF])
HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER])
HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF])
- HAVE_REMAINDERL=1; AC_SUBST([HAVE_REMAINDERL])
HAVE_RINT=1; AC_SUBST([HAVE_RINT])
- HAVE_RINTF=1; AC_SUBST([HAVE_RINTF])
HAVE_RINTL=1; AC_SUBST([HAVE_RINTL])
HAVE_SINF=1; AC_SUBST([HAVE_SINF])
HAVE_SINL=1; AC_SUBST([HAVE_SINL])
@@ -182,10 +211,17 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
+ HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF])
+ HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL])
HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
+ HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
+ HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2])
+ HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F])
+ HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L])
+ HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L])
HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL])
HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
@@ -193,7 +229,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB])
HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L])
+ HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2])
+ HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F])
+ HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L])
HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER])
+ HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL])
+ HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF])
HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND])
HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF])
HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL])
@@ -203,9 +244,15 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL])
+ REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF])
+ REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL])
REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL])
REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
+ REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1])
+ REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F])
+ REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2])
+ REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L])
REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL])
REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR])
REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
@@ -220,10 +267,22 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
+ REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT])
+ REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF])
+ REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL])
REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
+ REPLACE_LOG=0; AC_SUBST([REPLACE_LOG])
+ REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF])
+ REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL])
+ REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P])
+ REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF])
+ REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL])
+ REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2])
+ REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F])
+ REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L])
REPLACE_MODF=0; AC_SUBST([REPLACE_MODF])
REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF])
REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL])
@@ -236,6 +295,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL])
REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT])
REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+ REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL])
REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
diff --git a/gl/m4/timer_time.m4 b/gl/m4/timer_time.m4
index 6276759339..d6e0efeb61 100644
--- a/gl/m4/timer_time.m4
+++ b/gl/m4/timer_time.m4
@@ -11,6 +11,7 @@ AC_DEFUN([gl_TIMER_TIME],
dnl Based on clock_time.m4. See details there.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_THREADLIB])
LIB_TIMER_TIME=
AC_SUBST([LIB_TIMER_TIME])
@@ -18,6 +19,21 @@ AC_DEFUN([gl_TIMER_TIME],
AC_SEARCH_LIBS([timer_settime], [rt posix4],
[test "$ac_cv_search_timer_settime" = "none required" ||
LIB_TIMER_TIME=$ac_cv_search_timer_settime])
+ dnl GLIBC uses threads to emulate posix timers when kernel support
+ dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
+ dnl Now the pthread lib is linked automatically in the normal case,
+ dnl but when linking statically, it needs to be explicitly specified.
+ AC_EGREP_CPP([Thread],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
+ Thread emulation available
+ #endif
+#endif
+ ],
+ [LIB_TIMER_TIME="$LIBMULTITHREAD $LIB_TIMER_TIME"])
AC_CHECK_FUNCS([timer_settime])
LIBS=$gl_saved_libs
])
diff --git a/gl/math.in.h b/gl/math.in.h
index ce527102d9..4b2ce87ac2 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -141,10 +141,43 @@ _NaN ()
/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
than a floating point constant. */
#if @REPLACE_HUGE_VAL@
+# undef HUGE_VALF
+# define HUGE_VALF (1.0f / 0.0f)
# undef HUGE_VAL
# define HUGE_VAL (1.0 / 0.0)
+# undef HUGE_VALL
+# define HUGE_VALL (1.0L / 0.0L)
#endif
+/* HUGE_VALF is a 'float' Infinity. */
+#ifndef HUGE_VALF
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
+# define HUGE_VALF (1e25f * 1e25f)
+# else
+# define HUGE_VALF (1.0f / 0.0f)
+# endif
+#endif
+
+/* HUGE_VAL is a 'double' Infinity. */
+#ifndef HUGE_VAL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
+# define HUGE_VAL (1e250 * 1e250)
+# else
+# define HUGE_VAL (1.0 / 0.0)
+# endif
+#endif
+
+/* HUGE_VALL is a 'long double' Infinity. */
+#ifndef HUGE_VALL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
+# define HUGE_VALL (1e250L * 1e250L)
+# else
+# define HUGE_VALL (1.0L / 0.0L)
+# endif
+#endif
#if @GNULIB_ACOSF@
# if !@HAVE_ACOSF@
@@ -172,7 +205,7 @@ _GL_CXXALIASWARN (acosl);
# undef acosl
# if HAVE_RAW_DECL_ACOSL
_GL_WARN_ON_USE (acosl, "acosl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module acosl for portability");
# endif
#endif
@@ -203,7 +236,7 @@ _GL_CXXALIASWARN (asinl);
# undef asinl
# if HAVE_RAW_DECL_ASINL
_GL_WARN_ON_USE (asinl, "asinl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module asinl for portability");
# endif
#endif
@@ -234,7 +267,7 @@ _GL_CXXALIASWARN (atanl);
# undef atanl
# if HAVE_RAW_DECL_ATANL
_GL_WARN_ON_USE (atanl, "atanl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module atanl for portability");
# endif
#endif
@@ -255,6 +288,67 @@ _GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
#endif
+#if @GNULIB_CBRTF@
+# if @REPLACE_CBRTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cbrtf
+# define cbrtf rpl_cbrtf
+# endif
+_GL_FUNCDECL_RPL (cbrtf, float, (float x));
+_GL_CXXALIAS_RPL (cbrtf, float, (float x));
+# else
+# if !@HAVE_DECL_CBRTF@
+_GL_FUNCDECL_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIASWARN (cbrtf);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtf
+# if HAVE_RAW_DECL_CBRTF
+_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
+ "use gnulib module cbrtf for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRT@
+# if !@HAVE_CBRT@
+_GL_FUNCDECL_SYS (cbrt, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (cbrt, double, (double x));
+_GL_CXXALIASWARN (cbrt);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrt
+# if HAVE_RAW_DECL_CBRT
+_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
+ "use gnulib module cbrt for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRTL@
+# if @REPLACE_CBRTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cbrtl
+# define cbrtl rpl_cbrtl
+# endif
+_GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
+# else
+# if !@HAVE_DECL_CBRTL@
+_GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (cbrtl);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtl
+# if HAVE_RAW_DECL_CBRTL
+_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
+ "use gnulib module cbrtl for portability");
+# endif
+#endif
+
+
#if @GNULIB_CEILF@
# if @REPLACE_CEILF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -318,7 +412,7 @@ _GL_WARN_ON_USE (ceill, "ceill is unportable - "
#if @GNULIB_COPYSIGNF@
-# if !@HAVE_COPYSIGNF@
+# if !@HAVE_DECL_COPYSIGNF@
_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
# endif
_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
@@ -386,7 +480,7 @@ _GL_CXXALIASWARN (cosl);
# undef cosl
# if HAVE_RAW_DECL_COSL
_GL_WARN_ON_USE (cosl, "cosl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module cosl for portability");
# endif
#endif
@@ -433,7 +527,131 @@ _GL_CXXALIASWARN (expl);
# undef expl
# if HAVE_RAW_DECL_EXPL
_GL_WARN_ON_USE (expl, "expl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module expl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXP2F@
+# if !@HAVE_DECL_EXP2F@
+_GL_FUNCDECL_SYS (exp2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (exp2f, float, (float x));
+_GL_CXXALIASWARN (exp2f);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2f
+# if HAVE_RAW_DECL_EXP2F
+_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
+ "use gnulib module exp2f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2@
+# if @REPLACE_EXP2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef exp2
+# define exp2 rpl_exp2
+# endif
+_GL_FUNCDECL_RPL (exp2, double, (double x));
+_GL_CXXALIAS_RPL (exp2, double, (double x));
+# else
+# if !@HAVE_DECL_EXP2@
+_GL_FUNCDECL_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIASWARN (exp2);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2
+# if HAVE_RAW_DECL_EXP2
+_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
+ "use gnulib module exp2 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2L@
+# if @REPLACE_EXP2L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef exp2l
+# define exp2l rpl_exp2l
+# endif
+_GL_FUNCDECL_RPL (exp2l, long double, (long double x));
+_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
+# else
+# if !@HAVE_DECL_EXP2L@
+# undef exp2l
+_GL_FUNCDECL_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (exp2l);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2l
+# if HAVE_RAW_DECL_EXP2L
+_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
+ "use gnulib module exp2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPM1F@
+# if @REPLACE_EXPM1F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1f
+# define expm1f rpl_expm1f
+# endif
+_GL_FUNCDECL_RPL (expm1f, float, (float x));
+_GL_CXXALIAS_RPL (expm1f, float, (float x));
+# else
+# if !@HAVE_EXPM1F@
+_GL_FUNCDECL_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIASWARN (expm1f);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1f
+# if HAVE_RAW_DECL_EXPM1F
+_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
+ "use gnulib module expm1f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1@
+# if @REPLACE_EXPM1@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1
+# define expm1 rpl_expm1
+# endif
+_GL_FUNCDECL_RPL (expm1, double, (double x));
+_GL_CXXALIAS_RPL (expm1, double, (double x));
+# else
+# if !@HAVE_EXPM1@
+_GL_FUNCDECL_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIASWARN (expm1);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1
+# if HAVE_RAW_DECL_EXPM1
+_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
+ "use gnulib module expm1 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1L@
+# if !@HAVE_DECL_EXPM1L@
+# undef expm1l
+_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
+_GL_CXXALIASWARN (expm1l);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1l
+# if HAVE_RAW_DECL_EXPM1L
+_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
+ "use gnulib module expm1l for portability");
# endif
#endif
@@ -598,6 +816,7 @@ _GL_CXXALIAS_RPL (fmal, long double,
(long double x, long double y, long double z));
# else
# if !@HAVE_FMAL@
+# undef fmal
_GL_FUNCDECL_SYS (fmal, long double,
(long double x, long double y, long double z));
# endif
@@ -775,6 +994,76 @@ _GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
#endif
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOTF@
+# if @REPLACE_HYPOTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypotf
+# define hypotf rpl_hypotf
+# endif
+_GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
+_GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
+# else
+# if !@HAVE_HYPOTF@
+_GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (hypotf);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotf
+# if HAVE_RAW_DECL_HYPOTF
+_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
+ "use gnulib module hypotf for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOT@
+# if @REPLACE_HYPOT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypot
+# define hypot rpl_hypot
+# endif
+_GL_FUNCDECL_RPL (hypot, double, (double x, double y));
+_GL_CXXALIAS_RPL (hypot, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (hypot);
+#elif defined GNULIB_POSIXCHECK
+# undef hypot
+# if HAVE_RAW_DECL_HYPOT
+_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
+ "use gnulib module hypot for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOTL@
+# if @REPLACE_HYPOTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypotl
+# define hypotl rpl_hypotl
+# endif
+_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
+# else
+# if !@HAVE_HYPOTL@
+_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (hypotl);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotl
+# if HAVE_RAW_DECL_HYPOTL
+_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
+ "use gnulib module hypotl for portability");
+# endif
+#endif
+
+
/* Return x * 2^exp. */
#if @GNULIB_LDEXPF@
# if !@HAVE_LDEXPF@
@@ -833,11 +1122,20 @@ _GL_WARN_ON_USE (logb, "logb is unportable - "
#if @GNULIB_LOGF@
-# if !@HAVE_LOGF@
-# undef logf
+# if @REPLACE_LOGF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logf
+# define logf rpl_logf
+# endif
+_GL_FUNCDECL_RPL (logf, float, (float x));
+_GL_CXXALIAS_RPL (logf, float, (float x));
+# else
+# if !@HAVE_LOGF@
+# undef logf
_GL_FUNCDECL_SYS (logf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (logf, float, (float x));
+# endif
_GL_CXXALIASWARN (logf);
#elif defined GNULIB_POSIXCHECK
# undef logf
@@ -847,18 +1145,47 @@ _GL_WARN_ON_USE (logf, "logf is unportable - "
# endif
#endif
+#if @GNULIB_LOG@
+# if @REPLACE_LOG@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log
+# define log rpl_log
+# endif
+_GL_FUNCDECL_RPL (log, double, (double x));
+_GL_CXXALIAS_RPL (log, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log, double, (double x));
+# endif
+_GL_CXXALIASWARN (log);
+#elif defined GNULIB_POSIXCHECK
+# undef log
+# if HAVE_RAW_DECL_LOG
+_GL_WARN_ON_USE (log, "log has portability problems - "
+ "use gnulib module log for portability");
+# endif
+#endif
+
#if @GNULIB_LOGL@
-# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
-# undef logl
+# if @REPLACE_LOGL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logl
+# define logl rpl_logl
+# endif
+_GL_FUNCDECL_RPL (logl, long double, (long double x));
+_GL_CXXALIAS_RPL (logl, long double, (long double x));
+# else
+# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+# undef logl
_GL_FUNCDECL_SYS (logl, long double, (long double x));
-# endif
+# endif
_GL_CXXALIAS_SYS (logl, long double, (long double x));
+# endif
_GL_CXXALIASWARN (logl);
#elif defined GNULIB_POSIXCHECK
# undef logl
# if HAVE_RAW_DECL_LOGL
_GL_WARN_ON_USE (logl, "logl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module logl for portability");
# endif
#endif
@@ -894,6 +1221,148 @@ _GL_WARN_ON_USE (log10l, "log10l is unportable - "
#endif
+#if @GNULIB_LOG1PF@
+# if @REPLACE_LOG1PF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1pf
+# define log1pf rpl_log1pf
+# endif
+_GL_FUNCDECL_RPL (log1pf, float, (float x));
+_GL_CXXALIAS_RPL (log1pf, float, (float x));
+# else
+# if !@HAVE_LOG1PF@
+_GL_FUNCDECL_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIASWARN (log1pf);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pf
+# if HAVE_RAW_DECL_LOG1PF
+_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
+ "use gnulib module log1pf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1P@
+# if @REPLACE_LOG1P@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1p
+# define log1p rpl_log1p
+# endif
+_GL_FUNCDECL_RPL (log1p, double, (double x));
+_GL_CXXALIAS_RPL (log1p, double, (double x));
+# else
+# if !@HAVE_LOG1P@
+_GL_FUNCDECL_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIASWARN (log1p);
+#elif defined GNULIB_POSIXCHECK
+# undef log1p
+# if HAVE_RAW_DECL_LOG1P
+_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
+ "use gnulib module log1p for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1PL@
+# if @REPLACE_LOG1PL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1pl
+# define log1pl rpl_log1pl
+# endif
+_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
+_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
+# else
+# if !@HAVE_LOG1PL@
+_GL_FUNCDECL_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log1pl);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pl
+# if HAVE_RAW_DECL_LOG1PL
+_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
+ "use gnulib module log1pl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG2F@
+# if @REPLACE_LOG2F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2f
+# define log2f rpl_log2f
+# endif
+_GL_FUNCDECL_RPL (log2f, float, (float x));
+_GL_CXXALIAS_RPL (log2f, float, (float x));
+# else
+# if !@HAVE_DECL_LOG2F@
+# undef log2f
+_GL_FUNCDECL_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIASWARN (log2f);
+#elif defined GNULIB_POSIXCHECK
+# undef log2f
+# if HAVE_RAW_DECL_LOG2F
+_GL_WARN_ON_USE (log2f, "log2f is unportable - "
+ "use gnulib module log2f for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2@
+# if @REPLACE_LOG2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2
+# define log2 rpl_log2
+# endif
+_GL_FUNCDECL_RPL (log2, double, (double x));
+_GL_CXXALIAS_RPL (log2, double, (double x));
+# else
+# if !@HAVE_DECL_LOG2@
+# undef log2
+_GL_FUNCDECL_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIASWARN (log2);
+#elif defined GNULIB_POSIXCHECK
+# undef log2
+# if HAVE_RAW_DECL_LOG2
+_GL_WARN_ON_USE (log2, "log2 is unportable - "
+ "use gnulib module log2 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2L@
+# if @REPLACE_LOG2L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2l
+# define log2l rpl_log2l
+# endif
+_GL_FUNCDECL_RPL (log2l, long double, (long double x));
+_GL_CXXALIAS_RPL (log2l, long double, (long double x));
+# else
+# if !@HAVE_DECL_LOG2L@
+_GL_FUNCDECL_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log2l);
+#elif defined GNULIB_POSIXCHECK
+# undef log2l
+# if HAVE_RAW_DECL_LOG2L
+_GL_WARN_ON_USE (log2l, "log2l is unportable - "
+ "use gnulib module log2l for portability");
+# endif
+#endif
+
+
#if @GNULIB_MODFF@
# if @REPLACE_MODFF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1036,7 +1505,8 @@ _GL_WARN_ON_USE (remainder, "remainder is unportable - "
_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
# else
-# if !@HAVE_REMAINDERL@
+# if !@HAVE_DECL_REMAINDERL@
+# undef remainderl
_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
# endif
_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
@@ -1052,7 +1522,7 @@ _GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
#if @GNULIB_RINTF@
-# if !@HAVE_RINTF@
+# if !@HAVE_DECL_RINTF@
_GL_FUNCDECL_SYS (rintf, float, (float x));
# endif
_GL_CXXALIAS_SYS (rintf, float, (float x));
@@ -1150,6 +1620,7 @@ _GL_FUNCDECL_RPL (roundl, long double, (long double x));
_GL_CXXALIAS_RPL (roundl, long double, (long double x));
# else
# if !@HAVE_DECL_ROUNDL@
+# undef roundl
_GL_FUNCDECL_SYS (roundl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (roundl, long double, (long double x));
@@ -1190,7 +1661,7 @@ _GL_CXXALIASWARN (sinl);
# undef sinl
# if HAVE_RAW_DECL_SINL
_GL_WARN_ON_USE (sinl, "sinl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module sinl for portability");
# endif
#endif
@@ -1227,17 +1698,26 @@ _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
#endif
#if @GNULIB_SQRTL@
-# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
-# undef sqrtl
+# if @REPLACE_SQRTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sqrtl
+# define sqrtl rpl_sqrtl
+# endif
+_GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
+# else
+# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+# undef sqrtl
_GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
-# endif
+# endif
_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
+# endif
_GL_CXXALIASWARN (sqrtl);
#elif defined GNULIB_POSIXCHECK
# undef sqrtl
# if HAVE_RAW_DECL_SQRTL
_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module sqrtl for portability");
# endif
#endif
@@ -1268,7 +1748,7 @@ _GL_CXXALIASWARN (tanl);
# undef tanl
# if HAVE_RAW_DECL_TANL
_GL_WARN_ON_USE (tanl, "tanl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module tanl for portability");
# endif
#endif
diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am
index c3c8f3cdaf..f73d26b408 100644
--- a/gl/tests/Makefile.am
+++ b/gl/tests/Makefile.am
@@ -298,8 +298,8 @@ EXTRA_DIST += test-fread.c signature.h macros.h
TESTS += test-frexp-nolibm
check_PROGRAMS += test-frexp-nolibm
-test_frexp_nolibm_SOURCES = test-frexp.c
-EXTRA_DIST += test-frexp.c minus-zero.h infinity.h nan.h signature.h macros.h
+test_frexp_nolibm_SOURCES = test-frexp.c randomd.c
+EXTRA_DIST += test-frexp.c test-frexp.h minus-zero.h infinity.h nan.h signature.h macros.h randomd.c
## end gnulib module frexp-nolibm-tests
@@ -307,8 +307,8 @@ EXTRA_DIST += test-frexp.c minus-zero.h infinity.h nan.h signature.h macros.h
TESTS += test-frexpl-nolibm
check_PROGRAMS += test-frexpl-nolibm
-test_frexpl_nolibm_SOURCES = test-frexpl.c
-EXTRA_DIST += test-frexpl.c minus-zero.h infinity.h nan.h signature.h macros.h
+test_frexpl_nolibm_SOURCES = test-frexpl.c randoml.c
+EXTRA_DIST += test-frexpl.c test-frexp.h minus-zero.h infinity.h nan.h signature.h macros.h randoml.c
## end gnulib module frexpl-nolibm-tests
@@ -675,7 +675,7 @@ EXTRA_DIST += test-malloca.c
TESTS += test-math
check_PROGRAMS += test-math
-EXTRA_DIST += test-math.c
+EXTRA_DIST += test-math.c macros.h
## end gnulib module math-tests
@@ -1276,14 +1276,6 @@ EXTRA_DIST += test-init.sh
## end gnulib module test-framework-sh-tests
-## begin gnulib module threadlib
-
-libtests_a_SOURCES += glthread/threadlib.c
-
-EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
-
-## end gnulib module threadlib
-
## begin gnulib module time-tests
TESTS += test-time
diff --git a/gl/tests/macros.h b/gl/tests/macros.h
index 77a92f8db8..478004c1d2 100644
--- a/gl/tests/macros.h
+++ b/gl/tests/macros.h
@@ -66,3 +66,8 @@
/* STREQ (str1, str2)
Return true if two strings compare equal. */
#define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Some numbers in the interval [0,1). */
+extern const float randomf[1000];
+extern const double randomd[1000];
+extern const long double randoml[1000];
diff --git a/gl/tests/randomd.c b/gl/tests/randomd.c
new file mode 100644
index 0000000000..0bef8b6fa0
--- /dev/null
+++ b/gl/tests/randomd.c
@@ -0,0 +1,1028 @@
+/* Some random 'double' numbers used by gnulib tests.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1). */
+
+const double randomd[1000] =
+{
+ /* Some not so random numbers at the beginning. */
+ 0.0,
+ /* Then some numbers generated by GNU clisp. */
+ 0.89255299921822260894833866359,
+ 0.56160033401164667976788987953,
+ 0.51743003502243816003616725706,
+ 0.78419011286685927826225711525,
+ 0.64400370685467819470063888148,
+ 0.38151255107934048933308886009,
+ 0.279822118770531878839000163945,
+ 0.51983544681375980919751125922,
+ 0.314601557551148376372971500376,
+ 0.44551938964685651088492647794,
+ 0.44235192503793823441729544512,
+ 0.0040120762636767874958681841509,
+ 0.57608572759464216512285032474,
+ 0.69151953350396585566714564265,
+ 0.65634190642598148152780718322,
+ 0.68520459394253807590733184567,
+ 0.60728078832107635628786818115,
+ 0.376679934380311318950949959986,
+ 0.48893422455419005003224231708,
+ 0.59664228319132670346209747371,
+ 0.70162191594290728927555900075,
+ 0.70981089000005327192380201706,
+ 0.480574069305863387682360414433,
+ 0.369264627455974856929910550376,
+ 0.42224495444170593700839286742,
+ 0.96974027194201320964041066537,
+ 0.69950081092902694549973698004,
+ 0.366921803754944985368022837045,
+ 0.19460757354611588216534077527,
+ 0.046437559879825520495822908204,
+ 0.57694149138457596563075731094,
+ 0.49632733844850578203860859535,
+ 0.80735347459453553970910033766,
+ 0.210271595033975357161360058967,
+ 0.176539870249396534142059724214,
+ 0.75320267419158828905982021879,
+ 0.09535042912249636739069790414,
+ 0.41433965906065337672703334968,
+ 0.62189345390648146852641556292,
+ 0.322595610794052908153116342595,
+ 0.173860860827838938281708881865,
+ 0.55258425878412963601205794028,
+ 0.066559056629606284504735241978,
+ 0.0193835990781649263368095562556,
+ 0.127101629778251450428653553143,
+ 0.9603475517586241593077319367,
+ 0.68429794014738591042302507235,
+ 0.0139808909843634026741151214975,
+ 0.0036035679428138856395527711611,
+ 0.072656401341518399752950821809,
+ 0.229562863635014486626281702425,
+ 0.88337277579960676546469424767,
+ 0.88850212167800818244030104263,
+ 0.208063225990716089095767541316,
+ 0.268304917462565269805874454916,
+ 0.3195427196271617997151392088,
+ 0.59101407246003811289573881403,
+ 0.972093867752368095080492689,
+ 0.409246208960242309650511849637,
+ 0.84250639316418167849010246997,
+ 0.063842712141624332977179722113,
+ 0.96470327141354888687046060373,
+ 0.43109879978424216966175314888,
+ 0.14551248610248934836482236208,
+ 0.84819094513299136408788493212,
+ 0.41166757935215520377191731704,
+ 0.96020915727830366672170130175,
+ 0.55313106883839046701902022583,
+ 0.9796595451013758579218900134,
+ 0.74222694300533435700276764516,
+ 0.117294243075539310976051880564,
+ 0.32216824750097146958151447387,
+ 0.59090211400137031908131441,
+ 0.116841680533127258304897076543,
+ 0.83595865401141052310417569507,
+ 0.249488155772987988074361149176,
+ 0.67896015287499211280971531326,
+ 0.72256498621401843299673078876,
+ 0.327315362968271601258667297595,
+ 0.37438214921868498405279953481,
+ 0.76929694812658272272027330778,
+ 0.44282297788821568912463681727,
+ 0.59517407740270913902014268964,
+ 0.346217547960702024419571713567,
+ 0.68339868731911838904373225224,
+ 0.057507087039986776837238366719,
+ 0.1189343986186977384509521024,
+ 0.65646666532916174831489781194,
+ 0.80925124288745606089697795707,
+ 0.61302937875769552609444313984,
+ 0.64367434863387777107222872563,
+ 0.059228300879437554416166010005,
+ 0.76899237494115809397158171526,
+ 0.335797991302131791511629123206,
+ 0.72923178692628392090326699514,
+ 0.79300056654108221012876564405,
+ 0.58866760551158502690719665335,
+ 0.65249222174748700395779659047,
+ 0.79573528799715877963614353006,
+ 0.101363067664632247385474166088,
+ 0.392494669960902131436398643207,
+ 0.37323453200630776302168616197,
+ 0.29857554596542776498065634631,
+ 0.9796202149626312305197715787,
+ 0.58770219934833805722677794788,
+ 0.126574575737099431915356308504,
+ 0.51086682994362911961448609847,
+ 0.26221303911946316754295166201,
+ 0.87331402410090670707406246035,
+ 0.08604799064198292716037672196,
+ 0.77880380648915901962140523059,
+ 0.34131646312914811415381942246,
+ 0.422787222735822749759714960156,
+ 0.16550478231620269333824890372,
+ 0.84087065799129220871741135711,
+ 0.96561976597443996963329538915,
+ 0.059890627133354026356081805998,
+ 0.09359839900604706997291172522,
+ 0.61463026659668017286248279853,
+ 0.220582135665522265733252389516,
+ 0.30146695094150797543070759948,
+ 0.406591688270652513808216198946,
+ 0.206959751707199812083987569348,
+ 0.71382992952779021033600406503,
+ 0.98971690700151825984363090029,
+ 0.86339958328134745391858859595,
+ 0.70037828363249257457230217791,
+ 0.97380974339470107231135690474,
+ 0.9184635965630883290893011311,
+ 0.418605216026507942885819265225,
+ 0.61793227858714759711625818653,
+ 0.67394880797682685081908511723,
+ 0.98871101941805039780826467279,
+ 0.65973593853137069988371349845,
+ 0.93348525072186907424189028727,
+ 0.59164378220465485142298641014,
+ 0.95303768733773138214124075961,
+ 0.88667310242538944858141870801,
+ 0.83785319781204861623008709825,
+ 0.54026788227426708201242457367,
+ 0.74842599257855801522259951132,
+ 0.286624102305531463268442510375,
+ 0.41180484980938874161376712508,
+ 0.22754664620316922947541651384,
+ 0.62360609793949755240041318939,
+ 0.3311618194042077047850111557,
+ 0.315407885695867020730009836503,
+ 0.215221706711430951961780213436,
+ 0.168600630933631406101821024413,
+ 0.62661489373200405241464923618,
+ 0.95357070304277219756741072036,
+ 0.5186418766697788447635039428,
+ 0.70772930521061953327927296944,
+ 0.410376884797056150221504703145,
+ 0.39705302343406249619577860633,
+ 0.79215885822696034431481699125,
+ 0.157831717946112504384603002152,
+ 0.26892306298536012837855426922,
+ 0.15697088614321016223211167568,
+ 0.41395315712905823355235182393,
+ 0.043977876945327860015049914653,
+ 0.91453495544799358550673657283,
+ 0.46230093259088633973148827911,
+ 0.79479146768024434444120965094,
+ 0.1466704986407674407377422815,
+ 0.093614591443204076599999803382,
+ 0.66061870961706149406527099303,
+ 0.087462146328394574476138187113,
+ 0.79683664444310818297700615557,
+ 0.39732728185755441060070738751,
+ 0.141934473990413594291362391075,
+ 0.63111751995951919258061547632,
+ 0.78521985432793823024330967029,
+ 0.53307346282606806792796696141,
+ 0.61679109370763781010143645189,
+ 0.40696293619387120891515025426,
+ 0.68670343879278712242412028794,
+ 0.0115112936831136012901340526452,
+ 0.70866056737692430987650236649,
+ 0.75378980574358943122474800795,
+ 0.17133202766710894969283150847,
+ 0.36771201738922655520549864974,
+ 0.64614182581953931840374311331,
+ 0.354495602088990708111406368474,
+ 0.96418771817934443444348833491,
+ 0.51633426669933834634574104246,
+ 0.064671329812306055349433587193,
+ 0.084335079914541732137341401384,
+ 0.98578018340150609333535890283,
+ 0.32988119060114570391488875477,
+ 0.70568290443337103364762141207,
+ 0.7501960060851696034137148851,
+ 0.141312840936106004164373056114,
+ 0.60721022154106372815080238296,
+ 0.49179275887283771965744826261,
+ 0.85530668893284708999269819019,
+ 0.09730053915339358769067661488,
+ 0.48817911888023094845428570434,
+ 0.37116312252354470380676793579,
+ 0.61870369881699387959990992873,
+ 0.381874188039839457469043174076,
+ 0.68193837613090719561872304949,
+ 0.4773618313988618747215621251,
+ 0.152383599292709764750406667286,
+ 0.54317522808228983459963725598,
+ 0.363848788591302782268887022354,
+ 0.0105589810271147011378412305973,
+ 0.55582445068669939957392951111,
+ 0.99910376130213936748996659383,
+ 0.90286867348280161480903197439,
+ 0.48268382934936288156485037692,
+ 0.0976084557356802030533675394,
+ 0.29004949962481398455881920169,
+ 0.99169758897256717005011514856,
+ 0.20722895154834288274430061308,
+ 0.50294863638464584121275744208,
+ 0.71094033855350495714847377558,
+ 0.94078709219520224551350834268,
+ 0.48088262771516317628650315489,
+ 0.80538698628980761175811796611,
+ 0.83495029615293903361580945571,
+ 0.67996381940825251937974905761,
+ 0.57936805772275234468590364926,
+ 0.41778137764942046281708286844,
+ 0.161602687591454506771276482303,
+ 0.093910625156097743113739432334,
+ 0.45716763620641108625606409874,
+ 0.96455075374827233820027584808,
+ 0.5179966880512917274934448216,
+ 0.046797382046060065926143985952,
+ 0.83673567319931334127111064225,
+ 0.44224504444533247245974476514,
+ 0.73281179385894336737033582786,
+ 0.5642490153724193432309549673,
+ 0.83700200507325250303481208805,
+ 0.152714941779871552944298597052,
+ 0.38606607994977770238226473985,
+ 0.0155140917516105439042442246577,
+ 0.51621537013393688713546096688,
+ 0.311969390991657895966526156064,
+ 0.83890647777450698803932943984,
+ 0.54370750820133482930695388638,
+ 0.98636765788772465929756760473,
+ 0.77334255661128878905675504339,
+ 0.57070354296508751519811368688,
+ 0.8365252076669013372866223481,
+ 0.344601601940890721182485798794,
+ 0.92658930620470543221158939208,
+ 0.72724523363899270076210273102,
+ 0.413672082025645586061788451734,
+ 0.5132836422023222169840403333,
+ 0.82135610583961360173883281975,
+ 0.423835065039748889417547786563,
+ 0.87083598844595488941471761572,
+ 0.59009392451459866513886634656,
+ 0.206124826643305920436961792363,
+ 0.288685540685143988030522421633,
+ 0.7944357933456167153993184889,
+ 0.090945230657758780394996530608,
+ 0.52981750421369669363095418817,
+ 0.091368944984485824360107751981,
+ 0.81824925769562351657564377069,
+ 0.083315412912658535228751011063,
+ 0.59602276778799576464600065047,
+ 0.52258035262146456789454411102,
+ 0.394692074165738897132014378974,
+ 0.92031214264405188928824363967,
+ 0.32812665356161216265971156268,
+ 0.79754299890007289545033977389,
+ 0.3029021512227565310021437326,
+ 0.81425785760698537744367921928,
+ 0.85199399843570233736733560413,
+ 0.096629890212080240754541391968,
+ 0.60643798959967098211181910285,
+ 0.75368518979236587723780129098,
+ 0.451368813651510369666120626045,
+ 0.86189868235067352904955566961,
+ 0.239506411296874624231401913963,
+ 0.143392266376287906568670938457,
+ 0.035585084401323981008798496622,
+ 0.89407531932950775763701297226,
+ 0.56699767164913732414312190205,
+ 0.6107715946195223295493238966,
+ 0.980870588312723808697191463,
+ 0.37603666613089681502774907483,
+ 0.19565477083291620146833762404,
+ 0.70326913680165706368122461762,
+ 0.98247770640436619202690080984,
+ 0.54911931698472764719220618506,
+ 0.96749331150477343995263612791,
+ 0.9349501605275792139661332597,
+ 0.067704019779021886031495084945,
+ 0.52883185005352261786874768842,
+ 0.03879817199556086106868125058,
+ 0.011268895714104342862021635882,
+ 0.86781395233112768504418642287,
+ 0.73610697666830606371057497872,
+ 0.22595829849389174304359852447,
+ 0.95990840938724981323147621815,
+ 0.5938079875208820675776232526,
+ 0.78655922365792476391655372464,
+ 0.51099073264725007373467108776,
+ 0.66474884887866769539664215292,
+ 0.88640025828226102852258218854,
+ 0.39889893489572927635368967129,
+ 0.76340426725003756852384366924,
+ 0.485534753598641026618647825146,
+ 0.55957578573824837450384728978,
+ 0.50840543283094885180866842941,
+ 0.0102415845792896532313226969615,
+ 0.74666891036262398733922051708,
+ 0.49044748088989431070743849791,
+ 0.184017043174756439606592004597,
+ 0.0225210121470402648790231578307,
+ 0.096909683465740960387467976065,
+ 0.0521874432095560437920256545446,
+ 0.108114343037383115951564617563,
+ 0.77430486784405922952977031491,
+ 0.73286432949907824441702845144,
+ 0.083559249182272369453587951223,
+ 0.074541345541671560054508020717,
+ 0.55130541064331728019681677403,
+ 0.101450912226971008587146654246,
+ 0.74564503962660370005995595861,
+ 0.55903832180264925580029280922,
+ 0.86098138284846671753408133719,
+ 0.76146956314354797691373262733,
+ 0.5569854467166466965564479865,
+ 0.61138555623626762560168304163,
+ 0.93778268377974305185411499629,
+ 0.106728342608615813606903105742,
+ 0.51139895550624845300079248199,
+ 0.8826404150665399364200384063,
+ 0.79849755952621824621632991954,
+ 0.60058338183244813128378689372,
+ 0.57271235605091257806409062354,
+ 0.134476676178095582804914204515,
+ 0.62710051406343298533266304307,
+ 0.21517566131268423511744492316,
+ 0.87763268502269127056352092234,
+ 0.259516013975152388767641295316,
+ 0.54026961752737864438921779715,
+ 0.0321012344232942464157113655476,
+ 0.047765687217921465801489989111,
+ 0.17851281529041807770891682623,
+ 0.67864372391481596436180177405,
+ 0.27188630999531652193578141334,
+ 0.76570352378902765382129471855,
+ 0.55727605717645959087760838806,
+ 0.40035295538031700787360193533,
+ 0.65772683660586524086245866733,
+ 0.87515739410383285146563935658,
+ 0.51637173718066431535845791928,
+ 0.32843440805452173782945632394,
+ 0.46789250836790673252530282969,
+ 0.153916136058705475580104911632,
+ 0.38115724589238346986896925035,
+ 0.96911901452270741576104655076,
+ 0.327510878721849788805057952285,
+ 0.52921188196053063832762822112,
+ 0.357891066893689952162669812174,
+ 0.8109495999496825638917226258,
+ 0.87378695338223548954000159812,
+ 0.071735687760291841872657613394,
+ 0.22099818521305441851106524174,
+ 0.61319403424123059973018445501,
+ 0.49185069904977836269777464774,
+ 0.8465618819298531473261910176,
+ 0.88263955123256235889766657732,
+ 0.264605739218701311737446373095,
+ 0.157257748694727606809000832224,
+ 0.61172692557424578980817509135,
+ 0.89224381101792427145783648267,
+ 0.049436313890546252030141534714,
+ 0.78472068655126867546237630366,
+ 0.94890896727672958163705440614,
+ 0.61244719025309458330037069759,
+ 0.69652639673616920270100103049,
+ 0.82306805868313923466426022855,
+ 0.4619352653236511042512479492,
+ 0.248913888569715263431474781448,
+ 0.64972077945521993267494748532,
+ 0.058989138867897862567374093665,
+ 0.97969837050674699927934092348,
+ 0.112860503606029382332397067852,
+ 0.9148268966080465389473749031,
+ 0.80522292073416096202056634334,
+ 0.80810563925192214527344776336,
+ 0.082994810842601316055993203972,
+ 0.58154183958194788097113770541,
+ 0.91401321304178026032151961143,
+ 0.064162440925738934087179609749,
+ 0.15233762499249088696399602351,
+ 0.05051666992337641462246832006,
+ 0.138526581114846840617440323377,
+ 0.3330645447918149831766264793,
+ 0.217487368997014213919568641696,
+ 0.61893770768550649722673903221,
+ 0.48128956859001312165262121487,
+ 0.67074178502738313699688470847,
+ 0.74389636308055141796746779725,
+ 0.78623735396470085242463142878,
+ 0.74044466560335570728816983391,
+ 0.44977042205766449238521848558,
+ 0.04936658918716696558210777333,
+ 0.46898154881467544198433735515,
+ 0.86577421926732888331279455256,
+ 0.351697801257336354285066689416,
+ 0.44607679846684358775746123434,
+ 0.68542184287580537292736482205,
+ 0.044146424753083577398366558491,
+ 0.84496717026871403905274974765,
+ 0.20398318496314438897842101827,
+ 0.75107700174605698650069666924,
+ 0.178571061661964354577482608798,
+ 0.67178502534981979941629966218,
+ 0.90847842600882488644789391115,
+ 0.073076683947302775918335357377,
+ 0.33981323802799502107773228774,
+ 0.88205531070102240708858032672,
+ 0.52395959911163033140017417074,
+ 0.339537812421755656306362620887,
+ 0.54102447887624739438002987695,
+ 0.99615637434542139613844677579,
+ 0.91178029521112995461052949527,
+ 0.75825739605806537625994927603,
+ 0.20376049709427102495755901889,
+ 0.414724980644126108685694310425,
+ 0.33340705339227162790042902392,
+ 0.63442350111338002489027718102,
+ 0.79083735924049231993808201264,
+ 0.7022290803727963570326957922,
+ 0.073051026670174816217706335151,
+ 0.50842348505687696224462184336,
+ 0.32363091931107924009593033016,
+ 0.097074638787613630803324174721,
+ 0.79231345620836950165162896374,
+ 0.46134517653790366185204412042,
+ 0.87767180094474465071641454817,
+ 0.30504377737897498569142680272,
+ 0.96430402804903305707372788262,
+ 0.58722709934909516402891605024,
+ 0.36287829330987989626587492725,
+ 0.341369045118572012709880807167,
+ 0.18622546427505557603629823709,
+ 0.71794779555885705340742601105,
+ 0.098775720656078510422828040021,
+ 0.94170390436210924588938028149,
+ 0.6256516749208606216856038288,
+ 0.84990648194056707180867958453,
+ 0.24897158268824763099382644974,
+ 0.67126976686560821454618204853,
+ 0.18287142221906188751198231263,
+ 0.58301735289988287890086250316,
+ 0.39451451502323596545833498888,
+ 0.64778726863510310777659172018,
+ 0.344060647976610102257104623935,
+ 0.8543225374577925606075052273,
+ 0.41721025737118350088955048104,
+ 0.346301150923723212219486824146,
+ 0.430145349151890094004681136873,
+ 0.083653676599147505357408467754,
+ 0.89927285917733406113015320169,
+ 0.87717630249665962395834008139,
+ 0.114609060439245285884826496387,
+ 0.19079403943711412757743782207,
+ 0.095752662525740063245815699042,
+ 0.79249438764728213221559489213,
+ 0.36889557473162465630046043798,
+ 0.076691690566591062968137595944,
+ 0.82502767429905549906741868154,
+ 0.7665582347663079379259164121,
+ 0.40329445688627141530172819257,
+ 0.76025417855373928649612014969,
+ 0.67742016809536470259225177395,
+ 0.56458198627250149175789836481,
+ 0.78923506303765674533158921804,
+ 0.242546191857944356752822856477,
+ 0.5429792204847717222270173404,
+ 0.7269010821579782458839227112,
+ 0.68884017933657182784660476876,
+ 0.037868346502260087811459749823,
+ 0.5900507745679403546108564628,
+ 0.2867946536016681954708929644,
+ 0.47061390957475445523849010039,
+ 0.51289737877965767076806069599,
+ 0.422963220866519099525024712084,
+ 0.056516063514784913538055836342,
+ 0.77559606292381102490968685122,
+ 0.44812023547000818124896526252,
+ 0.8496368064876247362896528731,
+ 0.272242276648834925536741986616,
+ 0.21366791927514210787832263868,
+ 0.458126557153035507756298880855,
+ 0.59095285049337797286946531198,
+ 0.41387171106200290943847880691,
+ 0.040527832792286543640976926214,
+ 0.84749051864346812142321430329,
+ 0.6591922374100337646083630177,
+ 0.30504037894556796180304594549,
+ 0.69588062596190762407598122745,
+ 0.54615362946297678668402889519,
+ 0.27179536774730804380125320985,
+ 0.16312965572910266758089041195,
+ 0.60443803311418335000528681396,
+ 0.76221957063947757300487766314,
+ 0.0012561481228798307955579245318,
+ 0.38477311712200424042679172286,
+ 0.86336953839931184684851388121,
+ 0.85132017314817690655384788334,
+ 0.79741410166633177181313320738,
+ 0.81142674213295830272567127246,
+ 0.90095974521916505411272740187,
+ 0.461262866736651478343958282766,
+ 0.163149749038393754125992055513,
+ 0.079563568933303239293664877234,
+ 0.0076308467066608702534098522771,
+ 0.74020408989686798939059759005,
+ 0.68004244363120265645245845544,
+ 0.99423282025586676895879517721,
+ 0.256512790150101579655974619204,
+ 0.15841489307390214447222985222,
+ 0.53156533193583516285295078457,
+ 0.51195175518666885397864463638,
+ 0.2688502522458221215136352473,
+ 0.290743998007688539265414246556,
+ 0.375642431327791011131765421904,
+ 0.73366824563603699669790620984,
+ 0.89031055476039433366324605036,
+ 0.63269458446317741594059410575,
+ 0.79677646360837164675956632,
+ 0.91096051787867659208019728176,
+ 0.056411022047894420770349313174,
+ 0.7117937367428418076554349793,
+ 0.494496454398059649677550547185,
+ 0.9944698091905991687808626336,
+ 0.195654008095567563746040882677,
+ 0.33245249703376584453346565181,
+ 0.91671965905832444523554539619,
+ 0.104159073216349402499760928077,
+ 0.78250381705179599027513221262,
+ 0.82221952254403323129879405024,
+ 0.25404653774104883427079980313,
+ 0.89334850648967094099280368977,
+ 0.2721479244387740074938025269,
+ 0.58627710421889854554604323774,
+ 0.80740872172002770008164688167,
+ 0.295213737773499230779293451686,
+ 0.366266263469556210902410635735,
+ 0.72189449997560167388059780325,
+ 0.91339160960295327548014703572,
+ 0.27978723834100283634925494393,
+ 0.44312275285067091147157546317,
+ 0.88264479919648468925459438057,
+ 0.74860386620420068665117140949,
+ 0.97534502025842784289380076051,
+ 0.183653687608870314454061893335,
+ 0.14143760686328530307343938507,
+ 0.7794390875763962068165432699,
+ 0.79988123088296718350409621263,
+ 0.91344402454829897860268279997,
+ 0.3003753710559256572305330721,
+ 0.92236868180619898327118824659,
+ 0.85128995509445007265453349716,
+ 0.51226586850988855988005111668,
+ 0.59328586801467434659081264762,
+ 0.131543061349700789237108200816,
+ 0.97962864281984756641024957818,
+ 0.80003961712390827564285728721,
+ 0.07332191035039234849987853587,
+ 0.33710892945255754021249327366,
+ 0.237798240512212115424045579506,
+ 0.050628096786899757905464602857,
+ 0.36368141580193860149061967396,
+ 0.074547282281222729072803274018,
+ 0.32013351651022219595136046535,
+ 0.50087363542319392259892635316,
+ 0.95534128322832584718763016378,
+ 0.63089810554419660091974256912,
+ 0.45937043591639452731937380837,
+ 0.77794827072126710252068287081,
+ 0.5833967217973934570703322242,
+ 0.89948711130168823436943591707,
+ 0.88448792344727137087709578749,
+ 0.75774410588649351850782212564,
+ 0.51545850808454807305763364038,
+ 0.89535564141616759448334976604,
+ 0.433876155086630438489414332084,
+ 0.263145194001722566517185175524,
+ 0.094513715303174637696079970882,
+ 0.0067905149976316075236601623182,
+ 0.3746548325271489972742277758,
+ 0.81418012245523025207375976459,
+ 0.7382555515800124086679648947,
+ 0.71505454385778976492869269043,
+ 0.7698698840252614242858413632,
+ 0.53096667868591647121855295207,
+ 0.5913146508318579789498085478,
+ 0.82865413011200335887487636747,
+ 0.246477924915753655378269255135,
+ 0.7718625116939460952174295485,
+ 0.33088224685104582360581424038,
+ 0.077396220323469426942810035952,
+ 0.399851739373243384531661374094,
+ 0.74828949567652386217126904324,
+ 0.55533476993642340021791702209,
+ 0.475356366587838670689554086714,
+ 0.99199926249299355831492581518,
+ 0.60739053074816626181185925167,
+ 0.94570422855790142383862352906,
+ 0.67410117583869264525962136333,
+ 0.99340016295179621471645098914,
+ 0.30521664837678549625426072163,
+ 0.82786899862234431119578444516,
+ 0.0246054418785779831964997687095,
+ 0.33057040500642957115284791089,
+ 0.325865542252271051046671982904,
+ 0.116469964535698881624567000313,
+ 0.38792519202192930208550481713,
+ 0.147033252049062199325747990948,
+ 0.333360890210745561370686771174,
+ 0.267717098935309378552279527125,
+ 0.473606191830554736751491306975,
+ 0.69379726024488030302072707274,
+ 0.39866105325920152799379542147,
+ 0.075996151521605600512218326895,
+ 0.43692155239290098173990417979,
+ 0.63183509185797834489905365016,
+ 0.327726835190132824885685947736,
+ 0.82769389015654780671213364517,
+ 0.38036542617183448008870457384,
+ 0.06416363778906221378580326597,
+ 0.95989693996326393340364540321,
+ 0.77473792948077472252492320019,
+ 0.73353080354752465520384745159,
+ 0.79531316211939777703706647305,
+ 0.31887745411495362933791547194,
+ 0.5504233366621661345254817397,
+ 0.133841546560512334978343647306,
+ 0.93323316393590598213508657757,
+ 0.219534116905903225236593922786,
+ 0.352227557302752346568799070044,
+ 0.50699048681296139093781410327,
+ 0.56063256677949754339755086295,
+ 0.97859418495668224120337606178,
+ 0.43217748779939454097021337034,
+ 0.6118800794139137562939270606,
+ 0.8826339041571606455078384688,
+ 0.190654349423411314990846249777,
+ 0.0272323818569649486990095499454,
+ 0.13501820915175992368033644254,
+ 0.34430252524220055863712676536,
+ 0.135013324503164182485257894453,
+ 0.83301344777287732687815180326,
+ 0.71146270180847724757833953093,
+ 0.059584725284656364940760846576,
+ 0.124388342467555907606115942139,
+ 0.86760011350010388002288781466,
+ 0.43443235444248399222879725088,
+ 0.62257025564267773540408523682,
+ 0.42224480338939459869117553607,
+ 0.122203729563367693705179104655,
+ 0.86763329805228175173701751082,
+ 0.61852711996472568821866689006,
+ 0.9981036801779161471700405786,
+ 0.177126618334123901292041594724,
+ 0.37033568941002233661950847289,
+ 0.81720705981865203019383851894,
+ 0.194752883553301253160228353622,
+ 0.5399475493930702257701115294,
+ 0.21555050095259535717046390477,
+ 0.031480898918419061738395489394,
+ 0.0108626235742996694506893658131,
+ 0.29439861659506237876675916168,
+ 0.25969803792963051605662393213,
+ 0.64305111681301349941082616522,
+ 0.398301763391130971280749586885,
+ 0.82959279528518208376169366062,
+ 0.494452121232255582677051524076,
+ 0.032046850110252624668328949032,
+ 0.304808216164121089322038632124,
+ 0.43743086801077933536332835933,
+ 0.067635143022119684849606244687,
+ 0.062601171413915686472972559687,
+ 0.80704249768256597155262089974,
+ 0.049090587901867220876053770281,
+ 0.14290280489067737067786839775,
+ 0.85153414385190808252068833198,
+ 0.052035578866778404379096518691,
+ 0.84803461110488710482683367176,
+ 0.323391780352303842858779454674,
+ 0.52713499343541339922976296515,
+ 0.91034109375479019837692785976,
+ 0.106146556890642346491650008212,
+ 0.291532189474064930184344798145,
+ 0.330494959183718721493342551525,
+ 0.6236537208920888603043773443,
+ 0.89122121355780761549659392994,
+ 0.51799810738861013193016943087,
+ 0.249256177739037963581221438965,
+ 0.76322106809612787470242640888,
+ 0.97852511972383831461233976406,
+ 0.52255677693690499607690355455,
+ 0.4450034860583097087122794844,
+ 0.79114162250324775713725095404,
+ 0.94756217345536380876998110362,
+ 0.58677918818329126036021764787,
+ 0.84845252924877884299669190981,
+ 0.30081720041370757827674016113,
+ 0.27920525653128846538023076229,
+ 0.33471466998109052439193176801,
+ 0.77432114969973711331784009482,
+ 0.79975078898170550460312445454,
+ 0.90029380309155505829673878957,
+ 0.22735855793472972935624370264,
+ 0.83917898101167717908999667914,
+ 0.96001063929762371813642857618,
+ 0.80557845129235602137075744771,
+ 0.227828260252387705994553631692,
+ 0.45514459312672738783331856798,
+ 0.6996049090759249573037751274,
+ 0.76407211467383802388153449844,
+ 0.35750763601712374361686514082,
+ 0.090157662209549066428683554241,
+ 0.95043897530001474792481472865,
+ 0.97262166470012788338731033975,
+ 0.203045895422423613196589718133,
+ 0.217437635156560627036179586425,
+ 0.5222956932204809424910993278,
+ 0.52865060708104384493756729767,
+ 0.97715373213739469800445297208,
+ 0.5740174414400501666597490431,
+ 0.172348314420047937640907870932,
+ 0.57197038071649167881433868039,
+ 0.26289948915209002196358225729,
+ 0.177903112174726341611524884074,
+ 0.74917239660013094610681443816,
+ 0.59837085384984040836442442706,
+ 0.065070324689375259831989322427,
+ 0.44807493892928848916566949155,
+ 0.59027783360778386064107723777,
+ 0.122058971772529617939528531479,
+ 0.18965096763129552013799044806,
+ 0.179455202785822708296801760066,
+ 0.032170979041981235014758366854,
+ 0.297222966386620738492021519056,
+ 0.91323423393143490893801153646,
+ 0.75998869946268189685327906564,
+ 0.83934073246383862944110864099,
+ 0.17898779712956184324621175982,
+ 0.480986398855505957279379560397,
+ 0.60860751560721289727164165043,
+ 0.298927282590269088379100218673,
+ 0.77935020447343759584143119835,
+ 0.480545242963934573648858250607,
+ 0.85619790637736236353631524289,
+ 0.96488893882602300700764346564,
+ 0.36351865634843046736230405883,
+ 0.82895257550724293657223335349,
+ 0.79749691055514662573933190753,
+ 0.20106705267868388883102752272,
+ 0.33623918491977977623116871123,
+ 0.93256466340279772952587363977,
+ 0.88648669501682764515636262464,
+ 0.47662235152771500250187825963,
+ 0.52659238455883068245922982067,
+ 0.94111676559395948458425469814,
+ 0.323317713690175795284098362026,
+ 0.34796405933091263994264450729,
+ 0.52445433363119391822452105405,
+ 0.525140277317638922334264421,
+ 0.64469482443585357444532895759,
+ 0.33472685924872903603447879104,
+ 0.42400458791646499703641118014,
+ 0.8222662798441265944554029489,
+ 0.75524567154228028735673060411,
+ 0.90790601849806560799894333131,
+ 0.75164241313793249434488428193,
+ 0.38724602290468111557712203885,
+ 0.36352513950081020449187506395,
+ 0.078398790907179055722325452963,
+ 0.5003676822199407758422514133,
+ 0.86055044548361328714384972985,
+ 0.66748567445598821900669819042,
+ 0.95450644393912187127659765969,
+ 0.9536501355878008523425355652,
+ 0.56207573012593503802043957099,
+ 0.99057795680550440527031916411,
+ 0.056136908924222021770088579728,
+ 0.89322960593560085272815946927,
+ 0.19380351076299398770342941398,
+ 0.036881975481577328074706357897,
+ 0.38834900979665334617449710449,
+ 0.77196507761008668275581490587,
+ 0.87539115393397618421355963533,
+ 0.9131721846286054396553858461,
+ 0.62245648254908013430163665866,
+ 0.56021174819199355559539089633,
+ 0.86987294559046384230921358438,
+ 0.474584307464076041054198211805,
+ 0.37224942408757353492416873571,
+ 0.198307276357215222087716993615,
+ 0.81633548414328354008913860616,
+ 0.071192681637945014051745371309,
+ 0.227203421058334439883665388655,
+ 0.50527083273847576806586104904,
+ 0.25911353175247232791676189983,
+ 0.103567996992606824957067451526,
+ 0.98316826751311017109085781757,
+ 0.99206610065531611133123425907,
+ 0.63838444880264351660305680771,
+ 0.90013304139719692321619239255,
+ 0.541419881593941428911392944,
+ 0.434681681520065487913409442927,
+ 0.0277935905905462584654818408167,
+ 0.28736085880215502013374946299,
+ 0.204706679291990486471085620508,
+ 0.29639415300325412139805373353,
+ 0.316818074164048785111401123944,
+ 0.58068268044073033182148412246,
+ 0.137736206950094621238996907006,
+ 0.80907996549523150166492783923,
+ 0.73799561611209772635015717353,
+ 0.84013433924397440368969968592,
+ 0.46126521311414726401422152854,
+ 0.78013716447507497359555980298,
+ 0.83405708922951231042933175851,
+ 0.6366367969739079258896472192,
+ 0.77353748358406402598000037557,
+ 0.17489624725635947111471117775,
+ 0.80267952648428412026314875447,
+ 0.80437106861315296029137160672,
+ 0.62834462177566783487584779777,
+ 0.31539602345858033626133832055,
+ 0.50541890853061839219557074283,
+ 0.0195874476781850222509795360627,
+ 0.011676447193909007242643314705,
+ 0.85675479754070644130150816794,
+ 0.09391269154749661204040398199,
+ 0.369625667102334643216258483376,
+ 0.84311577046357953313746551837,
+ 0.66438426715728382263582851036,
+ 0.70530906415261448155650458603,
+ 0.446783684004800041373395690117,
+ 0.75627790284213576819810990131,
+ 0.57190285913753158265774292274,
+ 0.97785681370875218892539297465,
+ 0.0244503386494348881614690746194,
+ 0.48528430854909558202793141933,
+ 0.89436155397807056672243211894,
+ 0.40757489194485346255194449191,
+ 0.91772837786834838909335779229,
+ 0.28020326531649972709359017096,
+ 0.28847822326776188982020803144,
+ 0.93193769743225684077624356649,
+ 0.58336147304815741644785105161,
+ 0.4004241800179331174134885947,
+ 0.265790823692672203607418801725,
+ 0.4137092141145146388568879939,
+ 0.0255090449126572366852573357318,
+ 0.47601725598948555645487446626,
+ 0.69141516452580797436419291497,
+ 0.187709862166242786826507443003,
+ 0.31177816288567708916778389045,
+ 0.79635247302484103596788484137,
+ 0.14648403361265752358955335086,
+ 0.0088027047060531475573345163528,
+ 0.90053967411241805345616039474,
+ 0.373822238382428585287035417224,
+ 0.94303097002109978273901800507,
+ 0.037263906643698883423150604649,
+ 0.98416823398276433881119247311,
+ 0.257766562836474661728601317803,
+ 0.09336855716941364387765222813,
+ 0.057604551843195630210060755775,
+ 0.37732024813036636644231432449,
+ 0.437099108019093398068604946814,
+ 0.0298274889889844501626534131975,
+ 0.54161045457572229928359302347,
+ 0.354192069739745951755754451894,
+ 0.9952629304832433588789284291,
+ 0.61362350596285189174752077338,
+ 0.23176197923774029736185020682,
+ 0.259000332877923815426717028414,
+ 0.77171708810079063604185854121,
+ 0.87278431247491539306511051532,
+ 0.386310463821549823085972724515,
+ 0.19043920209178263945663905422,
+ 0.77200547833114724875436606573,
+ 0.2683024354984293205497398925,
+ 0.144270112550972640008446091075,
+ 0.36996280314557984925474224612,
+ 0.163548224543250866742712583905,
+ 0.54541238293503241055380526708,
+ 0.54270760938500008382580072956,
+ 0.7374073253240524865446763851,
+ 0.93470960326436177572863031654,
+ 0.71417607213823278615975270201,
+ 0.65837463356664939532769528292,
+ 0.433323451649582925271830911365,
+ 0.79664580661766246494864588315,
+ 0.392079017934601610514677836005,
+ 0.212454387416532999103471570235,
+ 0.198678082418012501322802116335,
+ 0.61525672800559338657275986197,
+ 0.99339589895181138684928419014,
+ 0.53563057949945927383392076793,
+ 0.68817192513245948798192690082,
+ 0.59671938169380086666866042956,
+ 0.5686075254645125832635026196,
+ 0.25860953535454698758704936914,
+ 0.60779864941995215785819783969,
+ 0.46515241662568547274625942204,
+ 0.8756966078479474164213834749,
+ 0.89153160343113076353740745469,
+ 0.57055911159151577684982200009,
+ 0.39366246576557783924065683256,
+ 0.53789676931469921495851209609,
+ 0.95842028586447684249630374944,
+ 0.25218284880717367924827402845,
+ 0.23718965807272971860203662735,
+ 0.334222632819004380754702693406,
+ 0.6370849366068287810411454729,
+ 0.722665796162802454203702773,
+ 0.50216248905279887048328225791,
+ 0.34529823309520970630714708672,
+ 0.45098892404492692601908443802,
+ 0.64640019115293913591196874603,
+ 0.137077316379736192931987264458,
+ 0.29368115076039970149731521521,
+ 0.20091822953913855557804069085,
+ 0.066267083813833718511605782276,
+ 0.88094596104423280074202839474,
+ 0.071730322265966936504743175424,
+ 0.69735904142296779896396736035,
+ 0.91352594564083795862432502567,
+ 0.13244220377041278512040316988,
+ 0.6283911312781029516331064494,
+ 0.34896540167805105781090114462,
+ 0.6795367801751911186206756471,
+ 0.74898526486791573083377925403,
+ 0.71700182398199203349731046015,
+ 0.121142833366516620257163901501,
+ 0.32678002036857151533698078636,
+ 0.327511655875027224450064555456,
+ 0.0079152053645354575349489795814,
+ 0.84748954479623021059675156738,
+ 0.75041561033954009809301550159,
+ 0.41101693712463238996746228193,
+ 0.90155864029338267639417046915,
+ 0.35464670537047753945618208157,
+ 0.68848712573944472430623590326,
+ 0.08893193373618063124738179594,
+ 0.58932830480784385636485098641,
+ 0.0501618828375381577588978271165,
+ 0.9451968329901169788400753848,
+ 0.074994725566097580721185016702,
+ 0.191860088196691871607965261685,
+ 0.67853841063536805868885844477,
+ 0.179445375284033906887325905976,
+ 0.84157620913886056000430779083,
+ 0.7377942162322144186341324232,
+ 0.231126715579023126062082806996,
+ 0.127662509645324778320005407937,
+ 0.63062414859560283674777403205,
+ 0.55283326072907470543330204975,
+ 0.81243486031688046850257374808,
+ 0.299095175225750536694802628506,
+ 0.34284433830834748530634854762,
+ 0.92098838107935607957057329632,
+ 0.6334432153537539286206936299,
+ 0.49203336326915182548719200464,
+ 0.70089872986754081776092540042,
+ 0.410346112246289262244008861334,
+ 0.689375704219352519232614571,
+ 0.53543492718830214408075484368,
+ 0.78985504761729292283075540625,
+ 0.66802245726332267870092702429,
+ 0.75600588548341120124374250114,
+ 0.83217485519464083512235296359,
+ 0.77758150309412736979136465746,
+ 0.067382141804836913185384124002,
+ 0.7289836962356747770023887674,
+ 0.453434776313686590560640460504,
+ 0.3160796148757468204057886796,
+ 0.0098933475787107681104048511314,
+ 0.3620064234142809735084479026,
+ 0.85993179373877360456391909506,
+ 0.90684883450763884954227285187,
+ 0.75959171037325548903969803948,
+ 0.91219881792279148536349496306,
+ 0.97175430264940118917041244436,
+ 0.292364544897748356834218017667,
+ 0.126096590956329503351026499397,
+ 0.058210669685805595156500555938,
+ 0.207143479048534791976348255132,
+ 0.202837039257860939456824357966,
+ 0.459137240079351948795601640776,
+ 0.65480905235794807223708347609
+};
diff --git a/gl/tests/randoml.c b/gl/tests/randoml.c
new file mode 100644
index 0000000000..b48d49cbf3
--- /dev/null
+++ b/gl/tests/randoml.c
@@ -0,0 +1,1028 @@
+/* Some random 'long double' numbers used by gnulib tests.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1). */
+
+const long double randoml[1000] =
+{
+ /* Some not so random numbers at the beginning. */
+ 0.0L,
+ /* Then some numbers generated by GNU clisp. */
+ 0.709874756135422554674614242046304686448L,
+ 0.486497838502717923110029188864352615388L,
+ 0.474019570990182753146861083750226106848L,
+ 0.998821069612940336401792152067298257397L,
+ 0.68230324395444341476284133813649237509L,
+ 0.0812383212795450007980350531141537177532L,
+ 0.43131112016001535977175708439191217567L,
+ 0.1596337172541222285215378906083607753005L,
+ 0.0447361192177328171952931546845870270203L,
+ 0.669148550486018286115665314826153614017L,
+ 0.398752708644620313955955676251505325896L,
+ 0.600019492390024166744893736290881101244L,
+ 0.78337397012688890834008412364808365851L,
+ 0.747414410152603863408503379239564644402L,
+ 0.550615721371501982864462175362996180322L,
+ 0.0073983673767251687422683917248311760491L,
+ 0.693846360902780799478892082407382699085L,
+ 0.751592057901191172906159475240427353057L,
+ 0.74000578784995401707243054106755282117L,
+ 0.847264623235961908747497547605068838836L,
+ 0.917431426585209425652777605148791919017L,
+ 0.267532476015101748449269162884835638528L,
+ 0.486834088208986505203048715784492259319L,
+ 0.4580154564181484580770749178538567666L,
+ 0.391521076582874764982597286237947922907L,
+ 0.69173131929214083677828129436922728366L,
+ 0.995268639187054867212755710743514657877L,
+ 0.553189251912843822062196619876802699895L,
+ 0.632300552505301947698796653386744186037L,
+ 0.445572801006840927064646197943103543344L,
+ 0.993634311396905276414701816228609517838L,
+ 0.611582274481091436495638926486363711255L,
+ 0.017611091105275929341544154464243038417L,
+ 0.598936378040443270534796418637146416803L,
+ 0.939730325871014729497001074244817030738L,
+ 0.385712528561693907444911228190200940125L,
+ 0.48796444333495738271693214259711532603L,
+ 0.508634972895891442259656591497940133962L,
+ 0.88453398179301716552318999435310293852L,
+ 0.509099535482633468613040057130206639612L,
+ 0.333677997666677081186230843198919594355L,
+ 0.82715349353996770180499230535973424237L,
+ 0.0372593663309767971914036990047894757662L,
+ 0.932828780275931267421133064996449298348L,
+ 0.486099261359133830842098860485004683725L,
+ 0.987156392631551825781809767746170502002L,
+ 0.824739790678073493124786291053674093535L,
+ 0.671869573118280976952523743592826377585L,
+ 0.48088844444394888967684860088619551899L,
+ 0.017233021606613044454327510797750273989L,
+ 0.988102711714879869326666071903065279145L,
+ 0.091615081537455465573860363408517029583L,
+ 0.0113278995312253231106729997476313183323L,
+ 0.294349528513080028346115860151112891433L,
+ 0.0097058790914280197566968241982258935964L,
+ 0.715113281550035710673074854712220192465L,
+ 0.739627170474553083453358265804562580162L,
+ 0.588476045636558489860462119645353521893L,
+ 0.91330346819098343970944232526748274664L,
+ 0.281457572112513183673653575304242456425L,
+ 0.784192391468991402261628322552430383283L,
+ 0.504857923842698553133786835061714061812L,
+ 0.230410937725986177704701374433825197397L,
+ 0.535805811877939822805608704986961969659L,
+ 0.0508287955596506952822240797812703550548L,
+ 0.179399756999629053194209501169297540332L,
+ 0.675837373242984020977236431747771655704L,
+ 0.981496523455084073391380532008173135055L,
+ 0.325845075647804753424852268729037997407L,
+ 0.832630951427200447589084239299500129776L,
+ 0.825354056334755646582091209610369762364L,
+ 0.574731012869980895104127749738122205757L,
+ 0.799028354294603017571131513193291020045L,
+ 0.537721586879667191016369071169775496218L,
+ 0.83846801885738807298552515294277869191L,
+ 0.0922901597877978587435698953162723703674L,
+ 0.434458505758559675954739433438496373717L,
+ 0.308017320632506922735963882703835222897L,
+ 0.0192693232310748837390370764187488626234L,
+ 0.65275462537999797862908920689650691667L,
+ 0.357130585286320841741290333260811815153L,
+ 0.359562085720204868627653630044659240449L,
+ 0.758320826841831017712067337815543048118L,
+ 0.62169722559489484088614873429559348682L,
+ 0.17335411409874538731529771306978631118L,
+ 0.154077331752487118534287271363344964006L,
+ 0.148559174998934930922746358844164455867L,
+ 0.881316225913391098839630896554038163768L,
+ 0.89289796752480477623907740261818685845L,
+ 0.57786655574695620371527391411424563834L,
+ 0.318175774295281868509200498351278930862L,
+ 0.194978302204782205514236430086515458283L,
+ 0.87084962252516402992532937666368998137L,
+ 0.362113882465068209502300826516448793743L,
+ 0.273446496762640462316848141032810658473L,
+ 0.1471399192242189033406154289397228481905L,
+ 0.937157507052090331728212622934524925056L,
+ 0.600045430164287985733450402316667890373L,
+ 0.794478865621258499047814379367829521507L,
+ 0.889115878933706260333129391997704491913L,
+ 0.631825206206982866021784416451887594472L,
+ 0.966422225095067311240936396545408962515L,
+ 0.676845470105427028205320649846678927664L,
+ 0.671163783319728784750606328490914935783L,
+ 0.213726274743505026386536996423761328083L,
+ 0.99483340496284948345969144891145513965L,
+ 0.362072360280863974302182899205431874295L,
+ 0.89135316959373017710710890812308229361L,
+ 0.861008403776277958081202417380537907424L,
+ 0.518258469677886348298849030872657409393L,
+ 0.74995117457421590827489329835282465567L,
+ 0.141688060236646135992059548400562463963L,
+ 0.231055693687838328234866575264314255906L,
+ 0.128367320195147852998795956530756587271L,
+ 0.735643745226188370911313880883935933086L,
+ 0.481951681233521227023903083881246017963L,
+ 0.29797778097740396719094352844253033076L,
+ 0.259026843185033526978277511857498182853L,
+ 0.76454793636766387350530239448634042225L,
+ 0.921742101320371872828332060575170679558L,
+ 0.135594574885855893452962438848740230435L,
+ 0.249482789438500604376469100084029356821L,
+ 0.447893460512394580798054060401740249162L,
+ 0.841167533365717681130523968098862274883L,
+ 0.063885342343669943206116658917625959392L,
+ 0.49268569222220133343083683720155184169L,
+ 0.0320364278163828327673837310979596079469L,
+ 0.83067006037141488187036282222404336846L,
+ 0.32687090604018629599351990634445890267L,
+ 0.524229581985562678867475657633756672726L,
+ 0.26442137331545990230136529620604338964L,
+ 0.1804465247704923307363156457827584866855L,
+ 0.219897692414720290686302976466475627349L,
+ 0.657372240957848561373923532613997515665L,
+ 0.94917951707325275578037456019158874452L,
+ 0.999935336870950506894538846120127792282L,
+ 0.334292387732229479489367107895450895382L,
+ 0.519605753222230586160238890634421180626L,
+ 0.2353320030331258205431171147281090084686L,
+ 0.697837952881171466097464830413620278996L,
+ 0.337355949172173312279209733133367570558L,
+ 0.59624609578396787690174902306338541087L,
+ 0.430566868363073838098964774826687118822L,
+ 0.303143768470597821848720008902412356097L,
+ 0.45566572082779255052299434804712613961L,
+ 0.63651052470632278377988990008643926753L,
+ 0.88355849548999550762491205909993278845L,
+ 0.857627182143034336666679544569747793963L,
+ 0.579654405386150422035981447661995358225L,
+ 0.527551502180559045145630115424486189773L,
+ 0.227798290812497436015108334865799792168L,
+ 0.860285575656798735433746383563482660567L,
+ 0.657434642899561800145850990323893418457L,
+ 0.991915916857419346367596676050775541352L,
+ 0.0299053482258395117883768309912517801074L,
+ 0.494186962160200346319995839440170254278L,
+ 0.795837941248740362154274095100822390282L,
+ 0.213898349709271555518444444268604992712L,
+ 0.635385838537788174234352352696939407706L,
+ 0.1161960540496013767418067989853615145483L,
+ 0.236636716576793997613161803474856412323L,
+ 0.250257128320679509772248555959408855321L,
+ 0.754809883956726591031066199439807350575L,
+ 0.240047496212680591313028855365466345707L,
+ 0.125918185384015376472834932789271923263L,
+ 0.830761928512260978768305988740912711273L,
+ 0.0833746595456954680423678981938324373477L,
+ 0.993235018876045312632920249583820095078L,
+ 0.74457886551486005017424251252790500917L,
+ 0.904041666312003998553971236017433817041L,
+ 0.99682247674917724207607173416904094376L,
+ 0.778185258630194559195184600522592063632L,
+ 0.617908428541966249479693433082678846704L,
+ 0.034201434638706652764862810175677292771L,
+ 0.1166825963578175046863759835887066398776L,
+ 0.618184997077951045734597662867931774914L,
+ 0.67223166229200793562043589747700629457L,
+ 0.50367723015643325152991864733820551338L,
+ 0.287805524504497224349445840278160308547L,
+ 0.418530565562949537953621246456529701546L,
+ 0.356577284504836083965140033686046682705L,
+ 0.727797226876543100474285620953868682292L,
+ 0.261158535215243995918166290296126543963L,
+ 0.1233681715943113445590872776925938156L,
+ 0.397342365090131218507373938120760734013L,
+ 0.33651833905580176460704582099080050591L,
+ 0.124851176251609572087737060478799388707L,
+ 0.49869389018540295598691678028277690211L,
+ 0.603921102513219725593707198424421456834L,
+ 0.0288068305492076274901316515486696644854L,
+ 0.27635950491121559708402485015430409745L,
+ 0.0219820746750707161670181537628175322048L,
+ 0.893266704905772978187424688068554761406L,
+ 0.055131714446612192984065196401480701447L,
+ 0.478917803887421452005543212818108274705L,
+ 0.1089109338581245135310441557812062287244L,
+ 0.451355129465699006367714322379179082201L,
+ 0.933539696310061306235683130737189659555L,
+ 0.295046527696521751967458467625754033345L,
+ 0.657654030109877699469191835246373699585L,
+ 0.699519422709288537538980841108763784234L,
+ 0.754780411476609088293217972311402262028L,
+ 0.940185229424181440596885768821586612845L,
+ 0.641206442188302531301220212171259413504L,
+ 0.483623421775598486212538785028426545698L,
+ 0.1819507033406890598006456890391145571876L,
+ 0.3493992184159313422014002142021878866L,
+ 0.2282143482135155999703670773974654680736L,
+ 0.65404355620292102948676570623901452325L,
+ 0.000126697620991797753719907018394969483701L,
+ 0.000128697615694221449450257101713351917085L,
+ 0.66277677565136622936757573048183355679L,
+ 0.954427508631091518542647272554320259L,
+ 0.821452416615550557725422642536361482673L,
+ 0.783949133156224682132225528942727293192L,
+ 0.883688268329322182794294084718215227776L,
+ 0.887198477924019626901140168907684736036L,
+ 0.301153686936585019868640358522761168745L,
+ 0.97031160152938862140377079439908121466L,
+ 0.613591225576913510391808189718881180802L,
+ 0.973773801885628446394837963774216539007L,
+ 0.969946092528631153860793542995840284225L,
+ 0.0552318705490405481104532089875456066346L,
+ 0.398506652226642658353465649824893657953L,
+ 0.577466681084525459648007205600389579233L,
+ 0.538305717497527581210294472297571817608L,
+ 0.0378969572225333661087665511893845011475L,
+ 0.82821208446292402852221418490682507414L,
+ 0.207039760611344134455359310666092356869L,
+ 0.278071434395492049592363658721835175976L,
+ 0.418157919791356829061560807874478279737L,
+ 0.917935426878916775097393966246600470752L,
+ 0.968879316988430839484738642933327229065L,
+ 0.836847484003257581736597938908686488306L,
+ 0.95787762740618523171012745852536482523L,
+ 0.381833463284092269744674988738521423563L,
+ 0.585758801118634412354899474049588357203L,
+ 0.590675098878457580254555486356030743515L,
+ 0.999102261786447498899644398829003134788L,
+ 0.278723779765613710807952395929736248799L,
+ 0.150160483677965826860533794972733497469L,
+ 0.39044191915595120943090707935299688844L,
+ 0.882025297705744570797306391637391855587L,
+ 0.26053886056730883704893455389142056588L,
+ 0.530123960707389279621444598593626923328L,
+ 0.307497951588709795568291546230129131789L,
+ 0.755712717002473210112772528495042985208L,
+ 0.403971099596680128749039001982260210321L,
+ 0.0955902605698226580325595772471302440213L,
+ 0.733946822526846681865131682504158670327L,
+ 0.824558199580936798107294631591949429405L,
+ 0.355777480091076251706346214380424670616L,
+ 0.183210308747040172107746729630689571628L,
+ 0.943081072447366944673610412439697363267L,
+ 0.823437046917209496498923793615721213912L,
+ 0.272212671889142468847791216625072718846L,
+ 0.467586497114075237282436742306271250655L,
+ 0.965430243779957305809196327799423550657L,
+ 0.264527585376739963287684763043832918263L,
+ 0.78305929918791974277407705060017330726L,
+ 0.1569161089271269079867408493909342109635L,
+ 0.385890512318945048667111881493883277209L,
+ 0.748768801714747310036929893375463390286L,
+ 0.9607241213632062657075501565333113635L,
+ 0.681005349771442926258254424282975745535L,
+ 0.417404611754855157969846623218352380733L,
+ 0.384922954690351156114438668003273806442L,
+ 0.0248688875333777009659560293287195312336L,
+ 0.289622732329138351547499030028075517487L,
+ 0.356660798938142089830284922931103513564L,
+ 0.1092119220339924538904809107210351902013L,
+ 0.263044604533896828574983495057823392153L,
+ 0.72916056882229781356884933113775509031L,
+ 0.277279616044198734111166028359400949283L,
+ 0.448496025651349045553194567962243478962L,
+ 0.397797975606664545700620422788810306397L,
+ 0.915573317477921170464219734057440942223L,
+ 0.565957191780698852582910000301549192135L,
+ 0.0199640867363067059474765492007910956547L,
+ 0.380718754942963039702539139065633248878L,
+ 0.271561535356661429325107452975658450244L,
+ 0.65703383768996023094650337496290243735L,
+ 0.810303462640169412310932301780031244584L,
+ 0.34389677270659068303923976829417662132L,
+ 0.1459701849396526086771469906702178205394L,
+ 0.0709566883230581731990192048699199874356L,
+ 0.0273188133279639766234319338307950998466L,
+ 0.189257375093862859152281617127963424911L,
+ 0.483370049027267515091110020077746913052L,
+ 0.6121051307445822901845022667347352688L,
+ 0.0669683489197768142011855877890933175548L,
+ 0.0462440353376468071116256899031962430102L,
+ 0.66179099750239749196171922709429044667L,
+ 0.331447780875915347204488922360787127231L,
+ 0.88878630766137716878808504113561041651L,
+ 0.57831688009568937419273238575083437733L,
+ 0.1665758643537997337473156606765968668944L,
+ 0.609499751553850514507525575752744468325L,
+ 0.842660412678850878529299409778020570114L,
+ 0.868735885617006579468607975714721515953L,
+ 0.518323673739076029376626898444587264186L,
+ 0.465048961779768578307935679739067346325L,
+ 0.739933063031511059934522150792493137138L,
+ 0.366097491036976922528977805725731033037L,
+ 0.622890978255856721366594654155975719428L,
+ 0.945120241233001881267096151974150875442L,
+ 0.711795000549305806399598132955701848342L,
+ 0.120093380051693652573317820347038096902L,
+ 0.461420048084338423641881546847056927696L,
+ 0.201645977777376722385295339631509175754L,
+ 0.1479402104137110360277226090924965371445L,
+ 0.287960179369955828242600303166176042591L,
+ 0.788362667534075941033937374958276358103L,
+ 0.610312055398887641020833805884097007991L,
+ 0.758450801974187424825814780682156814865L,
+ 0.64208882693968320907867911523798381855L,
+ 0.255468285690834138126389042932304445888L,
+ 0.0370478385689831649949675007793815537737L,
+ 0.551880617631056560992613768623601574096L,
+ 0.559262357532227558112085482526038868046L,
+ 0.129705275018847798920129782613409588523L,
+ 0.1076289463968801831500602693982998566697L,
+ 0.272506325706516323678193293634687081578L,
+ 0.721990855538151706841764025895777805643L,
+ 0.523084042169573467351077180119310086396L,
+ 0.0858615712848179826840482241961243288956L,
+ 0.589714739430299853251893655400362103563L,
+ 0.512412326166823937685402214713910254025L,
+ 0.802350747297003067442509635888112412853L,
+ 0.715817091619681167941132068164905209087L,
+ 0.0824951218034037355816988555328185436778L,
+ 0.829228234554153070848595829448989414728L,
+ 0.59652037694553054648270061009002150308L,
+ 0.133585725647906582691822880117773950377L,
+ 0.812005216254498654412124509257882599085L,
+ 0.808142463854396488512203093936737654517L,
+ 0.570217922503074432494487309472855783614L,
+ 0.704017977813333280013384719294741845102L,
+ 0.0251797587779118690185681150429720019843L,
+ 0.676272439608475367571481578590700290242L,
+ 0.880796414989798318500723261307937258554L,
+ 0.387922631107753361553377889431536170676L,
+ 0.282350224157064849683455744598629321323L,
+ 0.721001172978128539392551761867898599807L,
+ 0.98720056526474911920598612334425157851L,
+ 0.9951900286811655251775209231187451065L,
+ 0.051844546479017627818996668613208776283L,
+ 0.103738972117399718145836730690615155693L,
+ 0.228544758674525285763674099492074936604L,
+ 0.429309402103194762341587536897342160049L,
+ 0.564535575507982971760351294178163523416L,
+ 0.999063571593237112671743187500362701266L,
+ 0.340374156369508513494787137157934959152L,
+ 0.778748988242111504661479799747122556733L,
+ 0.471307010869691772647781526213794708743L,
+ 0.289707428078962269353959639691462373973L,
+ 0.826577651264033230456965284610788939828L,
+ 0.860667694131974131835140122175480202008L,
+ 0.596405567348984902495263677852931818947L,
+ 0.79786093770390728560184577433203234578L,
+ 0.85492142888696693237980696048371212203L,
+ 0.57242705004809831263405538576519171441L,
+ 0.829648119655355629047392239460860046016L,
+ 0.783260316181642610272420809845230036294L,
+ 0.0941718863377651336163202407301145871807L,
+ 0.156372209579300482444127671309443664823L,
+ 0.95045258077372510217507306087908380692L,
+ 0.1885289021059534081345247308001373861575L,
+ 0.660776653890123229320677431688026234587L,
+ 0.2333507388961794003755022400755269739225L,
+ 0.926661255852332295794894190183342387092L,
+ 0.862240624886232672002503279536846219655L,
+ 0.093072473040365648693897225471155002338L,
+ 0.210437952956145192084247103889970459783L,
+ 0.98112543168220233380555460117617724093L,
+ 0.740174391774267645790688716222038485627L,
+ 0.0209886798500615011013258311339617682421L,
+ 0.41833754096087514377582590206105535614L,
+ 0.469019942905167330505858885046130048223L,
+ 0.715228143253914303084091910768414947468L,
+ 0.949215045400946624794326433082702896278L,
+ 0.0839262379919984011512905346130401074556L,
+ 0.358856470231875479544116669678510859691L,
+ 0.676461324144301815445903930221360844898L,
+ 0.321802718137104975636543941512529575137L,
+ 0.993411285955596090334951526803325817472L,
+ 0.860164319140927797258503749506400508873L,
+ 0.94773452678939638468420772776729628408L,
+ 0.786167026315331965750413583155691260173L,
+ 0.45156944204188755542678210840170293585L,
+ 0.490807428869058127589400400723875752095L,
+ 0.1064150484458768919266881304357565451445L,
+ 0.324460881496927069927267886879512784128L,
+ 0.892536276084459403262968666925514247957L,
+ 0.626906362142556286375622503025155623158L,
+ 0.912617117728752553677432546319200457076L,
+ 0.670287539555608481364011494943625670644L,
+ 0.247614513279178220157281399165275150246L,
+ 0.328334024179281412037962820247065990969L,
+ 0.829445540957824174480776183273738605512L,
+ 0.1787214688659462728637669907628671276175L,
+ 0.925570168885833135397413435137754040344L,
+ 0.98275386432184844551191217367555375122L,
+ 0.364711512670624901280733420446798813805L,
+ 0.0676060703890593392691073615176801081634L,
+ 0.01088522590112897075539168583333589679446L,
+ 0.0611693052224598303672047526429160913973L,
+ 0.214589347780615411637055343786045569195L,
+ 0.698097005257153990899739747284349971478L,
+ 0.0354356066334430559162358810601367856981L,
+ 0.0279531560831790454930326667914520406377L,
+ 0.939682879995515407044885888120427639943L,
+ 0.312419879113847025637130107480365284706L,
+ 0.429063186024752762548549652686423948472L,
+ 0.198325752893057589388425455067795077316L,
+ 0.653970278037364931023007417819508007502L,
+ 0.396811027519564931158159336303275106925L,
+ 0.50451059823222344440248588902992099958L,
+ 0.0862505815838354201964323759027263746603L,
+ 0.957096030216378795442646824371057760147L,
+ 0.587610162738417619467784731999441435863L,
+ 0.582187586992416238476426545279573456436L,
+ 0.535716130421670802716666237861890374707L,
+ 0.090478847153957807764386571203708454605L,
+ 0.788473620511487574655894325144660477707L,
+ 0.610237648835883657058234607228408957708L,
+ 0.678372723016422015853594971922211368707L,
+ 0.0477042323920128297852928999674240977938L,
+ 0.916676966783686851658830754268116450562L,
+ 0.385373716764729378193009393283577714611L,
+ 0.51049308234047313597601380814795899816L,
+ 0.1196704708003806819299545192341910042065L,
+ 0.446475706132336496196697021305914636716L,
+ 0.22995164195921866005337396330755244987L,
+ 0.632225374693904589951305492826903497058L,
+ 0.1049567841702419598059377515889392050297L,
+ 0.66749284825574584532432314559877621928L,
+ 0.730750212627697291852996268443402535667L,
+ 0.44210748459007730373853303409845654876L,
+ 0.165882407048533464405922485111215401752L,
+ 0.326102079042974476137893383568312181916L,
+ 0.894926469777796621626659556932174565354L,
+ 0.829811268916354531033773068150153342864L,
+ 0.0607253283595596933368529290946492114805L,
+ 0.0677752868787034912813695724240479638585L,
+ 0.82861506635734784945473366382511846348L,
+ 0.160085543323090657960949278634908144601L,
+ 0.232569451519550129004668131405568301759L,
+ 0.848363194546104528297512566450812116666L,
+ 0.793640414525406609723674517332020118566L,
+ 0.0908665486135344605492576594616215607582L,
+ 0.98524892289773367881284955458176900047L,
+ 0.232277847265217861619371474795084074907L,
+ 0.2478103820537262599906715455471023544214L,
+ 0.518524645780409202282547691600231775584L,
+ 0.726858378884955244314303315523158335615L,
+ 0.245545705017836867827662773158398435754L,
+ 0.2242602776132220616213985660229694803996L,
+ 0.69321599409749039262414070240230983052L,
+ 0.0112978587458533729787299027903363211672L,
+ 0.201700091442640051051557572594860881596L,
+ 0.1553158804742445432796353137546288871905L,
+ 0.297307958467221836656545818754009116053L,
+ 0.858321137590160233755873079497950982112L,
+ 0.66848174756798322137180974713907803341L,
+ 0.996344263106353369755981871581860505522L,
+ 0.0298469963581545313060582891253178820216L,
+ 0.5825562269883888340326171333296281312L,
+ 0.493316240919863194534203651249074989694L,
+ 0.25506115557073666386519530923416434445L,
+ 0.990037777634583670683401168871182857585L,
+ 0.111966792328779238876716387539738843995L,
+ 0.555536981182848652400091282463345207445L,
+ 0.281763605895317871765768390877174374161L,
+ 0.902702281907817546029803311979267829958L,
+ 0.526223239446627547666226037912343453756L,
+ 0.663322588876953268851644820272004691035L,
+ 0.925956679854174995001911256195736125327L,
+ 0.978687628923344717267490649565202182013L,
+ 0.295452218109470204949110043833472171496L,
+ 0.763317372768444290934585368155544717374L,
+ 0.41484295515622153189510360412010755096L,
+ 0.95319138766107113957717501566306191772L,
+ 0.449833295238493367386837134824022661087L,
+ 0.380903660964162496124546078818966824203L,
+ 0.0591435603332779390763767398658188273838L,
+ 0.594973116752510574186847848340951992488L,
+ 0.66051154347057943107777082783767373976L,
+ 0.9590947364014878778361002605613544034L,
+ 0.141719503437180601174660143271258240733L,
+ 0.72942088503531365739564056985302156428L,
+ 0.96229479992042091317494337141213026865L,
+ 0.51401712994901482942061876482808737646L,
+ 0.09446204537625467018781365109090483186L,
+ 0.568441523568450417056301286402539600564L,
+ 0.598604342726174263070596195546293250945L,
+ 0.774951017988365558347613104226790833317L,
+ 0.81892086730816467017537310019875247387L,
+ 0.890143355483709851496792149649550808793L,
+ 0.2191477338352410954693547610221317715285L,
+ 0.726897475480314385643181203422499653L,
+ 0.756138778886812022822443490226271392144L,
+ 0.36128016023552084266898937740898271179L,
+ 0.410782581318000192446155911986931996913L,
+ 0.223641334296034708685419059866928946095L,
+ 0.0611617201563377229556630546893173872466L,
+ 0.0454251140845604672274274573289906520655L,
+ 0.292039969549662442463090760177927466818L,
+ 0.0892783972345646734854765244000589132126L,
+ 0.98769280749877429524697464655962686569L,
+ 0.889843464657722517503667653048728011052L,
+ 0.651776307404858375062718114948328477704L,
+ 0.87617575855504123004785690824244025026L,
+ 0.338359170956885135997817905734588127076L,
+ 0.734032684330295341291816774804886223887L,
+ 0.862422342223053851459695185679195132964L,
+ 0.197333977370262353727756586852240555633L,
+ 0.586060335783457129849055206578505427124L,
+ 0.132898852938756538479400358451026471607L,
+ 0.548298096092246267871555639877296879195L,
+ 0.301119859270324657077136364646995297056L,
+ 0.02186689635349189676964089313754648484195L,
+ 0.037538023766844046167768352700498359816L,
+ 0.739462465806194132819844936199304370748L,
+ 0.306338591475158278790432712666553704959L,
+ 0.0349382326130091592369352494672121905505L,
+ 0.12659131714329909411210854142389581492L,
+ 0.991566243159047696662802015340988687108L,
+ 0.265613985138476447081523915107505113653L,
+ 0.379928020809782559672193104868857287448L,
+ 0.3311424971073397473661763760151895103L,
+ 0.702177302636984264408758773725210449873L,
+ 0.975045571615360787500646118846671455125L,
+ 0.0373462862349996603561237755410350012631L,
+ 0.846126776062337124521510357150131165153L,
+ 0.604046707233534456382774833817964498043L,
+ 0.1981113045697699450375369418161865703455L,
+ 0.0223467484405979164693956414316536174577L,
+ 0.67121960182601511325776586363807504696L,
+ 0.165784481427263519151726479123968726022L,
+ 0.721784618575898210943875783221281669927L,
+ 0.247408211201465904622132596487935205602L,
+ 0.474174174442367430962454680799704832459L,
+ 0.38041380356189313505762491005159753494L,
+ 0.412834591083812886132307610186713638625L,
+ 0.294378742681402760124595985235966036022L,
+ 0.319576442623415298744966071520183847465L,
+ 0.17227236515412864866186439447886640924L,
+ 0.19227796294349462194111033545303573433L,
+ 0.701351402612222654905938605774127547107L,
+ 0.55598633289035034815584162421930015865L,
+ 0.402729648554369906881359212431684355721L,
+ 0.595951760748834493622338584190905994085L,
+ 0.119840257870361007206544525046135477756L,
+ 0.90443395581066590152525534589406902782L,
+ 0.205188871300477881549673944463237196075L,
+ 0.339175278174772519132232276502457660768L,
+ 0.447725444308107151040888910769680233742L,
+ 0.541239546708188153505885726785683096117L,
+ 0.12984235126732767588700711245028426254L,
+ 0.0534701599183773436559514525508752846737L,
+ 0.793436019832695131646422778046763975325L,
+ 0.718125883729211211336344362949260539072L,
+ 0.328649037343445105052694618356980072933L,
+ 0.113307342739499399477248133420602576291L,
+ 0.87683936228301044929749768481864525904L,
+ 0.212591937265603187751611886807532831791L,
+ 0.761002958456888912899646497131654914807L,
+ 0.220849601519164170820922984026707209176L,
+ 0.222305857213559738578093188054272365062L,
+ 0.651516500020930005107266726995614198887L,
+ 0.1505613416188572288472651067305496894266L,
+ 0.166658450989632252583252879193540688162L,
+ 0.249417632511505538283736333645627460544L,
+ 0.50096054904291170172998992288713266662L,
+ 0.173701146801321486346972068110605414347L,
+ 0.93433415280052265881674202089278791561L,
+ 0.1167900820460300938880016624066890278452L,
+ 0.265137084235229705213901240937609442947L,
+ 0.110072770364904306470596762714108445086L,
+ 0.0670575770615268870829070207384379655213L,
+ 0.92447493539224566948960065689964970346L,
+ 0.187517201307673207566548753071237315229L,
+ 0.935719666366703749433556454391358561756L,
+ 0.964002672100646458888742916175546552353L,
+ 0.6304136194377902875122727617639812134L,
+ 0.497041144725381002743104205240568050483L,
+ 0.589232636183711897405482721407549359295L,
+ 0.524588285641300028631908965527617181296L,
+ 0.786409662511483672510756944887012261427L,
+ 0.9924030873238807048291154748671174581L,
+ 0.891407534733792276848059682970952672076L,
+ 0.308538095910260975496982224956384014562L,
+ 0.949088891149549225900320967233005245566L,
+ 0.507378396004105004571665876613293881214L,
+ 0.348875146873077771786031143309488031474L,
+ 0.129717394366372388305812826098578876617L,
+ 0.371316171885006633822161450072014737125L,
+ 0.550162123072752251266003313454007126843L,
+ 0.822171979807031777641565545578299345138L,
+ 0.75171547658293988559512988487590040284L,
+ 0.329537443635543385256682239450819107475L,
+ 0.159687481361602477899361671181005148163L,
+ 0.788720723813465707294018605642035752394L,
+ 0.1031423865826241581828274573741444954832L,
+ 0.1925157943560383416361499973635531049876L,
+ 0.771893047929845637497166550933789470487L,
+ 0.681189132819106369246924892765206195007L,
+ 0.180608768713011918428603967211913698036L,
+ 0.0869303304414286810402604783458783443746L,
+ 0.63890744831302111307395023326393791462L,
+ 0.531696069328179766265158866360885671855L,
+ 0.557357572478102464274432325432400878297L,
+ 0.765306589402879669413870462450921612475L,
+ 0.0941202729911292570046371838018359372082L,
+ 0.902333472113108821746674873990738636997L,
+ 0.165516366160118370026922089795742876131L,
+ 0.0317472434880413278821576585103363607157L,
+ 0.706107972335163251316361316043030620453L,
+ 0.832472986392763388669796997227437520663L,
+ 0.769939001736494466971306881365718899207L,
+ 0.83093185023987157595917781461722256739L,
+ 0.1143834825195292986705373579359335590854L,
+ 0.283326017120251162360393258571085609729L,
+ 0.301605389836836671045912951769199753359L,
+ 0.855854391727628505548518803309296566532L,
+ 0.089938332734139699450960989316391404434L,
+ 0.310225946153425747793112265736973169299L,
+ 0.96854812596413627994714291059983626441L,
+ 0.279767360423571836833858253122290577619L,
+ 0.113545981876279916290815278422648489865L,
+ 0.943101270554056170747004305255027939268L,
+ 0.812274724978801470221644756549524210083L,
+ 0.9678011347395447510273023981530290554L,
+ 0.514795136336602722878788704708053145966L,
+ 0.50560840616487841567055789750974674943L,
+ 0.127654209842819812026603428361923670116L,
+ 0.273727399985085036497076514726791191553L,
+ 0.964821797874257789566527793136425594082L,
+ 0.853392912197074096341317268954834390727L,
+ 0.914236806849585335611299422695886165192L,
+ 0.277335361137281076359079507288838688219L,
+ 0.865708792613433194377422367016717680172L,
+ 0.761947879929658945814013586634774725302L,
+ 0.276975494384441865188273120642155257808L,
+ 0.0678895000408079241574268817560335475378L,
+ 0.929521528875748672899760603996998763144L,
+ 0.44453824299955605846877126958322272066L,
+ 0.444318159420536625223816052640621069982L,
+ 0.42913762214779045597457741573009821738L,
+ 0.98994873802399078252493194985812582986L,
+ 0.93065975343157446755652147574743540714L,
+ 0.821639107980128580428385838275355600123L,
+ 0.031337950421787684669360817154012683829L,
+ 0.839516942888416107002513723437531514126L,
+ 0.785501376812531727571251496474527490183L,
+ 0.247978681554054401906203846371863203863L,
+ 0.985774009303654108868853196421131421187L,
+ 0.635347409930173147315815281304257764708L,
+ 0.40087985483327734740658289294086718422L,
+ 0.374059729085540852289174052767716446502L,
+ 0.367226053686019780853702834825808619761L,
+ 0.166424328898161772576167906091392715805L,
+ 0.838115185925303343477055122060982270143L,
+ 0.829549684532006011608856001441012324216L,
+ 0.059867788238866724897690318151639504149L,
+ 0.0253429734563284738087263277549928280781L,
+ 0.953315773263436653713242828719775352192L,
+ 0.597536998796130884349662459732857817956L,
+ 0.0320571321493587106457025626624408278814L,
+ 0.477506594803204144826488443400695434979L,
+ 0.285541992141868221897101891229394096707L,
+ 0.764190678950226854486968785768647879005L,
+ 0.895489776830293129781335242249167913705L,
+ 0.570740793029533496018083006013191540077L,
+ 0.938316924714444954315906773563465846538L,
+ 0.56157168133328941481074926451373503549L,
+ 0.354184283860505415751320741296599995231L,
+ 0.778294119283540721552919906619543293274L,
+ 0.434953011661757598127924745629053141294L,
+ 0.37156491156117895854194599593687697796L,
+ 0.898767478977082606651667259049374990828L,
+ 0.21819365919403129548458400006737057993L,
+ 0.278163373548978939704874687746089548269L,
+ 0.1089005781457343817756962209721573336768L,
+ 0.85152888717082537570752846642305937149L,
+ 0.2419243481761527583754399630924438738944L,
+ 0.69442654829377168239365980152821108287L,
+ 0.1512336533453368944625038813397779875445L,
+ 0.617712962492924013140729661730350287525L,
+ 0.935400762900002313827620435729493050175L,
+ 0.79357339902161958573967958515254111256L,
+ 0.734250188990467683521536859220675412636L,
+ 0.748517858206364295837674601491185485078L,
+ 0.82520014781239194590337105462135253912L,
+ 0.1240649365160101108753438662971422995014L,
+ 0.479769236133748631678854875312914195598L,
+ 0.171269492636258554036912204801376697988L,
+ 0.833025419245729049117746814929956940986L,
+ 0.354429813451205200141830318428840891828L,
+ 0.474809123369344367691189422128776480146L,
+ 0.692239655770541262287308180705629028608L,
+ 0.271366901464125731413801963807240905363L,
+ 0.561330233800121182669429172066686942393L,
+ 0.0695868383638479426233449148171168522655L,
+ 0.627576910684655924911125045007979454546L,
+ 0.423331542652214907262628326674848471962L,
+ 0.354725031694671387579309719042578580595L,
+ 0.312419264533145363169359084710774849388L,
+ 0.167819037053563697473931127337972350099L,
+ 0.99960836112225007722014049168024866743L,
+ 0.820598666739967434549389339457492152643L,
+ 0.689495024741546551592649728378054973272L,
+ 0.831455766750164249604246627812180304754L,
+ 0.515538871956858025876039391193370146897L,
+ 0.011724889011994886395520178564059346913L,
+ 0.587485679650311054946861235938601293477L,
+ 0.113010564497810081892271654273794311467L,
+ 0.381261245177928587613552004600730320213L,
+ 0.466933821322235841488251157296771536952L,
+ 0.646965031311287534221872388017990968767L,
+ 0.1811101995014685369939482409137380098995L,
+ 0.247896943912780884738461558340983142645L,
+ 0.989351208835640462928338658234638846217L,
+ 0.924605283008839688813842975338096967047L,
+ 0.232010860908797395869871518793187418799L,
+ 0.90274859050487649728273938229764570199L,
+ 0.664078588165617572819884867627266650356L,
+ 0.532118803501055886836301096658125012493L,
+ 0.854049566634563277356849166147057535436L,
+ 0.756477818237029394317820041473365538516L,
+ 0.84578312219074068824832318394711642503L,
+ 0.169914247711153055959592721695068126213L,
+ 0.50848961455796310913779527189620088788L,
+ 0.715231849280217810525151667911662744854L,
+ 0.59666585539439202929452535210623694053L,
+ 0.72343578283497935670188130618697814035L,
+ 0.982228826906846431195861293729527133844L,
+ 0.98068755339273420823366752414155272462L,
+ 0.805277135157133623039231303778838094716L,
+ 0.840154168539481858495551656699708834713L,
+ 0.41783933695481411993780663692806809771L,
+ 0.070981740672048589027432942629842679319L,
+ 0.96664795205679820656636930925268162457L,
+ 0.155178444292580006807274171645675417735L,
+ 0.276407670358590477524508525465318694191L,
+ 0.1054964292635286397825421772930229411286L,
+ 0.354205947516472098240472076653525679013L,
+ 0.583456972150065135260312420865576513532L,
+ 0.338643867118430587299252775116788065723L,
+ 0.146467849593879827355466951871059968293L,
+ 0.0639448405747942007938896940026153617467L,
+ 0.846536583732599902600485371566229612512L,
+ 0.599728399399342923058515558777947417833L,
+ 0.140387922890235239162309673093379598453L,
+ 0.1613160217694973394489944660056369626715L,
+ 0.151848582163159668039725770584081620756L,
+ 0.663365628518336712743995463098831995163L,
+ 0.752166976367665534193146852225632451022L,
+ 0.911311062532571765386023433215793121138L,
+ 0.692490353635171096989434518397248623866L,
+ 0.990512559245857089458980255962574316578L,
+ 0.135026433195284768293027372762691869458L,
+ 0.82220389984592453325084678614092535756L,
+ 0.385471328555065081327630832374267955206L,
+ 0.108251633446048989722318564345306848022L,
+ 0.429090236713339412878596384043906547999L,
+ 0.983421429305507423332481562450757515935L,
+ 0.0163920521681887489391607174895946079877L,
+ 0.634276319224952361916496263299135133978L,
+ 0.53164375434562160610011793242431018808L,
+ 0.92801127390978303506935520414803575609L,
+ 0.708525110316144414918831897015500504675L,
+ 0.722458240987313977092360928226487539067L,
+ 0.432028911017122242491499522489684865593L,
+ 0.0001754664935299182587224394863719217640876L,
+ 0.384266658709383389800969077999970411222L,
+ 0.284964603427904715461598563563830112021L,
+ 0.1541443027599544245798778784933517572175L,
+ 0.958338802063400795313378181913830622686L,
+ 0.636927309395779701122460610729048286624L,
+ 0.0963946603295477475541191401069719222887L,
+ 0.0995190436935072136624400787867889652226L,
+ 0.294220607618706451139091631947946466958L,
+ 0.180831121994104393794487526888221966969L,
+ 0.635403971764105414766318934434540385347L,
+ 0.333929089029202997624323059191296321991L,
+ 0.498378678845335358166419186432789231466L,
+ 0.79769145046274241777533636404451138797L,
+ 0.269285209299779365433012558225847643041L,
+ 0.110524792990169183853219228066613162975L,
+ 0.252694136970632381193559370648931722998L,
+ 0.447232396115786457656991370803052298542L,
+ 0.136974250599080636030665381278567779455L,
+ 0.67243844394695156696032636816317618716L,
+ 0.280265952023932940327982570523639258968L,
+ 0.960024614746466668963206103951264089396L,
+ 0.83595031847062668345135859090890188348L,
+ 0.127840531352213174558502027846545305518L,
+ 0.333183884044346150282363573006579940787L,
+ 0.480504229384957927069515726093850498988L,
+ 0.768498913093287331615443023486434378468L,
+ 0.940413493411219283289136687423264928073L,
+ 0.548648592555019577089750862504091661273L,
+ 0.57814360039222917342516307696519676185L,
+ 0.752806287004316513987155718410926624384L,
+ 0.328211694133870995310455637563825433641L,
+ 0.153907665030571878436793446358668488233L,
+ 0.694742699178286984320321272531890059073L,
+ 0.25435421168640709608520313542078743933L,
+ 0.61387638208113240104328972389071498415L,
+ 0.250476311300881635346483832554226742174L,
+ 0.345809836897231980069633800588202859833L,
+ 0.343083789419841923142937785323119943136L,
+ 0.319174378869537109008405333721782689566L,
+ 0.158111477528301687597604325494967120237L,
+ 0.244000500810322900960285910812181460829L,
+ 0.23179705702278726416861948783067588642L,
+ 0.54682924846605062799436489677774333716L,
+ 0.549008127982055819651521103931442895238L,
+ 0.262583044663608129412956518168777449925L,
+ 0.00126513153702681878410946802239924274583L,
+ 0.942613696151881635585127791325641506562L,
+ 0.352686443706689559388572818776843215083L,
+ 0.90689998425792029984240460273113807702L,
+ 0.867511650419363872431681377574762734184L,
+ 0.280671949468087158951852027769013272607L,
+ 0.162038690615698843560500386213858514888L,
+ 0.71179364933082197276587611716632482938L,
+ 0.0967402545497599384082792036477527703823L,
+ 0.465040868275334873151726613879001199556L,
+ 0.621004503662486553272117361134036130264L,
+ 0.732964940483576253705474121238830973672L,
+ 0.423374863473223783721502627532544136435L,
+ 0.490338535425760290944218064913112069833L,
+ 0.0243433415988311460557576165617657963508L,
+ 0.0502339423891456566961808478207103394328L,
+ 0.57668149339841029115236469576085057193L,
+ 0.654589079253818313716855283653923913987L,
+ 0.1099728579252794893221972017964445810946L,
+ 0.95067113980240197864048876003001477344L,
+ 0.271440369581834169312179003284604198334L,
+ 0.067152474145377434478612939162576726923L,
+ 0.77434193893477314687843638736266814713L,
+ 0.2095679937785625400917773512669417520444L,
+ 0.7681370807102749183539277908648691358L,
+ 0.24472807400083103884984122018932641814L,
+ 0.191307162486577428460074174309309551616L,
+ 0.637215617752531571162184184570005111405L,
+ 0.858141525396878877938747690015117846998L,
+ 0.338400625200720062249435065450813258281L,
+ 0.564981422008979753676981861330327611986L,
+ 0.809460314261206431741632790718777271837L,
+ 0.879343403409393604462128113991125533726L,
+ 0.284697509116613252542034824007026845569L,
+ 0.497023470648395180497606069099534119801L,
+ 0.650004713241995983979792197286941523L,
+ 0.1177129995341492896184329340448111002318L,
+ 0.923625966014428778639333261268345799732L,
+ 0.698837131343914189577155394009532120604L,
+ 0.28242326745092132457477019796509942259L,
+ 0.70025600885251684699238650783454037429L,
+ 0.876659050276528114198964471020380705343L,
+ 0.52914892693002332233566353042454639365L,
+ 0.319860854431864688430502078275989809115L,
+ 0.83483115610648557287441551698147898778L,
+ 0.727639064249568383685922880431792837046L,
+ 0.58743287662861037184349933549802687836L,
+ 0.510383231616356949495559076196319035197L,
+ 0.00229935944348919214521608305418404052343L,
+ 0.799567224020488433652933994297769381902L,
+ 0.343651210821093611687224166251624444254L,
+ 0.405948097827175151257603419529941300798L,
+ 0.456473183882957921169800992232941517586L,
+ 0.570248304776860782392105323292264026118L,
+ 0.534779754769153667870756893044557559557L,
+ 0.472965511839676757434979299779809656808L,
+ 0.137335340499076127280155831169214403285L,
+ 0.51975901660926295231312276736119435645L,
+ 0.8085867293332018994761547260739912451L,
+ 0.812416413241484848007226874256949892893L,
+ 0.852994977709961112714176162016389410712L,
+ 0.95270886248643660114015239563660004248L,
+ 0.845133719240648570417568652136630304138L,
+ 0.4074980021816323645978397907609428101L,
+ 0.335850514497730546494305840184055599972L,
+ 0.0882622233237065445998153436898044995127L,
+ 0.936467561027640943446178111237050277205L,
+ 0.56676472173638044722431698799123577376L,
+ 0.528427769051008704179988533062745663408L,
+ 0.460890427579778855697205646060084318038L,
+ 0.754971897131798313468797543428083655928L,
+ 0.980733597969419782109470537306886067907L,
+ 0.204362127415649555111877580124343815074L,
+ 0.424822548090499017266619697426652494042L,
+ 0.790847149074521364262028407892114384257L,
+ 0.559922683392730473870877613727301497865L,
+ 0.779993507158626042106006393237738208875L,
+ 0.30516368089713691312418593599115685319L,
+ 0.68918765842229398168455844072311006826L,
+ 0.972291357858071465096079542885284602882L,
+ 0.92204286423973856982373873105566928589L,
+ 0.488649453783638471576482476648021023315L,
+ 0.467124744623849284659862825278549932824L,
+ 0.548051233865943557014854568009331816852L,
+ 0.306838990296265483205551142903402056051L,
+ 0.497005516835688988273805238236922199451L,
+ 0.341504433884138135798086132528045458722L,
+ 0.969816416247460790089503289400709886528L,
+ 0.63656435610220447227337751650167349487L,
+ 0.83588076122262875881859751942918794857L,
+ 0.647568600604975972308348018018445212894L,
+ 0.916061870307308870029862807808332479077L,
+ 0.767988745496844638880672392122527991445L,
+ 0.1623230195628039449666927123215281227666L,
+ 0.0791082835859634251558587844284289799848L,
+ 0.575858643610197202634665099752882990844L,
+ 0.559159434263749620344702466000799724913L,
+ 0.063765998380760211208741798736948488376L,
+ 0.230557913975359017084357477142151415967L,
+ 0.702854691657277602758421942319022953845L,
+ 0.789516660466782621905392733079230211954L,
+ 0.491496186820051632244513986127898500904L,
+ 0.171499215418269578563458417238340672634L,
+ 0.626470061831746666081979158043673024967L,
+ 0.258903137813870706268979320963343541457L,
+ 0.64156850108405218894694811301875120511L,
+ 0.534043520260340661507140771088018906496L,
+ 0.388275182018399247097875416106759899469L,
+ 0.920936363560998030495046998224168162945L,
+ 0.826139404694006088220407338888245165242L,
+ 0.343561253523163451528918423980552161597L,
+ 0.921521003270491194867019217479780072647L,
+ 0.656212467754097185125864111703195343744L,
+ 0.628186262290474398328350301885606581942L,
+ 0.573227336542237665153422986363073650388L,
+ 0.94178975003001342039795597242477049832L,
+ 0.0408103561362355768975182155847755354614L,
+ 0.382581672073273072487550945526454964287L,
+ 0.152851256046525520308098129538613498254L,
+ 0.966735024597183045592313880114075824298L,
+ 0.215564894798334550271993595018433286244L,
+ 0.776491530531523589201618375156272004616L,
+ 0.912460554179311241821569665648929177608L,
+ 0.632880016212040018958086886452474382272L,
+ 0.711577891112709305169603082360885583086L,
+ 0.1120655756066491784920471129299439607153L,
+ 0.691106483958832651050573402690448368687L,
+ 0.227442567846797646970770128970529357636L,
+ 0.837435613090485891584882062239924101455L,
+ 0.524389161590691896070067767400758142565L,
+ 0.591360583466508186135247682666313136762L,
+ 0.103155847462960450706124014839446958843L,
+ 0.98360160577671960281465138408293984545L,
+ 0.197665014114674630647437622579741018817L,
+ 0.1099709194312379594014239398842185159354L,
+ 0.394053373921474751303577685990936074485L,
+ 0.94945354787200894450508557094182436657L,
+ 0.372593716084661547440393809983835348274L,
+ 0.62514674616343692328572382301636412566L,
+ 0.2001871481416310130073795585638383984926L,
+ 0.148432902421401306477690922498335475507L,
+ 0.687921673269487018193347305425182239764L,
+ 0.470940334348984370262797433659013738143L,
+ 0.1592476430730276812200821020958787823795L,
+ 0.296776110696565927524970058176467314578L,
+ 0.1491253105142218631726813695413369166796L,
+ 0.579194717868638955003571989739802264354L,
+ 0.0730543936466744761440131951539370917776L,
+ 0.941296077873340797733875467209629660594L,
+ 0.76720024949523806992504865943580486187L,
+ 0.419526107681583337049761526455092560735L,
+ 0.00688594806937144144337797612615981618743L,
+ 0.931682704636487927763651991274577493318L,
+ 0.660524215847727125058815911433184924133L,
+ 0.71780972384903067744609138100002205676L,
+ 0.02961791918271995070621856302848439458175L,
+ 0.692791206212428997136050006631240567502L,
+ 0.162762426697948445642880183096693062538L,
+ 0.183637795551464341949019870428026949035L,
+ 0.51263789620316407488619761125039609046L,
+ 0.90238698122728366178818828411640824056L,
+ 0.229784208410123517024401367798925386038L,
+ 0.227218480059027721044118324890061381517L,
+ 0.6555059570778176955459672492237825867L,
+ 0.929815767583615624563413584598741896834L,
+ 0.188559597559312695774663933876436875041L,
+ 0.396184448063913762028147791554346199354L,
+ 0.656329540957568516760105602115555736073L,
+ 0.1410678455413176345310401990667063246115L,
+ 0.621004667838855651847651367745487628637L,
+ 0.01277988784767030635209958407461792778387L,
+ 0.69482142276844418673788732511112265014L,
+ 0.925705031133221932065307191539105635005L,
+ 0.925744341385232535963050430363763081603L,
+ 0.24189467813699258571134382505828701386L,
+ 0.646009544609703485845605410919901799L,
+ 0.051119212999532673562206731603906295406L,
+ 0.85076142804383409765024452942896578158L
+};
diff --git a/gl/tests/test-frexp.c b/gl/tests/test-frexp.c
index 7158c8f109..2b6a9fbf1e 100644
--- a/gl/tests/test-frexp.c
+++ b/gl/tests/test-frexp.c
@@ -36,162 +36,32 @@ SIGNATURE_CHECK (frexp, double, (double, int *));
#undef exp
#define exp exponent
-static double
-my_ldexp (double x, int d)
-{
- for (; d > 0; d--)
- x *= 2.0;
- for (; d < 0; d++)
- x *= 0.5;
- return x;
-}
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+/* The use of 'volatile' guarantees that excess precision bits are dropped
+ when dealing with denormalized numbers. It is necessary on x86 systems
+ where double-floats are not IEEE compliant by default, to avoid that the
+ results become platform and compiler option dependent. 'volatile' is a
+ portable alternative to gcc's -ffloat-store option. */
+#define VOLATILE volatile
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define MIN_NORMAL_EXP DBL_MIN_EXP
+#define FREXP frexp
+#define RANDOM randomd
+#include "test-frexp.h"
int
main ()
{
- int i;
- /* The use of 'volatile' guarantees that excess precision bits are dropped
- when dealing with denormalized numbers. It is necessary on x86 systems
- where double-floats are not IEEE compliant by default, to avoid that the
- results become platform and compiler option dependent. 'volatile' is a
- portable alternative to gcc's -ffloat-store option. */
- volatile double x;
-
- { /* NaN. */
- int exp = -9999;
- double mantissa;
- x = NaNd ();
- mantissa = frexp (x, &exp);
- ASSERT (isnand (mantissa));
- }
-
- { /* Positive infinity. */
- int exp = -9999;
- double mantissa;
- x = Infinityd ();
- mantissa = frexp (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Negative infinity. */
- int exp = -9999;
- double mantissa;
- x = - Infinityd ();
- mantissa = frexp (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Positive zero. */
- int exp = -9999;
- double mantissa;
- x = 0.0;
- mantissa = frexp (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (!signbit (mantissa));
- }
-
- { /* Negative zero. */
- int exp = -9999;
- double mantissa;
- x = minus_zerod;
- mantissa = frexp (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (signbit (mantissa));
- }
-
- for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5);
- }
- for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5);
- }
- for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5);
- }
-
- for (i = 1, x = -1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5);
- }
- for (i = 1, x = -1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5);
- }
- for (; i >= DBL_MIN_EXP - 100 && x < 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5);
- }
-
- for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505);
- }
- for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505);
- }
- for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa >= 0.5);
- ASSERT (mantissa < 1.0);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
-
- for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025);
- }
- for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025);
- }
- for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i || exp == i + 1);
- ASSERT (mantissa >= 0.5);
- ASSERT (mantissa < 1.0);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
+ test_function ();
return 0;
}
diff --git a/gl/tests/test-frexp.h b/gl/tests/test-frexp.h
new file mode 100644
index 0000000000..71001df423
--- /dev/null
+++ b/gl/tests/test-frexp.h
@@ -0,0 +1,179 @@
+/* Test of splitting a double into fraction and mantissa.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+ for (; d > 0; d--)
+ x *= L_(2.0);
+ for (; d < 0; d++)
+ x *= L_(0.5);
+ return x;
+}
+
+static void
+test_function (void)
+{
+ int i;
+ VOLATILE DOUBLE x;
+
+ { /* NaN. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = NAN;
+ mantissa = FREXP (x, &exp);
+ ASSERT (ISNAN (mantissa));
+ }
+
+ { /* Positive infinity. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = INFINITY;
+ mantissa = FREXP (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Negative infinity. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = - INFINITY;
+ mantissa = FREXP (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Positive zero. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = L_(0.0);
+ mantissa = FREXP (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (!signbit (mantissa));
+ }
+
+ { /* Negative zero. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = MINUS_ZERO;
+ mantissa = FREXP (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (signbit (mantissa));
+ }
+
+ for (i = 1, x = L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.5));
+ }
+ for (i = 1, x = L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.5));
+ }
+ for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.5));
+ }
+
+ for (i = 1, x = - L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == - L_(0.5));
+ }
+ for (i = 1, x = - L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == - L_(0.5));
+ }
+ for (; i >= MIN_EXP - 100 && x < L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == - L_(0.5));
+ }
+
+ for (i = 1, x = L_(1.01); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.505));
+ }
+ for (i = 1, x = L_(1.01); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.505));
+ }
+ for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa >= L_(0.5));
+ ASSERT (mantissa < L_(1.0));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ for (i = 1, x = L_(1.73205); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.866025));
+ }
+ for (i = 1, x = L_(1.73205); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.866025));
+ }
+ for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i || exp == i + 1);
+ ASSERT (mantissa >= L_(0.5));
+ ASSERT (mantissa < L_(1.0));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ /* Randomized tests. */
+ for (i = 0; i < SIZEOF (RANDOM); i++)
+ {
+ x = L_(20.0) * RANDOM[i] - L_(10.0); /* -10.0 <= x <= 10.0 */
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (x == my_ldexp (mantissa, exp));
+ }
+ }
+}
diff --git a/gl/tests/test-frexpl.c b/gl/tests/test-frexpl.c
index ca28f8a1c0..c5e07b256a 100644
--- a/gl/tests/test-frexpl.c
+++ b/gl/tests/test-frexpl.c
@@ -37,6 +37,18 @@ SIGNATURE_CHECK (frexpl, long double, (long double, int *));
#undef exp
#define exp exponent
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define VOLATILE
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
exponent for 'long double' is -964. Similarly, on PowerPC machines,
LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
@@ -49,161 +61,18 @@ SIGNATURE_CHECK (frexpl, long double, (long double, int *));
#else
# define MIN_NORMAL_EXP LDBL_MIN_EXP
#endif
-
-static long double
-my_ldexp (long double x, int d)
-{
- for (; d > 0; d--)
- x *= 2.0L;
- for (; d < 0; d++)
- x *= 0.5L;
- return x;
-}
+#define FREXP frexpl
+#define RANDOM randoml
+#include "test-frexp.h"
int
main ()
{
- int i;
- long double x;
DECL_LONG_DOUBLE_ROUNDING
BEGIN_LONG_DOUBLE_ROUNDING ();
- { /* NaN. */
- int exp = -9999;
- long double mantissa;
- x = NaNl ();
- mantissa = frexpl (x, &exp);
- ASSERT (isnanl (mantissa));
- }
-
- { /* Positive infinity. */
- int exp = -9999;
- long double mantissa;
- x = Infinityl ();
- mantissa = frexpl (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Negative infinity. */
- int exp = -9999;
- long double mantissa;
- x = - Infinityl ();
- mantissa = frexpl (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Positive zero. */
- int exp = -9999;
- long double mantissa;
- x = 0.0L;
- mantissa = frexpl (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (!signbit (mantissa));
- }
-
- { /* Negative zero. */
- int exp = -9999;
- long double mantissa;
- x = minus_zerol;
- mantissa = frexpl (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (signbit (mantissa));
- }
-
- for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5L);
- }
- for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5L);
- }
-
- for (i = 1, x = -1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5L);
- }
- for (i = 1, x = -1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x < 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5L);
- }
-
- for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505L);
- }
- for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa >= 0.5L);
- ASSERT (mantissa < 1.0L);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
-
- for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025L);
- }
- for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i || exp == i + 1);
- ASSERT (mantissa >= 0.5L);
- ASSERT (mantissa < 1.0L);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
+ test_function ();
return 0;
}
diff --git a/gl/tests/test-math.c b/gl/tests/test-math.c
index f6e61a782a..25be63a54d 100644
--- a/gl/tests/test-math.c
+++ b/gl/tests/test-math.c
@@ -25,6 +25,23 @@
choke me
#endif
+#ifndef HUGE_VALF
+# error HUGE_VALF should be defined
+choke me
+#endif
+
+#ifndef HUGE_VAL
+# error HUGE_VAL should be defined
+choke me
+#endif
+
+#ifndef HUGE_VALL
+# error HUGE_VALL should be defined
+choke me
+#endif
+
+#include "macros.h"
+
#if 0
/* Check that NAN expands into a constant expression. */
static float n = NAN;
@@ -34,7 +51,17 @@ static float n = NAN;
This is a separate function because IRIX 6.5 "cc -O" miscompiles an
'x == x' test. */
static int
-numeric_equal (double x, double y)
+numeric_equalf (float x, float y)
+{
+ return x == y;
+}
+static int
+numeric_equald (double x, double y)
+{
+ return x == y;
+}
+static int
+numeric_equall (long double x, long double y)
{
return x == y;
}
@@ -44,10 +71,16 @@ main (void)
{
double d = NAN;
double zero = 0.0;
- if (numeric_equal (d, d))
- return 1;
+ ASSERT (!numeric_equald (d, d));
+
d = HUGE_VAL;
- if (!numeric_equal (d, 1.0 / zero))
- return 1;
+ ASSERT (numeric_equald (d, 1.0 / zero));
+
+ ASSERT (numeric_equalf (HUGE_VALF, HUGE_VALF + HUGE_VALF));
+
+ ASSERT (numeric_equald (HUGE_VAL, HUGE_VAL + HUGE_VAL));
+
+ ASSERT (numeric_equall (HUGE_VALL, HUGE_VALL + HUGE_VALL));
+
return 0;
}