The hypot* functions also give unit test failures in the IEEE specific unit
tests:

On OSF/1 5.1, mingw, MSVC 9:

test-hypot-ieee.h:33: assertion failed
FAIL: test-hypot-ieee

test-hypot-ieee.h:33: assertion failed
FAIL: test-hypotf-ieee

test-hypot-ieee.h:33: assertion failed
FAIL: test-hypotl-ieee

This series of patches fixes it.


2012-02-29  Bruno Haible  <br...@clisp.org>

        hypotl-ieee: Work around test failure on OSF/1 and native Windows.
        * m4/hypotl-ieee.m4: New file.
        * m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present,
        test whether hypotl works with mixed NaN and Infinity arguments.
        Replace it if not.
        * lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1.
        * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL.
        * modules/math (Makefile.am): Substitute REPLACE_HYPOTL.
        * modules/hypotl (configure.ac): Consider REPLACE_HYPOTL.
        (Depends-on): Update conditions.
        * modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4.
        (Depends-on): Add hypot-ieee.
        (configure.ac): Invoke gl_FUNC_HYPOTL_IEEE.
        * doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.

        hypotf-ieee: Work around test failure on OSF/1 and native Windows.
        * m4/hypotf-ieee.m4: New file.
        * m4/hypotf.m4 (gl_FUNC_HYPOTF): If gl_FUNC_HYPOTF_IEEE is present,
        test whether hypotf works with mixed NaN and Infinity arguments.
        Replace it if not.
        * modules/hypotf-ieee (Files): Add m4/hypotf-ieee.m4.
        (Depends-on): Add hypot-ieee.
        (configure.ac): Invoke gl_FUNC_HYPOTF_IEEE.
        * doc/posix-functions/hypotf.texi: Mention the hypotf-ieee module.

        hypot-ieee: Work around test failure on OSF/1 and native Windows.
        * lib/math.in.h (hypot): New declaration.
        * lib/hypot.c: New file.
        * m4/hypot-ieee.m4: New file.
        * m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test
        whether hypot works with mixed NaN and Infinity arguments. Replace it
        if not.
        * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT,
        REPLACE_HYPOT.
        * modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT.
        * modules/hypot (Files): Add lib/hypot.c.
        (Depends-on): Add dependencies.
        (configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1.
        * modules/hypot-ieee (Files): Add m4/hypot-ieee.m4.
        (configure.ac): Invoke gl_FUNC_HYPOT_IEEE.
        * tests/test-math-c++.cc: Check the declaration of hypot.
        * doc/posix-functions/hypot.texi: Mention the hypot-ieee module.


Reply via email to