remove LFS64 symbol aliases; replace with dynamic linker remapping
[musl] / src / math / scalbnl.c
index 08a4c58..db44dab 100644 (file)
@@ -20,11 +20,11 @@ long double scalbnl(long double x, int n)
                                n = 16383;
                }
        } else if (n < -16382) {
-               x *= 0x1p-16382L;
-               n += 16382;
+               x *= 0x1p-16382L * 0x1p113L;
+               n += 16382 - 113;
                if (n < -16382) {
-                       x *= 0x1p-16382L;
-                       n += 16382;
+                       x *= 0x1p-16382L * 0x1p113L;
+                       n += 16382 - 113;
                        if (n < -16382)
                                n = -16382;
                }