1 Apr 2012 19:39
log10: more tests and workarounds
Bruno Haible <bruno <at> clisp.org>
2012-04-01 17:39:24 GMT
2012-04-01 17:39:24 GMT
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 <bruno <at> clisp.org>
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.
(Continue reading)
RSS Feed