projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix failure to flush stderr when fflush(0) is called
[musl]
/
src
/
math
/
log2l.c
diff --git
a/src/math/log2l.c
b/src/math/log2l.c
index
345b395
..
722b451
100644
(file)
--- a/
src/math/log2l.c
+++ b/
src/math/log2l.c
@@
-117,7
+117,7
@@
long double log2l(long double x)
return x;
if (x <= 0.0) {
if (x == 0.0)
return x;
if (x <= 0.0) {
if (x == 0.0)
- return -1/(x
+0
); /* -inf with divbyzero */
+ return -1/(x
*x
); /* -inf with divbyzero */
return 0/0.0f; /* nan with invalid */
}
return 0/0.0f; /* nan with invalid */
}
@@
-173,4
+173,10
@@
done:
z += e;
return z;
}
z += e;
return z;
}
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
+// TODO: broken implementation to make things compile
+long double log2l(long double x)
+{
+ return log2(x);
+}
#endif
#endif