Repository navigation
Commit ac81dd9
rt: keep 767 digits of a long number, so UCRT sees the sticky digit
scan_number kept 800 significant digits and stood for any nonzero digit
past them with one sticky 1, as the 801st. UCRT's strtod reads only 768
significant digits, so on Windows it never saw the sticky digit: a number
a hair above a halfway point between two DOUBLEs (2^53+1 followed by a
nonzero digit 1000 places on) rounded to even, down, and the rt test
scan_reads_a_number_of_any_length failed there.
767 digits are still exact -- no DOUBLE, nor any halfway point, has more
than 767 significant digits -- and the sticky digit is now the 768th.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent a3b9b10 commit ac81dd9
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | | - | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | | - | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| |||
0 commit comments