long double log10l(long double x)
{
- long double y;
- volatile long double z;
+ long double y, z;
int e;
if (isnan(x))
return x;
if(x <= 0.0) {
if(x == 0.0)
- return -1.0 / (x - x);
- return (x - x) / (x - x);
+ return -1.0 / (x*x);
+ return (x - x) / 0.0;
}
if (x == INFINITY)
return INFINITY;
z += e * (L102A);
return z;
}
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
+// TODO: broken implementation to make things compile
+long double log10l(long double x)
+{
+ return log10(x);
+}
#endif