X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Flog2l.c;h=722b451a026ae2ccd1b70381c4a87b7936ddb3c2;hb=79f653c6bc2881dd6855299c908a442f56cb7c2b;hp=345b395daf6eafd340122c0c35b96ca6f6c4ee5b;hpb=e2fe959fe2a450f74271d4d3c4b0d9456f889125;p=musl diff --git a/src/math/log2l.c b/src/math/log2l.c index 345b395d..722b451a 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 */ } @@ -173,4 +173,10 @@ done: 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