gnulib.git
12 years agoNew module 'log1pl-ieee'.
Bruno Haible [Sat, 10 Mar 2012 23:54:18 +0000 (00:54 +0100)]
New module 'log1pl-ieee'.

* modules/log1pl-ieee: New file.

12 years agoTests for module 'log1p-ieee'.
Bruno Haible [Sat, 10 Mar 2012 23:54:06 +0000 (00:54 +0100)]
Tests for module 'log1p-ieee'.

* modules/log1p-ieee-tests: New file.
* tests/test-log1p-ieee.c: New file.

12 years agoNew module 'log1p-ieee'.
Bruno Haible [Sat, 10 Mar 2012 23:53:56 +0000 (00:53 +0100)]
New module 'log1p-ieee'.

* modules/log1p-ieee: New file.

12 years agoTests for module 'log1pf-ieee'.
Bruno Haible [Sat, 10 Mar 2012 23:53:46 +0000 (00:53 +0100)]
Tests for module 'log1pf-ieee'.

* modules/log1pf-ieee-tests: New file.
* tests/test-log1pf-ieee.c: New file.
* tests/test-log1p-ieee.h: New file.

12 years agoNew module 'log1pf-ieee'.
Bruno Haible [Sat, 10 Mar 2012 23:53:32 +0000 (00:53 +0100)]
New module 'log1pf-ieee'.

* modules/log1pf-ieee: New file.

12 years agoTests for module 'log1pl'.
Bruno Haible [Sat, 10 Mar 2012 23:49:04 +0000 (00:49 +0100)]
Tests for module 'log1pl'.

* modules/log1pl-tests: New file.
* tests/test-log1pl.c: New file.

12 years agoNew module 'log1pl'.
Bruno Haible [Sat, 10 Mar 2012 23:48:36 +0000 (00:48 +0100)]
New module 'log1pl'.

* lib/math.in.h (log1pl): New declaration.
* lib/log1pl.c: New file.
* m4/log1pl.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether log1pl is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PL, HAVE_LOG1PL.
* modules/math (Makefile.am): Substitute GNULIB_LOG1PL, HAVE_LOG1PL.
* modules/log1pl: New file.
* tests/test-math-c++.cc: Check the declaration of log1pl.
* doc/posix-functions/log1pl.texi: Mention the new module.

12 years agoTests for module 'log1pf'.
Bruno Haible [Sat, 10 Mar 2012 23:44:50 +0000 (00:44 +0100)]
Tests for module 'log1pf'.

* modules/log1pf-tests: New file.
* tests/test-log1pf.c: New file.

12 years agoNew module 'log1pf'.
Bruno Haible [Sat, 10 Mar 2012 21:28:49 +0000 (22:28 +0100)]
New module 'log1pf'.

* lib/math.in.h (log1pf): New declaration.
* lib/log1pf.c: New file.
* m4/log1pf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF,
REPLACE_LOG1PF.
* modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF,
REPLACE_LOG1PF.
* modules/log1pf: New file.
* tests/test-math-c++.cc: Check the declaration of log1pf.
* doc/posix-functions/log1pf.texi: Mention the new module.

12 years agolog1p tests: More tests.
Bruno Haible [Sat, 10 Mar 2012 18:58:51 +0000 (19:58 +0100)]
log1p tests: More tests.

* tests/test-log1p.h: New file.
* modules/log1p-tests (Files): Add tests/test-log1p.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_log1p_SOURCES.
* tests/test-log1p.c: Include <float.h> and test-log1p.h.
(main): Invoke test_function.

12 years agolog1p: Provide replacement for Minix and MSVC.
Bruno Haible [Sat, 10 Mar 2012 18:54:08 +0000 (19:54 +0100)]
log1p: Provide replacement for Minix and MSVC.

* lib/math.in.h (log1p): New declaration.
* lib/log1p.c: New file.
* m4/log1p.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P.
* modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P.
* modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4.
(Depends-on): Add math, isnand, log, round.
(configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if
HAVE_LOG1P is 0.
* tests/test-math-c++.cc: Check the declaration of log1p.
* doc/posix-functions/log1p.texi: Mention the replacement.

12 years agoexpm1: Tiny doc fix.
Bruno Haible [Sat, 10 Mar 2012 23:59:57 +0000 (00:59 +0100)]
expm1: Tiny doc fix.

12 years agomath tests: Small simplification.
Bruno Haible [Sat, 10 Mar 2012 23:38:11 +0000 (00:38 +0100)]
math tests: Small simplification.

* tests/test-exp.h (test_function): Use the same err_bound for
'double' on platforms with sizeof (long double) == sizeof (double)
than on platforms with sizeof (long double) > sizeof (double).
* tests/test-exp2.h (test_function): Likewise.
* tests/test-expm1.h (test_function): Likewise.
* tests/test-log.h (test_function): Likewise.

12 years agolog tests: Add a comment.
Bruno Haible [Sat, 10 Mar 2012 18:11:48 +0000 (19:11 +0100)]
log tests: Add a comment.

12 years agoFix some comments.
Bruno Haible [Sat, 10 Mar 2012 18:01:00 +0000 (19:01 +0100)]
Fix some comments.

* lib/expl.c: Fix an ambiguous comment.
* lib/expm1.c: Likewise.
* lib/expm1l.c: Likewise.
* lib/exp2.c: Likewise.
* lib/exp2l.c: Likewise.

12 years agoregex: allow inclusion of <regex.h> before <limits.h>
Paul Eggert [Sat, 10 Mar 2012 20:15:44 +0000 (12:15 -0800)]
regex: allow inclusion of <regex.h> before <limits.h>

Without this patch, portable programs had to include <limits.h> before
<regex.h> if they wanted a consistent value for RE_DUP_MAX.
I ran into this problem with a test version of GNU grep on Solaris 8.
* lib/regex.h: Include <limits.h> if _REGEX_INCLUDE_LIMITS_H.
This is done conditionally so that this change can be merged
back to glibc.
* m4/regex.m4 (gl_REGEX): Define _REGEX_INCLUDE_LIMITS_H if
using the included regex.

12 years agofts: depend on fdopendir
Paul Eggert [Sat, 10 Mar 2012 20:10:17 +0000 (12:10 -0800)]
fts: depend on fdopendir

* modules/fts (Depends-on): Depend on fdopendir.  This is needed
on Solaris 8, at least, since it lacks fdopendir.  Evidently the
problem was introduced when fdopendir was split out.

12 years agoRemove unused variables.
Bruno Haible [Sat, 10 Mar 2012 15:23:24 +0000 (16:23 +0100)]
Remove unused variables.

* m4/fmodf.m4 (gl_FUNC_FMODF): Remove unused variable 'i'.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.

12 years agoisnanf-nolibm: Fix last commit.
Bruno Haible [Sat, 10 Mar 2012 15:53:36 +0000 (16:53 +0100)]
isnanf-nolibm: Fix last commit.

* lib/isnanf-nolibm.h [IRIX]: Don't include <ieeefp.h>. Declare isnanf.

12 years agoisnanf-nolibm: Make it work on IRIX 6.5 with cc.
Bruno Haible [Sat, 10 Mar 2012 15:07:42 +0000 (16:07 +0100)]
isnanf-nolibm: Make it work on IRIX 6.5 with cc.

* lib/isnanf-nolibm.h [IRIX]: Include <ieeefp.h>.

12 years agologf-ieee: Work around test failure on NetBSD 5.1.
Bruno Haible [Sat, 10 Mar 2012 15:05:56 +0000 (16:05 +0100)]
logf-ieee: Work around test failure on NetBSD 5.1.

* m4/logf-ieee.m4: New file.
* m4/logf.m4 (gl_FUNC_LOGF): If gl_FUNC_LOGF_IEEE is present, test
whether logf works with a negative argument. Replace it if not.
* lib/logf.c (logf): For negative arguments, return NaN.
* modules/logf-ieee (Files): Add m4/logf-ieee.m4.
(configure.ac): Invoke gl_FUNC_LOGF_IEEE.
* doc/posix-functions/logf.texi: Mention the logf-ieee module.

12 years agologf-ieee: Work around test failure on Solaris 9.
Bruno Haible [Sat, 10 Mar 2012 12:54:34 +0000 (13:54 +0100)]
logf-ieee: Work around test failure on Solaris 9.

* modules/logf-ieee (Depends-on): Add log-ieee.
(configure.ac): Require gl_FUNC_LOGF.

12 years agolog-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
Bruno Haible [Sat, 10 Mar 2012 11:26:57 +0000 (12:26 +0100)]
log-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.

* m4/log-ieee.m4: New file.
* m4/log.m4 (gl_FUNC_LOG): If gl_FUNC_LOG_IEEE is present, test whether
log works with a negative argument. Replace it if not.
* lib/log.c (log): For negative arguments, return NaN.
* modules/log-ieee (Files): Add m4/log-ieee.m4.
(configure.ac): Invoke gl_FUNC_LOG_IEEE.
* doc/posix-functions/log.texi: Mention the log-ieee module.

12 years agoTests for module 'logl-ieee'.
Bruno Haible [Sat, 10 Mar 2012 09:59:20 +0000 (10:59 +0100)]
Tests for module 'logl-ieee'.

* modules/logl-ieee-tests: New file.
* tests/test-logl-ieee.c: New file.

12 years agoNew module 'logl-ieee'.
Bruno Haible [Sat, 10 Mar 2012 09:59:05 +0000 (10:59 +0100)]
New module 'logl-ieee'.

* modules/logl-ieee: New file.

12 years agoTests for module 'log-ieee'.
Bruno Haible [Sat, 10 Mar 2012 09:58:53 +0000 (10:58 +0100)]
Tests for module 'log-ieee'.

* modules/log-ieee-tests: New file.
* tests/test-log-ieee.c: New file.

12 years agoNew module 'log-ieee'.
Bruno Haible [Sat, 10 Mar 2012 09:58:40 +0000 (10:58 +0100)]
New module 'log-ieee'.

* modules/log-ieee: New file.

12 years agoTests for module 'logf-ieee'.
Bruno Haible [Sat, 10 Mar 2012 09:58:28 +0000 (10:58 +0100)]
Tests for module 'logf-ieee'.

* modules/logf-ieee-tests: New file.
* tests/test-logf-ieee.c: New file.
* tests/test-log-ieee.h: New file.

12 years agoNew module 'logf-ieee'.
Bruno Haible [Sat, 10 Mar 2012 09:58:13 +0000 (10:58 +0100)]
New module 'logf-ieee'.

* modules/logf-ieee: New file.

12 years agolog: Fix bug introduced on 2012-03-09.
Bruno Haible [Sat, 10 Mar 2012 10:33:29 +0000 (11:33 +0100)]
log: Fix bug introduced on 2012-03-09.

* m4/log.m4 (gl_FUNC_LOG): Require gl_MATH_H_DEFAULTS.

12 years agotimer-time: link explicitly with pthreads on glibc
Pádraig Brady [Tue, 6 Mar 2012 15:02:40 +0000 (15:02 +0000)]
timer-time: link explicitly with pthreads on glibc

To support static linking we need to explicitly
specify the pthreads library which is referenced
(but not used on modern Linux kernels at least).

* m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
when newer GLIBC is detected as that contains
the pthread emulation.
* modules/timer-time: Depend on threadlib to
pull in the appropriate library to link

12 years agolog* tests: More tests.
Bruno Haible [Sat, 10 Mar 2012 09:56:05 +0000 (10:56 +0100)]
log* tests: More tests.

* tests/test-log.h: New file.
* tests/test-log.c: Include <float.h>, minus-zero.h, test-log.h.
(main): Invoke test_function.
* tests/test-logf.c: Include <float.h>, minus-zero.h, test-log.h.
(main): Invoke test_function.
* tests/test-logl.c: Include <float.h>, minus-zero.h, test-log.h.
(main): Invoke test_function.
* modules/log-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
tests/randomd.c.
(Makefile.am): Add randomd.c to test_log_SOURCES.
* modules/logf-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
tests/randomf.c.
(Makefile.am): Add randomf.c to test_logf_SOURCES.
* modules/logl-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_logl_SOURCES.

12 years agologl: Work around OSF/1 5.1 bug.
Bruno Haible [Sat, 10 Mar 2012 01:48:48 +0000 (02:48 +0100)]
logl: Work around OSF/1 5.1 bug.

* lib/math.in.h (logl): Override if REPLACE_LOGL is 1.
* lib/logl.c (logl): If logf exists, use it and provide just the
workaround.
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): New macro.
(gl_FUNC_LOGL): Invoke it. Set REPLACE_LOGL.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGL.
* modules/math (Makefile.am): Substitute REPLACE_LOGL.
* modules/logl (configure.ac): Consider REPLACE_LOGL.
(Depends-on): Update conditions.
* doc/posix-functions/logl.texi: Mention the OSF/1 5.1 problem.

12 years agologf: Work around OSF/1 5.1 bug.
Bruno Haible [Fri, 9 Mar 2012 23:55:48 +0000 (00:55 +0100)]
logf: Work around OSF/1 5.1 bug.

* lib/math.in.h (logf): Override if REPLACE_LOGF is 1.
* lib/logf.c (logf): If logf exists, use it and provide just the
workaround.
* m4/logf.m4 (gl_FUNC_LOGF_WORKS): New macro.
(gl_FUNC_LOGF): Invoke it. Set REPLACE_LOGF.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGF.
* modules/math (Makefile.am): Substitute REPLACE_LOGF.
* modules/logf (configure.ac): Consider REPLACE_LOGF.
(Depends-on): Update conditions.
* doc/posix-functions/logf.texi: Mention the OSF/1 5.1 problem.

12 years agolog: Work around OSF/1 5.1 bug.
Bruno Haible [Fri, 9 Mar 2012 22:55:13 +0000 (23:55 +0100)]
log: Work around OSF/1 5.1 bug.

* lib/math.in.h (log): New declaration.
* lib/log.c: New file.
* m4/log.m4 (gl_FUNC_LOG_WORKS): New macro.
(gl_FUNC_LOG): Invoke it. Set REPLACE_LOG.
* m4/math_h.m4 (gl_MATH_H): Test whether log is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG, REPLACE_LOG.
* modules/math (Makefile.am): Substitute GNULIB_LOG, REPLACE_LOG.
* modules/log (Files): Add lib/log.c.
(Depends-on): Add math.
(configure.ac): If REPLACE_LOG is 1, compile an override.
* tests/test-math-c++.cc: Check the declaration of log.
* doc/posix-functions/log.texi: Mention the OSF/1 5.1 problem.

12 years agoreadtokens.c: adjust wording in a comment
Jim Meyering [Fri, 9 Mar 2012 11:01:45 +0000 (12:01 +0100)]
readtokens.c: adjust wording in a comment

* lib/readtokens.c: Insert omitted "that" in a comment.

12 years agomodechange: add notations +40, 00440, etc.
Paul Eggert [Fri, 9 Mar 2012 02:05:51 +0000 (18:05 -0800)]
modechange: add notations +40, 00440, etc.

* lib/modechange.c (mode_compile): Support new notations
+40, -40, =440, 00440.  See <http://debbugs.gnu.org/8391>.

12 years agoexp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5.
Bruno Haible [Fri, 9 Mar 2012 01:14:26 +0000 (02:14 +0100)]
exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5.

* m4/exp2l-ieee.m4: New file.
* m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present,
test whether exp2l works with a NaN argument and with a negative
infinity argument. Replace it if not.
* lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L.
* modules/math (Makefile.am): Substitute REPLACE_EXP2L.
* modules/exp2l (configure.ac): Consider REPLACE_EXP2L.
(Depends-on): Update conditions.
* modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4.
(configure.ac): Invoke gl_FUNC_EXP2L_IEEE.
* doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.

12 years agoTests for module 'exp2l-ieee'.
Bruno Haible [Fri, 9 Mar 2012 00:20:38 +0000 (01:20 +0100)]
Tests for module 'exp2l-ieee'.

* modules/exp2l-ieee-tests: New file.
* tests/test-exp2l-ieee.c: New file.

12 years agoNew module 'exp2l-ieee'.
Bruno Haible [Fri, 9 Mar 2012 00:20:22 +0000 (01:20 +0100)]
New module 'exp2l-ieee'.

* modules/exp2l-ieee: New file.

12 years agoTests for module 'exp2-ieee'.
Bruno Haible [Fri, 9 Mar 2012 00:20:03 +0000 (01:20 +0100)]
Tests for module 'exp2-ieee'.

* modules/exp2-ieee-tests: New file.
* tests/test-exp2-ieee.c: New file.

12 years agoNew module 'exp2-ieee'.
Bruno Haible [Fri, 9 Mar 2012 00:19:50 +0000 (01:19 +0100)]
New module 'exp2-ieee'.

* modules/exp2-ieee: New file.

12 years agoTests for module 'exp2f-ieee'.
Bruno Haible [Fri, 9 Mar 2012 00:19:36 +0000 (01:19 +0100)]
Tests for module 'exp2f-ieee'.

* modules/exp2f-ieee-tests: New file.
* tests/test-exp2f-ieee.c: New file.
* tests/test-exp2-ieee.h: New file.

12 years agoNew module 'exp2f-ieee'.
Bruno Haible [Fri, 9 Mar 2012 00:19:18 +0000 (01:19 +0100)]
New module 'exp2f-ieee'.

* modules/exp2f-ieee: New file.

12 years agoTests for module 'exp2l'.
Bruno Haible [Fri, 9 Mar 2012 00:14:09 +0000 (01:14 +0100)]
Tests for module 'exp2l'.

* modules/exp2l-tests: New file.
* tests/test-exp2l.c: New file.

12 years agoNew module 'exp2l'.
Bruno Haible [Fri, 9 Mar 2012 00:13:40 +0000 (01:13 +0100)]
New module 'exp2l'.

* lib/math.in.h (exp2l): New declaration.
* lib/exp2l.c: New file.
* lib/expl-table.c: New file, extracted from lib/expl.c.
* lib/expl.c (gl_expl_table): New declaration.
(expl): Remove expl_table. Update reference.
* m4/exp2l.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether exp2l is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2L, HAVE_DECL_EXP2L.
* modules/math (Makefile.am): Substitute GNULIB_EXP2L, HAVE_DECL_EXP2L.
* modules/exp2l: New file.
* modules/expl (Files): Add lib/expl-table.c.
(configure.ac): Compile also expl-table.c.
* tests/test-math-c++.cc: Check the declaration of exp2l.
* doc/posix-functions/exp2l.texi: Mention the new module and the IRIX
problem.

12 years agoTests for module 'exp2f'.
Bruno Haible [Thu, 8 Mar 2012 19:25:41 +0000 (20:25 +0100)]
Tests for module 'exp2f'.

* modules/exp2f-tests: New file.
* tests/test-exp2f.c: New file.

12 years agoNew module 'exp2f'.
Bruno Haible [Thu, 8 Mar 2012 19:24:53 +0000 (20:24 +0100)]
New module 'exp2f'.

* lib/math.in.h (exp2f): New declaration.
* lib/exp2f.c: New file.
* m4/exp2f.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether exp2f is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2F, HAVE_DECL_EXP2F.
* modules/math (Makefile.am): Substitute GNULIB_EXP2F, HAVE_DECL_EXP2F.
* modules/exp2f: New file.
* tests/test-math-c++.cc: Check the declaration of exp2f.
* doc/posix-functions/exp2f.texi: Mention the new module and the
IRIX problem.

12 years agoTests for module 'exp2'.
Bruno Haible [Wed, 7 Mar 2012 02:29:46 +0000 (03:29 +0100)]
Tests for module 'exp2'.

* modules/exp2-tests: New file.
* tests/test-exp2.c: New file.
* tests/test-exp2.h: New file.

12 years agoNew module 'exp2'.
Bruno Haible [Wed, 7 Mar 2012 02:29:32 +0000 (03:29 +0100)]
New module 'exp2'.

* lib/math.in.h (exp2): New declaration.
* lib/exp2.c: New file.
* m4/exp2.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2,
REPLACE_EXP2.
* modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2,
REPLACE_EXP2.
* modules/exp2: New file.
* tests/test-math-c++.cc: Check the declaration of exp2.
* doc/posix-functions/exp2.texi: Mention the new module and the IRIX
and OpenBSD problems.

12 years agosavedir: fix comment typo
Paul Eggert [Thu, 8 Mar 2012 22:39:16 +0000 (14:39 -0800)]
savedir: fix comment typo

* lib/savedir.c (savedirstream): Fix typo in comment.

12 years agotest-readtokens.c: use const; remove unwarranted cast
Bruno Haible [Thu, 8 Mar 2012 11:04:16 +0000 (12:04 +0100)]
test-readtokens.c: use const; remove unwarranted cast

* tests/test-readtokens.c: Declare delim to be const, to avoid a cast.

12 years agoautoupdate
Karl Berry [Thu, 8 Mar 2012 15:39:07 +0000 (07:39 -0800)]
autoupdate

12 years agofmal: Avoid compilation error on AIX.
Bruno Haible [Thu, 8 Mar 2012 11:35:39 +0000 (12:35 +0100)]
fmal: Avoid compilation error on AIX.

* lib/math.in.h (fmal): Undefine macro before declaration. Needed on
AIX 5.2..7.1.

12 years agofma, fmaf, fmal: Override undeclared system functions on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 11:33:36 +0000 (12:33 +0100)]
fma, fmaf, fmal: Override undeclared system functions on IRIX 6.5.

* m4/fma.m4 (gl_FUNC_FMA): If fma() exists but is not declared,
arrange to set REPLACE_FMA=1, not HAVE_FMA=0.
* m4/fmaf.m4 (gl_FUNC_FMAF): If fmaf() exists but is not declared,
arrange to set REPLACE_FMAF=1, not HAVE_FMAF=0.
* m4/fmal.m4 (gl_FUNC_FMAL): If fmal() exists but is not declared,
arrange to set REPLACE_FMAL=1, not HAVE_FMAL=0.

12 years agoremainderf: Override buggy system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 11:02:35 +0000 (12:02 +0100)]
remainderf: Override buggy system function on IRIX 6.5.

* m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): New macro.
(gl_FUNC_REMAINDERF): Invoke it. Don't assume remainderf() is declared
when it exists.
* doc/posix-functions/remainderf.texi: Mention the IRIX problems.

12 years agotest-readtokens.c: avoid const-related compilation warnings
Jim Meyering [Thu, 8 Mar 2012 07:25:08 +0000 (08:25 +0100)]
test-readtokens.c: avoid const-related compilation warnings

* tests/test-readtokens.c: Avoid const-related compilation warnings.

12 years agofrexp-nolibm, frexpl-nolibm tests: Fix bug introduced on 2012-03-03.
Jim Meyering [Thu, 8 Mar 2012 03:23:53 +0000 (04:23 +0100)]
frexp-nolibm, frexpl-nolibm tests: Fix bug introduced on 2012-03-03.

* modules/frexp-nolibm-tests (Files): Add tests/test-frexp.h,
tests/randomd.c.
(Makefile.am): Add randomd.c to test_frexp_nolibm_SOURCES.
* modules/frexpl-nolibm-tests (Files): Add tests/test-frexp.h,
tests/randoml.c.
(Makefile.am): Add randoml.c to test_frexpl_nolibm_SOURCES.

12 years agoexpm1l: Avoid compilation error on AIX.
Bruno Haible [Thu, 8 Mar 2012 03:02:53 +0000 (04:02 +0100)]
expm1l: Avoid compilation error on AIX.

* lib/math.in.h (expm1l): Undefine macro before declaration. Needed on
AIX 5.2..7.1.

12 years agoexpm1l: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 03:01:51 +0000 (04:01 +0100)]
expm1l: Don't override undeclared system function on IRIX 6.5.

* lib/math.in.h (expm1l): Test HAVE_DECL_EXPM1L, not HAVE_EXPM1L.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Don't assume expm1l() is declared when
it exists. Set HAVE_DECL_EXPM1L.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_EXPM1L, not
HAVE_EXPM1L.
* modules/math (Makefile.am): Substitute HAVE_DECL_EXPM1L, not
HAVE_EXPM1L.
* doc/posix-functions/expm1l.texi: Mention missing declaration problem.

12 years agoremainderl: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 02:21:38 +0000 (03:21 +0100)]
remainderl: Don't override undeclared system function on IRIX 6.5.

* lib/math.in.h (remainderl): Test HAVE_DECL_REMAINDERL, not
HAVE_REMAINDERL.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Don't assume remainderl() is
declared when it exists. Set HAVE_DECL_REMAINDERL.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_REMAINDERL,
not HAVE_REMAINDERL.
* modules/math (Makefile.am): Substitute HAVE_DECL_REMAINDERL, not
HAVE_REMAINDERL.
* doc/posix-functions/remainderl.texi: Mention missing declaration
problem.

12 years agorintf: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 01:27:05 +0000 (02:27 +0100)]
rintf: Don't override undeclared system function on IRIX 6.5.

* lib/math.in.h (rintf): Test HAVE_DECL_RINTF, not HAVE_RINTF.
* m4/rintf.m4 (gl_FUNC_RINTF): Don't assume rintf() is declared when it
exists. Set HAVE_DECL_RINTF.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_RINTF, not
HAVE_RINTF.
* modules/math (Makefile.am): Substitute HAVE_DECL_RINTF, not
HAVE_RINTF.
* doc/posix-functions/rintf.texi: Mention missing declaration problem.

12 years agoroundl: Avoid compilation error on AIX.
Bruno Haible [Thu, 8 Mar 2012 02:17:20 +0000 (03:17 +0100)]
roundl: Avoid compilation error on AIX.

* lib/math.in.h (roundl): Undefine macro before declaration. Needed on
AIX 5.2..7.1.

12 years agoroundl: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 01:06:10 +0000 (02:06 +0100)]
roundl: Don't override undeclared system function on IRIX 6.5.

* m4/roundl.m4 (gl_FUNC_ROUNDL): Search for roundl() in the libraries
also when it is not declared. Set HAVE_ROUNDL. For replacement code,
test HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
* modules/roundl (configure.ac): For replacement code, test
HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
(Depends-on): Update conditions.
* doc/posix-functions/roundl.texi: Mention the IRIX problem.

12 years agoroundf: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 00:55:40 +0000 (01:55 +0100)]
roundf: Don't override undeclared system function on IRIX 6.5.

* m4/roundf.m4 (gl_FUNC_ROUNDF): Search for roundf() in the libraries
also when it is not declared. Set HAVE_ROUNDF. For replacement code,
test HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
* modules/roundf (configure.ac): For replacement code, test
HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
(Depends-on): Update conditions.
* modules/roundf-ieee (Depends-on): Update conditions.
* doc/posix-functions/roundf.texi: Mention the IRIX problem.

12 years agoround: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Thu, 8 Mar 2012 00:26:03 +0000 (01:26 +0100)]
round: Don't override undeclared system function on IRIX 6.5.

* m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an optional third
argument.
* m4/round.m4 (gl_FUNC_ROUND): Search for round() in the libraries
also when it is not declared. Set HAVE_ROUND. For replacement code,
test HAVE_ROUND, not HAVE_DECL_ROUND.
* modules/round (configure.ac): For replacement code, test HAVE_ROUND,
not HAVE_DECL_ROUND.
(Depends-on): Update conditions.
* modules/round-ieee (Depends-on): Update conditions.
* doc/posix-functions/round.texi: Mention the IRIX problem.

12 years agocopysignf: Don't override undeclared system function on IRIX 6.5.
Bruno Haible [Wed, 7 Mar 2012 23:42:49 +0000 (00:42 +0100)]
copysignf: Don't override undeclared system function on IRIX 6.5.

* lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
HAVE_COPYSIGNF.
* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
declared when it exists. Set HAVE_DECL_COPYSIGNF.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
not HAVE_COPYSIGNF.
* modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
HAVE_COPYSIGNF.
* doc/posix-functions/copysignf.texi: Mention missing declaration
problem.

12 years agoreadtokens: add tests
Jim Meyering [Wed, 7 Mar 2012 11:16:30 +0000 (12:16 +0100)]
readtokens: add tests

* modules/readtokens-tests: New file.
* tests/test-readtokens.c: New file.
* tests/test-readtokens.sh: New file.

12 years agoquotearg: the module must now include quote.h
Jim Meyering [Wed, 7 Mar 2012 14:44:33 +0000 (15:44 +0100)]
quotearg: the module must now include quote.h

With commit v0.0-7133-g6417476, quotearg.c includes "quote.h".
So must the module.
* modules/quotearg (Files): Add quote.h.

12 years agoreadtokens: avoid core dumps with unusual calling patterns
Paul Eggert [Tue, 6 Mar 2012 23:19:24 +0000 (15:19 -0800)]
readtokens: avoid core dumps with unusual calling patterns

Reported by Xu Zhongxing in <http://debbugs.gnu.org/10953>.
* lib/readtokens.c: Include limits.h.
(word, bits_per_word, get_nth_bit, set_nth_bit): New.
(readtoken): Don't cache the delimiters; the cache code was buggy
if !delim && saved_delim, or if the new n_delim differs from the old.
Also, it wasn't thread-safe.

12 years agoquote: Adhere to common module description layout.
Bruno Haible [Wed, 7 Mar 2012 10:36:37 +0000 (11:36 +0100)]
quote: Adhere to common module description layout.

* modules/quote (Makefile.am): Add back empty section.

12 years agoquote: fuse into quotearg
Akim Demaille [Wed, 7 Mar 2012 07:35:28 +0000 (23:35 -0800)]
quote: fuse into quotearg

This patch is made for the benefit of Bison.
quote does not leave the choice of the quoting style to the user.
quoting_style provides poor customizability, yet quoting_options,
which is very rich, is hidden inside quotearg.c.  So in order to
allow quote customization, move its implementation to quotearg.c.
* lib/quote.c: Remove.
* modules/quote: Adjust.
* lib/quotearg.c (quoting_options_from_style): Fix a compiler
warning: provide all the members of literal structs.
(quote_quoting_options): New.
(quote, quote_n): Import implementation from quote.c.
* lib/quote.h: Import the comments from quote.c.
(quote_quoting_options): New.

12 years agoTests for module 'expm1l-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:50:22 +0000 (00:50 +0100)]
Tests for module 'expm1l-ieee'.

* modules/expm1l-ieee-tests: New file.
* tests/test-expm1l-ieee.c: New file.

12 years agoNew module 'expm1l-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:49:52 +0000 (00:49 +0100)]
New module 'expm1l-ieee'.

* modules/expm1l-ieee: New file.

12 years agoTests for module 'expm1f-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:43:17 +0000 (00:43 +0100)]
Tests for module 'expm1f-ieee'.

* modules/expm1f-ieee-tests: New file.
* tests/test-expm1f-ieee.c: New file.

12 years agoNew module 'expm1f-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:42:42 +0000 (00:42 +0100)]
New module 'expm1f-ieee'.

* modules/expm1f-ieee: New file.

12 years agoTests for module 'expm1-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:39:56 +0000 (00:39 +0100)]
Tests for module 'expm1-ieee'.

* modules/expm1-ieee-tests: New file.
* tests/test-expm1-ieee.c: New file.
* tests/test-expm1-ieee.h: New file.

12 years agoNew module 'expm1-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:38:50 +0000 (00:38 +0100)]
New module 'expm1-ieee'.

* modules/expm1-ieee: New file.
* m4/expm1-ieee.m4: New file.
* m4/expm1.m4 (gl_FUNC_EXPM1): If gl_FUNC_EXPM1_IEEE is present, test
whether expm1 works with a minus zero argument. Replace it if not.
* lib/math.in.h (expm1): Override if REPLACE_EXPM1 is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1.
* modules/math (Makefile.am): Substitute REPLACE_EXPM1.
* modules/expm1 (configure.ac): Consider REPLACE_EXPM1.
(Depends-on): Update conditions.
* doc/posix-functions/expm1.texi: Mention the expm1-ieee module and the
AIX problem.

12 years agoWork around expm1f bug on IRIX 6.5.
Bruno Haible [Tue, 6 Mar 2012 22:25:51 +0000 (23:25 +0100)]
Work around expm1f bug on IRIX 6.5.

* lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1.
* m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro.
(gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does
not work.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F.
* modules/math (Makefile.am): Substitute REPLACE_EXPM1F.
* modules/expm1f (configure.ac): Consider REPLACE_EXPM1F.
(Depends-on): Update conditions.
* doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.

12 years agoTests for module 'expm1l'.
Bruno Haible [Tue, 6 Mar 2012 20:56:00 +0000 (21:56 +0100)]
Tests for module 'expm1l'.

* modules/expm1l-tests: New file.
* tests/test-expm1l.c: New file.

12 years agoNew module 'expm1l'.
Bruno Haible [Tue, 6 Mar 2012 20:55:34 +0000 (21:55 +0100)]
New module 'expm1l'.

* lib/math.in.h (expm1l): New declaration.
* lib/expm1l.c: New file.
* m4/expm1l.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether expm1l is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1L, HAVE_EXPM1L.
* modules/math (Makefile.am): Substitute GNULIB_EXPM1L, HAVE_EXPM1L.
* modules/expm1l: New file.
* tests/test-math-c++.cc: Check the declaration of expm1l.
* doc/posix-functions/expm1l.texi: Mention the new module.

12 years agoTests for module 'expm1f'.
Bruno Haible [Tue, 6 Mar 2012 20:26:12 +0000 (21:26 +0100)]
Tests for module 'expm1f'.

* modules/expm1f-tests: New file.
* tests/test-expm1f.c: New file.

12 years agoNew module 'expm1f'.
Bruno Haible [Tue, 6 Mar 2012 20:24:28 +0000 (21:24 +0100)]
New module 'expm1f'.

* lib/math.in.h (expm1f): New declaration.
* lib/expm1f.c: New file.
* m4/expm1f.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether expm1f is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1F, HAVE_EXPM1F.
* modules/math (Makefile.am): Substitute GNULIB_EXPM1F, HAVE_EXPM1F.
* modules/expm1f: New file.
* tests/test-math-c++.cc: Check the declaration of expm1f.
* doc/posix-functions/expm1f.texi: Mention the new module.

12 years agoTests for module 'expm1'.
Bruno Haible [Tue, 6 Mar 2012 20:02:17 +0000 (21:02 +0100)]
Tests for module 'expm1'.

* modules/expm1-tests: New file.
* tests/test-expm1.c: New file.
* tests/test-expm1.h: New file.

12 years agoNew module 'expm1'.
Bruno Haible [Tue, 6 Mar 2012 16:55:54 +0000 (17:55 +0100)]
New module 'expm1'.

* lib/math.in.h (expm1): New declaration.
* lib/expm1.c: New file.
* m4/expm1.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether expm1 is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1, HAVE_EXPM1.
* modules/math (Makefile.am): Substitute GNULIB_EXPM1, HAVE_EXPM1.
* modules/expm1: New file.
* tests/test-math-c++.cc: Check the declaration of expm1.
* doc/posix-functions/expm1.texi: Mention the new module.

12 years agomath: Ensure declarations of math functions.
Bruno Haible [Tue, 6 Mar 2012 15:24:16 +0000 (16:24 +0100)]
math: Ensure declarations of math functions.

* modules/acosf (Depends-on): Add 'extensions'.
* modules/asinf (Depends-on): Likewise.
* modules/atan2f (Depends-on): Likewise.
* modules/atanf (Depends-on): Likewise.
* modules/cbrt (Depends-on): Likewise.
* modules/cbrtf (Depends-on): Likewise.
* modules/cbrtl (Depends-on): Likewise.
* modules/copysignf (Depends-on): Likewise.
* modules/copysignl (Depends-on): Likewise.
* modules/cosf (Depends-on): Likewise.
* modules/coshf (Depends-on): Likewise.
* modules/expf (Depends-on): Likewise.
* modules/fabsf (Depends-on): Likewise.
* modules/fabsl (Depends-on): Likewise.
* modules/fmaf (Depends-on): Likewise.
* modules/fmal (Depends-on): Likewise.
* modules/fmodf (Depends-on): Likewise.
* modules/fmodl (Depends-on): Likewise.
* modules/frexpf (Depends-on): Likewise.
* modules/frexpl (Depends-on): Likewise.
* modules/hypot (Depends-on): Likewise.
* modules/hypotf (Depends-on): Likewise.
* modules/hypotl (Depends-on): Likewise.
* modules/ldexpf (Depends-on): Likewise.
* modules/ldexpl (Depends-on): Likewise.
* modules/log10f (Depends-on): Likewise.
* modules/log10l (Depends-on): Likewise.
* modules/log1p (Depends-on): Likewise.
* modules/logb (Depends-on): Likewise.
* modules/logf (Depends-on): Likewise.
* modules/modff (Depends-on): Likewise.
* modules/modfl (Depends-on): Likewise.
* modules/powf (Depends-on): Likewise.
* modules/remainderf (Depends-on): Likewise.
* modules/remainderl (Depends-on): Likewise.
* modules/rintf (Depends-on): Likewise.
* modules/rintl (Depends-on): Likewise.
* modules/sinf (Depends-on): Likewise.
* modules/sinhf (Depends-on): Likewise.
* modules/sqrtf (Depends-on): Likewise.
* modules/tanf (Depends-on): Likewise.
* modules/tanhf (Depends-on): Likewise.
* m4/acosf.m4 (gl_FUNC_ACOSF): Require gl_USE_SYSTEM_EXTENSIONS.
* m4/asinf.m4 (gl_FUNC_ASINF): Likewise.
* m4/atan2f.m4 (gl_FUNC_ATAN2F): Likewise.
* m4/atanf.m4 (gl_FUNC_ATANF): Likewise.
* m4/cbrt.m4 (gl_FUNC_CBRT): Likewise.
* m4/cbrtf.m4 (gl_FUNC_CBRTF): Likewise.
* m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Likewise.
* m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Likewise.
* m4/cosf.m4 (gl_FUNC_COSF): Likewise.
* m4/coshf.m4 (gl_FUNC_COSHF): Likewise.
* m4/expf.m4 (gl_FUNC_EXPF): Likewise.
* m4/fabsf.m4 (gl_FUNC_FABSF): Likewise.
* m4/fabsl.m4 (gl_FUNC_FABSL): Likewise.
* m4/fmaf.m4 (gl_FUNC_FMAF): Likewise.
* m4/fmal.m4 (gl_FUNC_FMAL): Likewise.
* m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
* m4/frexpf.m4 (gl_FUNC_FREXPF): Likewise.
* m4/frexpl.m4 (gl_FUNC_FREXPL): Likewise.
* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
* m4/ldexpf.m4 (gl_FUNC_LDEXPF): Likewise.
* m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
* m4/log10l.m4 (gl_FUNC_LOF10L): Likewise.
* m4/logb.m4 (gl_FUNC_LOGB): Likewise.
* m4/logf.m4 (gl_FUNC_LOGF): Likewise.
* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
* m4/powf.m4 (gl_FUNC_POWF): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
* m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
* m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
* m4/sinf.m4 (gl_FUNC_SINF): Likewise.
* m4/sinhf.m4 (gl_FUNC_SINHF): Likewise.
* m4/sqrtf.m4 (gl_FUNC_SQRTF): Likewise.
* m4/tanf.m4 (gl_FUNC_TANF): Likewise.
* m4/tanhf.m4 (gl_FUNC_TANHF): Likewise.

12 years agomath: Update module names in warnings.
Bruno Haible [Tue, 6 Mar 2012 11:34:50 +0000 (12:34 +0100)]
math: Update module names in warnings.

* lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
tanl): Use specific module name in warn-on-use warning.

12 years agoexpl: Simplify computation.
Bruno Haible [Tue, 6 Mar 2012 11:03:57 +0000 (12:03 +0100)]
expl: Simplify computation.

* lib/expl.c (expl): Simplify computation of exp_y. Fix comment.

12 years agoexp* tests: More tests.
Bruno Haible [Tue, 6 Mar 2012 02:05:14 +0000 (03:05 +0100)]
exp* tests: More tests.

* tests/test-exp.h: New file.
* tests/test-exp.c: Include <float.h> and test-exp.h.
(main): Invoke test_function.
* tests/test-expf.c: Include <float.h> and test-exp.h.
(main): Invoke test_function.
* tests/test-expl.c: Include <float.h> and test-exp.h.
(main): Invoke test_function.
* modules/exp-tests (Files): Add tests/test-exp.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_exp_SOURCES.
* modules/expf-tests (Files): Add tests/test-exp.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_expf_SOURCES.
* modules/expl-tests (Files): Add tests/test-exp.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_expl_SOURCES.

12 years agoexpl: Fix precision of computed result.
Bruno Haible [Tue, 6 Mar 2012 02:01:51 +0000 (03:01 +0100)]
expl: Fix precision of computed result.

* lib/expl.c: Completely rewritten.
* modules/expl (Depends-on): Add isnanl, roundl, ldexpl. Remove floorl.
(Maintainer): Add me.
* m4/expl.m4 (gl_FUNC_EXPL): Update computation of EXPL_LIBM.

12 years agocbrt* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 13:16:38 +0000 (14:16 +0100)]
cbrt* tests: More tests.

* tests/test-cbrt.h: New file.
* tests/test-cbrt.c: Include <float.h> and test-cbrt.h.
(main): Invoke test_function.
* tests/test-cbrtf.c: Include <float.h> and test-cbrt.h.
(main): Invoke test_function.
* tests/test-cbrtl.c: Include <float.h> and test-cbrt.h.
(main): Invoke test_function.
* modules/cbrt-tests (Files): Add tests/test-cbrt.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_cbrt_SOURCES.
* modules/cbrtf-tests (Files): Add tests/test-cbrt.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_cbrtf_SOURCES.
* modules/cbrtl-tests (Files): Add tests/test-cbrt.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_cbrtl_SOURCES.

12 years agohypot* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 12:21:47 +0000 (13:21 +0100)]
hypot* tests: More tests.

* tests/test-hypot.h: New file, partially extracted from
tests/test-hypotl.c.
* tests/test-hypot.c: Include test-hypot.h.
(main): Invoke test_function.
* tests/test-hypotf.c: Include test-hypot.h.
(main): Invoke test_function.
* tests/test-hypotl.c: Include fpucw.h and test-hypot.h.
(main): Invoke BEGIN_LONG_DOUBLE_ROUNDING and test_function.
* modules/hypot-tests (Files): Add tests/test-hypot.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_hypot_SOURCES.
* modules/hypotf-tests (Files): Add tests/test-hypot.h,
tests/randomf.c.
(Makefile.am): Add randomf.c to test_hypotf_SOURCES.
* modules/hypotl-tests (Files): Add tests/test-hypot.h,
tests/randoml.c.
(Depends-on): Add 'fpucw', 'float'.
(Makefile.am): Add randoml.c to test_hypotl_SOURCES.

12 years agofpucw: Doc about FreeBSD.
Bruno Haible [Mon, 5 Mar 2012 12:16:20 +0000 (13:16 +0100)]
fpucw: Doc about FreeBSD.

* lib/fpucw.h: Mention FreeBSD in comments.

12 years agosqrt* tests: Rename local variable.
Bruno Haible [Mon, 5 Mar 2012 02:20:34 +0000 (03:20 +0100)]
sqrt* tests: Rename local variable.

12 years agosqrt* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 01:43:43 +0000 (02:43 +0100)]
sqrt* tests: More tests.

12 years agosqrt* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 01:14:30 +0000 (02:14 +0100)]
sqrt* tests: More tests.

* tests/test-sqrt.h: New file.
* tests/test-sqrt.c: Include <float.h> and test-sqrt.h.
(main): Invoke test_function.
* tests/test-sqrtf.c: Include <float.h> and test-sqrt.h.
(main): Invoke test_function.
* tests/test-sqrtl.c: Include <float.h> and test-sqrt.h.
(main): Invoke test_function.
* modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_sqrt_SOURCES.
* modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_sqrtf_SOURCES.
* modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_sqrtl_SOURCES.

12 years agoremainder* tests: More tests.
Bruno Haible [Sun, 4 Mar 2012 22:07:45 +0000 (23:07 +0100)]
remainder* tests: More tests.

* tests/test-remainder.h: New file, based on tests/test-fmod.h.
* tests/test-remainder.c: Include <float.h> and test-remainder.h.
(main): Invoke test_function.
* tests/test-remainderf.c: Include <float.h> and test-remainder.h.
(main): Invoke test_function.
* tests/test-remainderl.c: Include <float.h> and test-remainder.h.
(main): Invoke test_function.
* modules/remainder-tests (Files): Add tests/test-remainder.h,
tests/randomd.c.
(Makefile.am): Add randomd.c to test_remainder_SOURCES.
* modules/remainderf-tests (Files): Add tests/test-remainder.h,
tests/randomf.c.
(Makefile.am): Add randomf.c to test_remainderf_SOURCES.
* modules/remainderl-tests (Files): Add tests/test-remainder.h,
tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_remainderl_SOURCES.

12 years agoremainder, remainderf, remainderl: Fix computation for large quotients.
Bruno Haible [Sun, 4 Mar 2012 22:01:33 +0000 (23:01 +0100)]
remainder, remainderf, remainderl: Fix computation for large quotients.

* lib/remainder.c: Completely rewritten.
* lib/remainderf.c (remainderf): Use implementation of remainder.c with
USE_FLOAT.
* lib/remainderl.c (remainderl): Use implementation of remainder.c with
USE_LONG_DOUBLE.
* modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
isnand, isinf. Remove round, fma.
* modules/remainderf (Files): Add lib/remainder.c.
(Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
Remove roundf, fmaf.
* modules/remainderl (Files): Add lib/remainder.c.
(Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
isinf. Remove roundl, fmal.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
REMAINDER_LIBM.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
REMAINDERF_LIBM.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
REMAINDERL_LIBM.

12 years agofmodl: Fix last commit.
Bruno Haible [Sun, 4 Mar 2012 21:54:38 +0000 (22:54 +0100)]
fmodl: Fix last commit.

12 years agofmod* tests: More tests.
Bruno Haible [Sun, 4 Mar 2012 19:59:05 +0000 (20:59 +0100)]
fmod* tests: More tests.

* tests/test-fmod.h (my_ldexp): New function.
(test_function): Reduce amount of random numbers to test. Add tests
of very large quotients x / y.
* tests/test-fmod.c (MAX_EXP): New macro.
* tests/test-fmodf.c (MAX_EXP): Likewise.
* tests/test-fmodl.c (MAX_EXP): Likewise.