* 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.
2012-04-01 Bruno Haible <bruno@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,
@item
This function returns an unnormalized negative infinity for a minus zero argument on some platforms:
IRIX 6.5.
+@item
+This function returns an unnormalized positive infinity for a positive infinite argument on some platforms:
+IRIX 6.5.
@end itemize
Portability problems not fixed by Gnulib:
#elif HAVE_LOG10L
+# include <float.h>
+
long double
log10l (long double x)
# undef log10l
if (x == 0.0L)
/* Return -Infinity. */
return -1.0L / 0.0L;
- return log10l (x);
+ {
+ long double y = log10l (x);
+# ifdef __sgi
+ /* Normalize the +Infinity value. */
+ if (y > LDBL_MAX)
+ y = 1.0L / 0.0L;
+# endif
+ return y;
+ }
}
#else
math
extensions
log10 [{ test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float [{ test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
logl [{ test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
configure.ac: