if (gotrad) break;
gotrad = 1;
lrp = dc;
- } else if (k < KMAX-2) {
+ } else if (k < KMAX-3) {
dc++;
if (c!='0') lnz = dc;
if (j) x[k] = x[k]*10 + c-'0';
gotdig=1;
} else {
dc++;
- if (c!='0') x[KMAX-3] |= 1;
+ if (c!='0') x[KMAX-4] |= 1;
}
}
if (!gotrad) lrp=dc;
}
/* Align incomplete final B1B digit */
- if (k<KMAX && j) {
+ if (j) {
for (; j<9; j++) x[k]*=10;
k++;
j=0;
/* Assemble desired bits into floating point variable */
for (y=i=0; i<LD_B1B_DIG; i++) {
- if ((a+i & MASK)==z) x[z=(z+1 & MASK)] = 0;
+ if ((a+i & MASK)==z) x[(z=(z+1 & MASK))-1] = 0;
y = 1000000000.0L * y + x[a+i & MASK];
}