projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96acdae
)
revert invalid optimization in floatscan
author
Rich Felker
<dalias@aerifal.cx>
Thu, 12 Apr 2012 03:08:50 +0000
(23:08 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 12 Apr 2012 03:08:50 +0000
(23:08 -0400)
src/internal/floatscan.c
patch
|
blob
|
history
diff --git
a/src/internal/floatscan.c
b/src/internal/floatscan.c
index a76daa460c0c5ce58924c24ff76c2df618d47f3b..28a09c252837033fe78ffa90ecdcd55a2450d04f 100644
(file)
--- a/
src/internal/floatscan.c
+++ b/
src/internal/floatscan.c
@@
-200,7
+200,7
@@
static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
/* FIXME: find a way to compute optimal sh */
if (rp > 9+9*LD_B1B_DIG) sh = 9;
e2 += sh;
- for (
i=0; (k=(a+i & MASK))!=z && i<LD_B1B_DIG+3; i++
) {
+ for (
k=a; k!=z; k=(k+1 & MASK)
) {
uint32_t tmp = x[k] & (1<<sh)-1;
x[k] = (x[k]>>sh) + carry;
carry = (1000000000>>sh) * tmp;
@@
-210,7
+210,7
@@
static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
rp -= 9;
}
}
- if (carry
&& k==z
) {
+ if (carry) {
if ((z+1 & MASK) != a) {
x[z] = carry;
z = (z+1 & MASK);