X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Flog10l.c;h=c7aacf909a45156d1f60513f60ee237ad36e8272;hb=6a25313c1122629b43b990ada70af1c209f03a54;hp=f0eeeafb4a733a916d45d2b485886c35d5843973;hpb=2786c7d21611b9fa3b2fe356542cf213e7dd0ba4;p=musl diff --git a/src/math/log10l.c b/src/math/log10l.c index f0eeeafb..c7aacf90 100644 --- a/src/math/log10l.c +++ b/src/math/log10l.c @@ -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;