X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=src%2Finternal%2Ffloatscan.c;h=8c0828fcb39e6e0e742309913eef1aa955e582e5;hb=fa4a8abd06a401822cc8ba4e352a219544c0118d;hp=80305ee694d42aa14aeac6897367c2bc3527fa45;hpb=d184a09e0529f33d8ddddb8825039133483a2c41;p=musl diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c index 80305ee6..8c0828fc 100644 --- a/src/internal/floatscan.c +++ b/src/internal/floatscan.c @@ -33,9 +33,6 @@ #define MASK (KMAX-1) -#define CONCAT2(x,y) x ## y -#define CONCAT(x,y) CONCAT2(x,y) - static long long scanexp(FILE *f, int pok) { int c; @@ -110,7 +107,10 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po gotdig=1; } else { dc++; - if (c!='0') x[KMAX-4] |= 1; + if (c!='0') { + lnz = (KMAX-4)*9; + x[KMAX-4] |= 1; + } } } if (!gotrad) lrp=dc; @@ -298,7 +298,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po y -= bias; if ((e2+LDBL_MANT_DIG & INT_MAX) > emax-5) { - if (fabs(y) >= CONCAT(0x1p, LDBL_MANT_DIG)) { + if (fabsl(y) >= 2/LDBL_EPSILON) { if (denormal && bits==LDBL_MANT_DIG+e2-emin) denormal = 0; y *= 0.5;