FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove unused BCinfo fields and an unused macro. · python-emscripten/cpython@5a0b399 · GitHub

Repository navigation

Commit 5a0b399

Browse files
committed
Remove unused BCinfo fields and an unused macro.
1 parent 9d87323 commit 5a0b399

1 file changed

Lines changed: 8 additions & 21 deletions

File tree

‎Python/dtoa.c‎

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,6 @@ typedef union { double d; ULong L[2]; } U;
200200
#define STRTOD_DIGLIM 40
201201
#endif
202202

203-
#ifdef DIGLIM_DEBUG
204-
extern int strtod_diglim;
205-
#else
206-
#define strtod_diglim STRTOD_DIGLIM
207-
#endif
208-
209203
/* The following definition of Storeinc is appropriate for MIPS processors.
210204
* An alternative that might be better on some machines is
211205
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
@@ -269,8 +263,7 @@ extern int strtod_diglim;
269263
typedef struct BCinfo BCinfo;
270264
struct
271265
BCinfo {
272-
int dp0, dp1, dplen, dsign, e0, inexact;
273-
int nd, nd0, rounding, scale, uflchk;
266+
int dp0, dp1, dplen, dsign, e0, nd, nd0, scale;
274267
};
275268

276269
#define FFFFFFFF 0xffffffffUL
@@ -1318,7 +1311,7 @@ _Py_dg_strtod(const char *s00, char **se)
13181311
BCinfo bc;
13191312
Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
13201313

1321-
sign = nz0 = nz = bc.dplen = bc.uflchk = 0;
1314+
sign = nz0 = nz = bc.dplen = 0;
13221315
dval(&rv) = 0.;
13231316
for(s = s00;;s++) switch(*s) {
13241317
case '-':
@@ -1555,11 +1548,11 @@ _Py_dg_strtod(const char *s00, char **se)
15551548
/* Put digits into bd: true value = bd * 10^e */
15561549

15571550
bc.nd = nd;
1558-
bc.nd0 = nd0; /* Only needed if nd > strtod_diglim, but done here */
1551+
bc.nd0 = nd0; /* Only needed if nd > STRTOD_DIGLIM, but done here */
15591552
/* to silence an erroneous warning about bc.nd0 */
15601553
/* possibly not being initialized. */
1561-
if (nd > strtod_diglim) {
1562-
/* ASSERT(strtod_diglim >= 18); 18 == one more than the */
1554+
if (nd > STRTOD_DIGLIM) {
1555+
/* ASSERT(STRTOD_DIGLIM >= 18); 18 == one more than the */
15631556
/* minimum number of decimal digits to distinguish double values */
15641557
/* in IEEE arithmetic. */
15651558
i = j = 18;
@@ -1767,10 +1760,8 @@ _Py_dg_strtod(const char *s00, char **se)
17671760
/* accept rv */
17681761
break;
17691762
/* rv = smallest denormal */
1770-
if (bc.nd >nd) {
1771-
bc.uflchk = 1;
1763+
if (bc.nd >nd)
17721764
break;
1773-
}
17741765
goto undfl;
17751766
}
17761767
}
@@ -1786,10 +1777,8 @@ _Py_dg_strtod(const char *s00, char **se)
17861777
else {
17871778
dval(&rv) -= ulp(&rv);
17881779
if (!dval(&rv)) {
1789-
if (bc.nd >nd) {
1790-
bc.uflchk = 1;
1780+
if (bc.nd >nd)
17911781
break;
1792-
}
17931782
goto undfl;
17941783
}
17951784
}
@@ -1801,10 +1790,8 @@ _Py_dg_strtod(const char *s00, char **se)
18011790
aadj = aadj1 = 1.;
18021791
else if (word1(&rv) || word0(&rv) & Bndry_mask) {
18031792
if (word1(&rv) == Tiny1 && !word0(&rv)) {
1804-
if (bc.nd >nd) {
1805-
bc.uflchk = 1;
1793+
if (bc.nd >nd)
18061794
break;
1807-
}
18081795
goto undfl;
18091796
}
18101797
aadj = 1.;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL