[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fmod* math error reporting
From: |
Bruno Haible |
Subject: |
fmod* math error reporting |
Date: |
Mon, 27 Feb 2012 15:00:10 +0100 |
User-agent: |
KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) |
The fmod* functions also have portability problems regarding proper IEEE
behaviour:
* fmod
OSF/1 5.1: test-fmod-ieee.h:30: assertion failed
mingw: test-fmod-ieee.h:48: assertion failed
MSVC 9: test-fmod-ieee.h:48: assertion failed
* fmodf
OSF/1 5.1: test-fmod-ieee.h:30: assertion failed
MSVC 9: test-fmod-ieee.h:48: assertion failed
* fmodl
OSF/1 5.1: test-fmod-ieee.h:30: assertion failed
MSVC 9: test-fmod-ieee.h:48: assertion failed
This series of patches fixes it.
2012-02-27 Bruno Haible <address@hidden>
fmodl-ieee: Work around test failures on OSF/1, MSVC 9.
* m4/fmodl-ieee.m4: New file.
* m4/fmodl.m4 (gl_FUNC_FMODL): If gl_FUNC_FMODL_IEEE is present, test
whether fmodl works with zero arguments. Replace it if not.
* modules/fmodl-ieee (Files): Add m4/fmodl-ieee.m4.
(Depends-on): Add fmod-ieee.
(configure.ac): Invoke gl_FUNC_FMODL_IEEE.
* doc/posix-functions/fmodl.texi: Mention the fmodl-ieee module.
fmodf-ieee: Work around test failure on OSF/1.
* m4/fmodf-ieee.m4: New file.
* m4/fmodf.m4 (gl_FUNC_FMODF): If gl_FUNC_FMODF_IEEE is present, test
whether fmodf works with zero arguments. Replace it if not.
* lib/math.in.h (fmodf): Override if REPLACE_FMODF is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FMODF.
* modules/math (Makefile.am): Substitute REPLACE_FMODF.
* modules/fmodf (configure.ac): Consider REPLACE_FMODF.
(Depends-on): Update dependencies.
* modules/fmodf-ieee (Files): Add m4/fmodf-ieee.m4.
(configure.ac): Invoke gl_FUNC_FMODF_IEEE.
* doc/posix-functions/fmodf.texi: Mention the problem on OSF/1.
fmodf-ieee: Work around test failure on MSVC 9.
* modules/fmodf-ieee (Depends-on): Add fmod-ieee.
* doc/posix-functions/fmodf.texi: Mention the fmodf-ieee module.
fmod-ieee: Work around test failures on OSF/1, mingw.
* m4/fmod-ieee.m4: New file.
* m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test
whether fmod works with zero arguments. Replace it if not.
* lib/math.in.h (fmod): New declaration.
* lib/fmod.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD.
* modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD.
* modules/fmod (Files): Add lib/fmod.c.
(Depends-on): Add math, isinf, trunc, fma.
(configure.ac): Arrange to compile lib/fmod.c if needed.
* modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4,
m4/signbit.m4.
(configure.ac): Invoke gl_FUNC_FMOD_IEEE.
* tests/test-math-c++.cc: Check the declaration of fmod.
* doc/posix-functions/fmod.texi: Mention the fmod-ieee module.