bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

log10: more tests and workarounds


From: Bruno Haible
Subject: log10: more tests and workarounds
Date: Sun, 01 Apr 2012 19:39:24 +0200
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Continuing the math function support, I'm adding more tests and fixes
to the 'log10', 'log10f', 'log10l' modules.

Bugs worked around:
  - On OSF/1 5.1, log10(-0.0) is NaN, should be -Infinity.
    Likewise for log10f and log10l.
  - Wrong result for negative arguments on NetBSD 5.1 and Solaris.
  - On AIX 5.1, the undeclared log10l function produces broken results.
  - On IRIX 6.5, the system function produces -Infinity and +Infinity value
    variants that print like the real -Infinity and +Infinity, but does not
    compare == to the real -Infinity or +Infinity.


2012-04-01  Bruno Haible  <address@hidden>

        log10l: Work around log10l-ieee test failure on IRIX 6.5.
        * lib/log10l.c: Include <float.h>
        (log10l): On IRIX, normalize the +Infinity value.
        * modules/log10l (Depends-on): Add 'float'.
        * doc/posix-functions/log10l.texi: Mention the IRIX problem with
        +Infinity.

        log10f-ieee: Work around test failure on NetBSD 5.1.
        * m4/log10f-ieee.m4: New file.
        * m4/log10f.m4 (gl_FUNC_LOG10F): If gl_FUNC_LOG10F_IEEE is present,
        test whether log10f works with a negative argument. Replace it if not.
        * lib/log10f.c (log10f): For negative arguments, return NaN.
        * modules/log10f-ieee (Files): Add m4/log10f-ieee.m4.
        (configure.ac): Invoke gl_FUNC_LOG10F_IEEE.
        * doc/posix-functions/log10f.texi: Mention the log10f-ieee module.

        log10f-ieee: Work around test failure on Solaris 9.
        * modules/log10f-ieee (Depends-on): Add log10-ieee.
        (configure.ac): Require gl_FUNC_LOG10F.

        log10-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
        * m4/log10-ieee.m4: New file.
        * m4/log10.m4 (gl_FUNC_LOG10): If gl_FUNC_LOG10_IEEE is present, test
        whether log10 works with a negative argument. Replace it if not.
        * lib/log10.c (log10): For negative arguments, return NaN.
        * modules/log10-ieee (Files): Add m4/log10-ieee.m4.
        (configure.ac): Invoke gl_FUNC_LOG10_IEEE.
        * doc/posix-functions/log10.texi: Mention the log10-ieee module.

        Tests for module 'log10l-ieee'.
        * modules/log10l-ieee-tests: New file.
        * tests/test-log10l-ieee.c: New file.

        New module 'log10l-ieee'.
        * modules/log10l-ieee: New file.

        Tests for module 'log10-ieee'.
        * modules/log10-ieee-tests: New file.
        * tests/test-log10-ieee.c: New file.

        New module 'log10-ieee'.
        * modules/log10-ieee: New file.

        Tests for module 'log10f-ieee'.
        * modules/log10f-ieee-tests: New file.
        * tests/test-log10f-ieee.c: New file.
        * tests/test-log10-ieee.h: New file.

        New module 'log10f-ieee'.
        * modules/log10f-ieee: New file.

2012-04-01  Bruno Haible  <address@hidden>

        log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug.
        * lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1.
        * lib/log10l.c (log10l): If log10l exists, use it and provide just the
        workaround.
        * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro.
        (gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L.
        * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L.
        * modules/math (Makefile.am): Substitute REPLACE_LOG10L.
        * modules/log10l (configure.ac): Consider REPLACE_LOG10L.
        (Depends-on): Update conditions.
        * doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1,
        IRIX 6.5, OSF/1 5.1 problems.

2012-04-01  Bruno Haible  <address@hidden>

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

2012-04-01  Bruno Haible  <address@hidden>

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

2012-03-31  Bruno Haible  <address@hidden>

        log10l tests: More tests.
        * modules/log10l-tests (Files): Add tests/test-log10l.h,
        tests/minus-zero.h, tests/randoml.c.
        (Makefile.am): Add randoml.c to test_log10l_SOURCES.
        * tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h.
        (main): Invoke test_function.

        log10f tests: More tests.
        * modules/log10f-tests (Files): Add tests/test-log10.h,
        tests/minus-zero.h, tests/randomf.c.
        (Makefile.am): Add randomf.c to test_log10f_SOURCES.
        * tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h.
        (main): Invoke test_function.

        log10 tests: More tests.
        * tests/test-log10.h: New file.
        * modules/log10-tests (Files): Add tests/test-log10.h,
        tests/minus-zero.h, tests/randomd.c.
        (Makefile.am): Add randomd.c to test_log10_SOURCES.
        * tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h.
        (main): Invoke test_function.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]