remove LFS64 symbol aliases; replace with dynamic linker remapping
[musl] / src / math / log10l.c
index f0eeeaf..63dcc28 100644 (file)
@@ -117,16 +117,15 @@ static const long double S[4] = {
 
 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;
@@ -183,4 +182,10 @@ done:
        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