| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9d87323 commit 5a0b399
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -200,12 +200,6 @@ typedef union { double d; ULong L[2]; } U; | |||
| 200 | 200 | #define STRTOD_DIGLIM 40 | |
| 201 | 201 | #endif | |
| 202 | 202 | ||
| 203 | - #ifdef DIGLIM_DEBUG | ||
| 204 | - extern int strtod_diglim; | ||
| 205 | - #else | ||
| 206 | - #define strtod_diglim STRTOD_DIGLIM | ||
| 207 | - #endif | ||
| 208 | - | ||
| 209 | 203 | /* The following definition of Storeinc is appropriate for MIPS processors. | |
| 210 | 204 | * An alternative that might be better on some machines is | |
| 211 | 205 | * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff) | |
@@ -269,8 +263,7 @@ extern int strtod_diglim; | |||
| 269 | 263 | typedef struct BCinfo BCinfo; | |
| 270 | 264 | struct | |
| 271 | 265 | 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; | ||
| 274 | 267 | }; | |
| 275 | 268 | ||
| 276 | 269 | #define FFFFFFFF 0xffffffffUL | |
@@ -1318,7 +1311,7 @@ _Py_dg_strtod(const char *s00, char **se) | |||
| 1318 | 1311 | BCinfo bc; | |
| 1319 | 1312 | Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; | |
| 1320 | 1313 | ||
| 1321 | - sign = nz0 = nz = bc.dplen = bc.uflchk = 0; | ||
| 1314 | + sign = nz0 = nz = bc.dplen = 0; | ||
| 1322 | 1315 | dval(&rv) = 0.; | |
| 1323 | 1316 | for(s = s00;;s++) switch(*s) { | |
| 1324 | 1317 | case '-': | |
@@ -1555,11 +1548,11 @@ _Py_dg_strtod(const char *s00, char **se) | |||
| 1555 | 1548 | /* Put digits into bd: true value = bd * 10^e */ | |
| 1556 | 1549 | ||
| 1557 | 1550 | 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 */ | ||
| 1559 | 1552 | /* to silence an erroneous warning about bc.nd0 */ | |
| 1560 | 1553 | /* 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 */ | ||
| 1563 | 1556 | /* minimum number of decimal digits to distinguish double values */ | |
| 1564 | 1557 | /* in IEEE arithmetic. */ | |
| 1565 | 1558 | i = j = 18; | |
@@ -1767,10 +1760,8 @@ _Py_dg_strtod(const char *s00, char **se) | |||
| 1767 | 1760 | /* accept rv */ | |
| 1768 | 1761 | break; | |
| 1769 | 1762 | /* rv = smallest denormal */ | |
| 1770 | - if (bc.nd >nd) { | ||
| 1771 | - bc.uflchk = 1; | ||
| 1763 | + if (bc.nd >nd) | ||
| 1772 | 1764 | break; | |
| 1773 | - } | ||
| 1774 | 1765 | goto undfl; | |
| 1775 | 1766 | } | |
| 1776 | 1767 | } | |
@@ -1786,10 +1777,8 @@ _Py_dg_strtod(const char *s00, char **se) | |||
| 1786 | 1777 | else { | |
| 1787 | 1778 | dval(&rv) -= ulp(&rv); | |
| 1788 | 1779 | if (!dval(&rv)) { | |
| 1789 | - if (bc.nd >nd) { | ||
| 1790 | - bc.uflchk = 1; | ||
| 1780 | + if (bc.nd >nd) | ||
| 1791 | 1781 | break; | |
| 1792 | - } | ||
| 1793 | 1782 | goto undfl; | |
| 1794 | 1783 | } | |
| 1795 | 1784 | } | |
@@ -1801,10 +1790,8 @@ _Py_dg_strtod(const char *s00, char **se) | |||
| 1801 | 1790 | aadj = aadj1 = 1.; | |
| 1802 | 1791 | else if (word1(&rv) || word0(&rv) & Bndry_mask) { | |
| 1803 | 1792 | if (word1(&rv) == Tiny1 && !word0(&rv)) { | |
| 1804 | - if (bc.nd >nd) { | ||
| 1805 | - bc.uflchk = 1; | ||
| 1793 | + if (bc.nd >nd) | ||
| 1806 | 1794 | break; | |
| 1807 | - } | ||
| 1808 | 1795 | goto undfl; | |
| 1809 | 1796 | } | |
| 1810 | 1797 | aadj = 1.; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments