summaryrefslogtreecommitdiff
path: root/src/math/log2l.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/log2l.c')
-rw-r--r--src/math/log2l.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/log2l.c b/src/math/log2l.c
index 345b395d..d00531d5 100644
--- 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 -1/(x+0); /* -inf with divbyzero */
+ return -1/(x*x); /* -inf with divbyzero */
return 0/0.0f; /* nan with invalid */
}