/* Base 10 logarithmic function.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return log10 (x);
}
+#elif HAVE_LOG10L
+
+# include <float.h>
+
+long double
+log10l (long double x)
+# undef log10l
+{
+ /* Work around the OSF/1 5.1 bug. */
+ if (x == 0.0L)
+ /* Return -Infinity. */
+ return -1.0L / 0.0L;
+ {
+ long double y = log10l (x);
+# ifdef __sgi
+ /* Normalize the +Infinity value. */
+ if (y > LDBL_MAX)
+ y = 1.0L / 0.0L;
+# endif
+ return y;
+ }
+}
+
#else
/* 1 / log(10) */