1 | // Copyright (c) Microsoft Corporation. |
2 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
3 | |
4 | #ifndef DOUBLE_FROM_CHARS_TEST_CASES_HPP |
5 | #define DOUBLE_FROM_CHARS_TEST_CASES_HPP |
6 | |
7 | #include <charconv> |
8 | #include <stddef.h> |
9 | #include <system_error> |
10 | using namespace std; |
11 | |
12 | inline constexpr DoubleFromCharsTestCase double_from_chars_test_cases[] = { |
13 | {.input: "1.000000000000a000" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000ap0}, // exact |
14 | {.input: "1.000000000000a001" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000ap0}, // below midpoint, round down |
15 | {.input: "1.000000000000a800" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000ap0}, // midpoint, round down to even |
16 | {.input: "1.000000000000a801" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000bp0}, // above midpoint, round up |
17 | {.input: "1.000000000000b000" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000bp0}, // exact |
18 | {.input: "1.000000000000b001" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000bp0}, // below midpoint, round down |
19 | {.input: "1.000000000000b800" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000cp0}, // midpoint, round up to even |
20 | {.input: "1.000000000000b801" , .fmt: chars_format::hex, .correct_idx: 18, .correct_ec: errc{}, .correct_value: 0x1.000000000000cp0}, // above midpoint, round up |
21 | |
22 | {.input: "1.00000000000020" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000002p0}, // exact |
23 | {.input: "1.00000000000021" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000002p0}, // below midpoint, round down |
24 | {.input: "1.00000000000028" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000002p0}, // midpoint, round down to even |
25 | {.input: "1.00000000000029" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000003p0}, // above midpoint, round up |
26 | {.input: "1.00000000000030" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000003p0}, // exact |
27 | {.input: "1.00000000000031" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000003p0}, // below midpoint, round down |
28 | {.input: "1.00000000000038" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000004p0}, // midpoint, round up to even |
29 | {.input: "1.00000000000039" , .fmt: chars_format::hex, .correct_idx: 16, .correct_ec: errc{}, .correct_value: 0x1.0000000000004p0}, // above midpoint, round up |
30 | |
31 | {.input: "1.00000000000000044408920985006261616945266723632812500000" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
32 | .correct_value: 0x1.0000000000002p0}, // exact |
33 | {.input: "1.00000000000000045796699765787707292474806308746337890625" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
34 | .correct_value: 0x1.0000000000002p0}, // below midpoint, round down |
35 | {.input: "1.00000000000000055511151231257827021181583404541015624999" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
36 | .correct_value: 0x1.0000000000002p0}, // below midpoint, round down |
37 | {.input: "1.00000000000000055511151231257827021181583404541015625000" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
38 | .correct_value: 0x1.0000000000002p0}, // midpoint, round down to even |
39 | {.input: "1.00000000000000055511151231257827021181583404541015625001" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
40 | .correct_value: 0x1.0000000000003p0}, // above midpoint, round up |
41 | {.input: "1.00000000000000056898930012039272696711122989654541015625" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
42 | .correct_value: 0x1.0000000000003p0}, // above midpoint, round up |
43 | {.input: "1.00000000000000066613381477509392425417900085449218750000" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
44 | .correct_value: 0x1.0000000000003p0}, // exact |
45 | {.input: "1.00000000000000068001160258290838100947439670562744140625" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
46 | .correct_value: 0x1.0000000000003p0}, // below midpoint, round down |
47 | {.input: "1.00000000000000077715611723760957829654216766357421874999" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
48 | .correct_value: 0x1.0000000000003p0}, // below midpoint, round down |
49 | {.input: "1.00000000000000077715611723760957829654216766357421875000" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
50 | .correct_value: 0x1.0000000000004p0}, // midpoint, round up to even |
51 | {.input: "1.00000000000000077715611723760957829654216766357421875001" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
52 | .correct_value: 0x1.0000000000004p0}, // above midpoint, round up |
53 | {.input: "1.00000000000000079103390504542403505183756351470947265625" , .fmt: chars_format::general, .correct_idx: 58, .correct_ec: errc{}, |
54 | .correct_value: 0x1.0000000000004p0}, // above midpoint, round up |
55 | |
56 | // https://www.exploringbinary.com/nondeterministic-floating-point-conversions-in-java/ |
57 | {.input: "0.0000008p-1022" , .fmt: chars_format::hex, .correct_idx: 15, .correct_ec: errc{}, .correct_value: 0x0.0000008p-1022}, |
58 | |
59 | // VSO-838635 "<charconv>: from_chars() mishandles certain subnormals" |
60 | // These values change on half-ulp boundaries: |
61 | // 1 * 2^-1075 ~= 2.47e-324 (half-ulp between zero and min subnormal) |
62 | // 2 * 2^-1075 ~= 4.94e-324 (min subnormal) |
63 | // 3 * 2^-1075 ~= 7.41e-324 (half-ulp between min subnormal and next subnormal) |
64 | // 4 * 2^-1075 ~= 9.88e-324 (next subnormal) |
65 | {.input: "1." |
66 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
67 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
68 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
69 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
70 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
71 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
72 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
73 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
74 | "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" |
75 | "1111111111111111111e-324" , |
76 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc::result_out_of_range, .correct_value: 0x0.0000000000000p+0}, |
77 | {.input: "2." |
78 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
79 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
80 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
81 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
82 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
83 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
84 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
85 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
86 | "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" |
87 | "2222222222222222222e-324" , |
88 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc::result_out_of_range, .correct_value: 0x0.0000000000000p+0}, |
89 | {.input: "3." |
90 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
91 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
92 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
93 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
94 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
95 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
96 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
97 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
98 | "3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" |
99 | "3333333333333333333e-324" , |
100 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
101 | {.input: "4." |
102 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
103 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
104 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
105 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
106 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
107 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
108 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
109 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
110 | "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444" |
111 | "4444444444444444444e-324" , |
112 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
113 | {.input: "5." |
114 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
115 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
116 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
117 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
118 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
119 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
120 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
121 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
122 | "5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555" |
123 | "5555555555555555555e-324" , |
124 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
125 | {.input: "6." |
126 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
127 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
128 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
129 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
130 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
131 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
132 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
133 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
134 | "6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" |
135 | "6666666666666666666e-324" , |
136 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
137 | {.input: "7." |
138 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
139 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
140 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
141 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
142 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
143 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
144 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
145 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
146 | "7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" |
147 | "7777777777777777777e-324" , |
148 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000002p-1022}, |
149 | {.input: "8." |
150 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
151 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
152 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
153 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
154 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
155 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
156 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
157 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
158 | "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888" |
159 | "8888888888888888888e-324" , |
160 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000002p-1022}, |
161 | {.input: "9." |
162 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
163 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
164 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
165 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
166 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
167 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
168 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
169 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
170 | "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" |
171 | "9999999999999999999e-324" , |
172 | .fmt: chars_format::scientific, .correct_idx: 1007, .correct_ec: errc{}, .correct_value: 0x0.0000000000002p-1022}, |
173 | |
174 | // VSO-852024: Test cases for round-to-nearest, ties-to-even. |
175 | // Consider the values: |
176 | // A: 0x1.0000000000000p+0 == 1.0000000000000000000000000000000000000000000000000000 |
177 | // X: (1 + 2^-53) * 2^0 == 1.00000000000000011102230246251565404236316680908203125 |
178 | // B: 0x1.0000000000001p+0 == 1.0000000000000002220446049250313080847263336181640625 |
179 | // X is equidistant from A and B. Because they're tied for being nearest, we need to round to even. |
180 | // That means rounding down to A, because A's least significant hexit 0 is even. |
181 | // However, values between X and B aren't tied - they're simply nearer to B, so they need to round up to B. |
182 | // We need to handle tricky cases like the digits of X, followed by a million 0 digits, followed by a 1 digit. |
183 | // Similarly: |
184 | // E: 0x1.ffffffffffffep+0 == 1.999999999999999555910790149937383830547332763671875 |
185 | // Y: (1 + 1 - 3 * 2^-53) * 2^0 == 1.99999999999999966693309261245303787291049957275390625 |
186 | // F: 0x1.fffffffffffffp+0 == 1.9999999999999997779553950749686919152736663818359375 |
187 | // The hexit E is 14 and even, while F is 15 and odd. |
188 | |
189 | // just below (0 + 2^-53) * 2^-1022: decremented last digit, then appended three 9 digits |
190 | {.input: "0." |
191 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
192 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
193 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470" |
194 | "3282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772" |
195 | "2858865463328355177969898199387398005390939063150356595155702263922908583924491051844359318028499365361525003" |
196 | "1937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357" |
197 | "9574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324" |
198 | "6736009689513405355374585166611342237666786041621596804619144672918403005300575308490487653917113865916462395" |
199 | "2491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625" |
200 | "4779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328124999" , |
201 | .fmt: chars_format::fixed, .correct_idx: 1080, .correct_ec: errc::result_out_of_range, .correct_value: 0x0.0000000000000p+0}, |
202 | |
203 | // (0 + 2^-53) * 2^-1022 exactly |
204 | {.input: "0." |
205 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
206 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
207 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470" |
208 | "3282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772" |
209 | "2858865463328355177969898199387398005390939063150356595155702263922908583924491051844359318028499365361525003" |
210 | "1937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357" |
211 | "9574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324" |
212 | "6736009689513405355374585166611342237666786041621596804619144672918403005300575308490487653917113865916462395" |
213 | "2491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625" |
214 | "4779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125" , |
215 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc::result_out_of_range, .correct_value: 0x0.0000000000000p+0}, |
216 | |
217 | // (0 + 2^-53) * 2^-1022 exactly, followed by a thousand 0 digits |
218 | {.input: "0." |
219 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
220 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
221 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470" |
222 | "3282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772" |
223 | "2858865463328355177969898199387398005390939063150356595155702263922908583924491051844359318028499365361525003" |
224 | "1937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357" |
225 | "9574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324" |
226 | "6736009689513405355374585166611342237666786041621596804619144672918403005300575308490487653917113865916462395" |
227 | "2491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625" |
228 | "4779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125000000000000000" |
229 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
230 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
231 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
232 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
233 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
234 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
235 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
236 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
237 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
238 | "0000" , |
239 | .fmt: chars_format::fixed, .correct_idx: 2077, .correct_ec: errc::result_out_of_range, .correct_value: 0x0.0000000000000p+0}, |
240 | |
241 | // above (0 + 2^-53) * 2^-1022: appended a thousand 0 digits followed by a 1 digit |
242 | {.input: "0." |
243 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
244 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
245 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470" |
246 | "3282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772" |
247 | "2858865463328355177969898199387398005390939063150356595155702263922908583924491051844359318028499365361525003" |
248 | "1937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357" |
249 | "9574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324" |
250 | "6736009689513405355374585166611342237666786041621596804619144672918403005300575308490487653917113865916462395" |
251 | "2491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625" |
252 | "4779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125000000000000000" |
253 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
254 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
255 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
256 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
257 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
258 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
259 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
260 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
261 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
262 | "00001" , |
263 | .fmt: chars_format::fixed, .correct_idx: 2078, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
264 | |
265 | // above (0 + 2^-53) * 2^-1022: appended a 1 digit |
266 | {.input: "0." |
267 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
268 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
269 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470" |
270 | "3282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772" |
271 | "2858865463328355177969898199387398005390939063150356595155702263922908583924491051844359318028499365361525003" |
272 | "1937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357" |
273 | "9574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324" |
274 | "6736009689513405355374585166611342237666786041621596804619144672918403005300575308490487653917113865916462395" |
275 | "2491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625" |
276 | "47791869486679949683240497058210285131854513962138377228261454376934125320985913276672363281251" , |
277 | .fmt: chars_format::fixed, .correct_idx: 1078, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
278 | |
279 | // above (0 + 2^-53) * 2^-1022: incremented last digit |
280 | {.input: "0." |
281 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
282 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
283 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470" |
284 | "3282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772" |
285 | "2858865463328355177969898199387398005390939063150356595155702263922908583924491051844359318028499365361525003" |
286 | "1937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357" |
287 | "9574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324" |
288 | "6736009689513405355374585166611342237666786041621596804619144672918403005300575308490487653917113865916462395" |
289 | "2491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625" |
290 | "4779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328126" , |
291 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
292 | |
293 | // just below (0 + 1 - 3 * 2^-53) * 2^-1022: decremented last digit, then appended three 9 digits |
294 | {.input: "0." |
295 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
296 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
297 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072006419" |
298 | "9176395546258779936602667813027328296362349540005779643539444484102225369938322261431279727704724131030539099" |
299 | "2976863718870946851468024222968583977359185141028540361975476844303195813273469348201130421165308554532083149" |
300 | "3676067608324920106709384047261543474082573017216837765643921010648239116172158852475760231303527077156200284" |
301 | "1775343298712758123539074213191978739083589771549597066404661620550578925994422322342444472859570416955675758" |
302 | "5423752417124134805999073137808018133811049489046686648944255834488901008259721496147104204399198556535697531" |
303 | "0055231935448663898095485089604066035268185282450207861510244351362091237759797852153577038777504570568436147" |
304 | "5530270683064113556748943345076587312006145811358486831521563686919762403704226016998291015624999" , |
305 | .fmt: chars_format::fixed, .correct_idx: 1080, .correct_ec: errc{}, .correct_value: 0x0.ffffffffffffep-1022}, |
306 | |
307 | // (0 + 1 - 3 * 2^-53) * 2^-1022 exactly |
308 | {.input: "0." |
309 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
310 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
311 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072006419" |
312 | "9176395546258779936602667813027328296362349540005779643539444484102225369938322261431279727704724131030539099" |
313 | "2976863718870946851468024222968583977359185141028540361975476844303195813273469348201130421165308554532083149" |
314 | "3676067608324920106709384047261543474082573017216837765643921010648239116172158852475760231303527077156200284" |
315 | "1775343298712758123539074213191978739083589771549597066404661620550578925994422322342444472859570416955675758" |
316 | "5423752417124134805999073137808018133811049489046686648944255834488901008259721496147104204399198556535697531" |
317 | "0055231935448663898095485089604066035268185282450207861510244351362091237759797852153577038777504570568436147" |
318 | "5530270683064113556748943345076587312006145811358486831521563686919762403704226016998291015625" , |
319 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x0.ffffffffffffep-1022}, |
320 | |
321 | // (0 + 1 - 3 * 2^-53) * 2^-1022 exactly, followed by a thousand 0 digits |
322 | {.input: "0." |
323 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
324 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
325 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072006419" |
326 | "9176395546258779936602667813027328296362349540005779643539444484102225369938322261431279727704724131030539099" |
327 | "2976863718870946851468024222968583977359185141028540361975476844303195813273469348201130421165308554532083149" |
328 | "3676067608324920106709384047261543474082573017216837765643921010648239116172158852475760231303527077156200284" |
329 | "1775343298712758123539074213191978739083589771549597066404661620550578925994422322342444472859570416955675758" |
330 | "5423752417124134805999073137808018133811049489046686648944255834488901008259721496147104204399198556535697531" |
331 | "0055231935448663898095485089604066035268185282450207861510244351362091237759797852153577038777504570568436147" |
332 | "5530270683064113556748943345076587312006145811358486831521563686919762403704226016998291015625000000000000000" |
333 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
334 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
335 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
336 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
337 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
338 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
339 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
340 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
341 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
342 | "0000" , |
343 | .fmt: chars_format::fixed, .correct_idx: 2077, .correct_ec: errc{}, .correct_value: 0x0.ffffffffffffep-1022}, |
344 | |
345 | // above (0 + 1 - 3 * 2^-53) * 2^-1022: appended a thousand 0 digits followed by a 1 digit |
346 | {.input: "0." |
347 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
348 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
349 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072006419" |
350 | "9176395546258779936602667813027328296362349540005779643539444484102225369938322261431279727704724131030539099" |
351 | "2976863718870946851468024222968583977359185141028540361975476844303195813273469348201130421165308554532083149" |
352 | "3676067608324920106709384047261543474082573017216837765643921010648239116172158852475760231303527077156200284" |
353 | "1775343298712758123539074213191978739083589771549597066404661620550578925994422322342444472859570416955675758" |
354 | "5423752417124134805999073137808018133811049489046686648944255834488901008259721496147104204399198556535697531" |
355 | "0055231935448663898095485089604066035268185282450207861510244351362091237759797852153577038777504570568436147" |
356 | "5530270683064113556748943345076587312006145811358486831521563686919762403704226016998291015625000000000000000" |
357 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
358 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
359 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
360 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
361 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
362 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
363 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
364 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
365 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
366 | "00001" , |
367 | .fmt: chars_format::fixed, .correct_idx: 2078, .correct_ec: errc{}, .correct_value: 0x0.fffffffffffffp-1022}, |
368 | |
369 | // above (0 + 1 - 3 * 2^-53) * 2^-1022: appended a 1 digit |
370 | {.input: "0." |
371 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
372 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
373 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072006419" |
374 | "9176395546258779936602667813027328296362349540005779643539444484102225369938322261431279727704724131030539099" |
375 | "2976863718870946851468024222968583977359185141028540361975476844303195813273469348201130421165308554532083149" |
376 | "3676067608324920106709384047261543474082573017216837765643921010648239116172158852475760231303527077156200284" |
377 | "1775343298712758123539074213191978739083589771549597066404661620550578925994422322342444472859570416955675758" |
378 | "5423752417124134805999073137808018133811049489046686648944255834488901008259721496147104204399198556535697531" |
379 | "0055231935448663898095485089604066035268185282450207861510244351362091237759797852153577038777504570568436147" |
380 | "55302706830641135567489433450765873120061458113584868315215636869197624037042260169982910156251" , |
381 | .fmt: chars_format::fixed, .correct_idx: 1078, .correct_ec: errc{}, .correct_value: 0x0.fffffffffffffp-1022}, |
382 | |
383 | // above (0 + 1 - 3 * 2^-53) * 2^-1022: incremented last digit |
384 | {.input: "0." |
385 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
386 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
387 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072006419" |
388 | "9176395546258779936602667813027328296362349540005779643539444484102225369938322261431279727704724131030539099" |
389 | "2976863718870946851468024222968583977359185141028540361975476844303195813273469348201130421165308554532083149" |
390 | "3676067608324920106709384047261543474082573017216837765643921010648239116172158852475760231303527077156200284" |
391 | "1775343298712758123539074213191978739083589771549597066404661620550578925994422322342444472859570416955675758" |
392 | "5423752417124134805999073137808018133811049489046686648944255834488901008259721496147104204399198556535697531" |
393 | "0055231935448663898095485089604066035268185282450207861510244351362091237759797852153577038777504570568436147" |
394 | "5530270683064113556748943345076587312006145811358486831521563686919762403704226016998291015626" , |
395 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x0.fffffffffffffp-1022}, |
396 | |
397 | // just below (1 + 2^-53) * 2^-1022: decremented last digit, then appended three 9 digits |
398 | {.input: "0." |
399 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
400 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
401 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072016301" |
402 | "2305563795567615250361241457301801308322872404958664760675944619203679411688695321398552054903200090343478188" |
403 | "4412325572184367563347617020518175998922941393629966742598285899994830148971433555578567693279306015978183162" |
404 | "1424250679624607852958851992724935776883207324924799248168692322471659649343292587839501022509739575795105716" |
405 | "0073834364573849432419299709217920738991976169431413149717326525502008499797367678374315520581880443916381057" |
406 | "2367791175177756227497413804253387084478193655533073867420834526162513029462022730109054820067654020201547112" |
407 | "0020281397001415752591234401773622442737124681517501897455599786532342558862196115163359241679580296044770649" |
408 | "4647018477736093430045142168360701364747951396213837722826145437693412532098591327667236328124999" , |
409 | .fmt: chars_format::fixed, .correct_idx: 1080, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p-1022}, |
410 | |
411 | // (1 + 2^-53) * 2^-1022 exactly |
412 | {.input: "0." |
413 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
414 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
415 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072016301" |
416 | "2305563795567615250361241457301801308322872404958664760675944619203679411688695321398552054903200090343478188" |
417 | "4412325572184367563347617020518175998922941393629966742598285899994830148971433555578567693279306015978183162" |
418 | "1424250679624607852958851992724935776883207324924799248168692322471659649343292587839501022509739575795105716" |
419 | "0073834364573849432419299709217920738991976169431413149717326525502008499797367678374315520581880443916381057" |
420 | "2367791175177756227497413804253387084478193655533073867420834526162513029462022730109054820067654020201547112" |
421 | "0020281397001415752591234401773622442737124681517501897455599786532342558862196115163359241679580296044770649" |
422 | "4647018477736093430045142168360701364747951396213837722826145437693412532098591327667236328125" , |
423 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p-1022}, |
424 | |
425 | // (1 + 2^-53) * 2^-1022 exactly, followed by a thousand 0 digits |
426 | {.input: "0." |
427 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
428 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
429 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072016301" |
430 | "2305563795567615250361241457301801308322872404958664760675944619203679411688695321398552054903200090343478188" |
431 | "4412325572184367563347617020518175998922941393629966742598285899994830148971433555578567693279306015978183162" |
432 | "1424250679624607852958851992724935776883207324924799248168692322471659649343292587839501022509739575795105716" |
433 | "0073834364573849432419299709217920738991976169431413149717326525502008499797367678374315520581880443916381057" |
434 | "2367791175177756227497413804253387084478193655533073867420834526162513029462022730109054820067654020201547112" |
435 | "0020281397001415752591234401773622442737124681517501897455599786532342558862196115163359241679580296044770649" |
436 | "4647018477736093430045142168360701364747951396213837722826145437693412532098591327667236328125000000000000000" |
437 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
438 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
439 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
440 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
441 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
442 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
443 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
444 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
445 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
446 | "0000" , |
447 | .fmt: chars_format::fixed, .correct_idx: 2077, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p-1022}, |
448 | |
449 | // above (1 + 2^-53) * 2^-1022: appended a thousand 0 digits followed by a 1 digit |
450 | {.input: "0." |
451 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
452 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
453 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072016301" |
454 | "2305563795567615250361241457301801308322872404958664760675944619203679411688695321398552054903200090343478188" |
455 | "4412325572184367563347617020518175998922941393629966742598285899994830148971433555578567693279306015978183162" |
456 | "1424250679624607852958851992724935776883207324924799248168692322471659649343292587839501022509739575795105716" |
457 | "0073834364573849432419299709217920738991976169431413149717326525502008499797367678374315520581880443916381057" |
458 | "2367791175177756227497413804253387084478193655533073867420834526162513029462022730109054820067654020201547112" |
459 | "0020281397001415752591234401773622442737124681517501897455599786532342558862196115163359241679580296044770649" |
460 | "4647018477736093430045142168360701364747951396213837722826145437693412532098591327667236328125000000000000000" |
461 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
462 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
463 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
464 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
465 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
466 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
467 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
468 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
469 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
470 | "00001" , |
471 | .fmt: chars_format::fixed, .correct_idx: 2078, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p-1022}, |
472 | |
473 | // above (1 + 2^-53) * 2^-1022: appended a 1 digit |
474 | {.input: "0." |
475 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
476 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
477 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072016301" |
478 | "2305563795567615250361241457301801308322872404958664760675944619203679411688695321398552054903200090343478188" |
479 | "4412325572184367563347617020518175998922941393629966742598285899994830148971433555578567693279306015978183162" |
480 | "1424250679624607852958851992724935776883207324924799248168692322471659649343292587839501022509739575795105716" |
481 | "0073834364573849432419299709217920738991976169431413149717326525502008499797367678374315520581880443916381057" |
482 | "2367791175177756227497413804253387084478193655533073867420834526162513029462022730109054820067654020201547112" |
483 | "0020281397001415752591234401773622442737124681517501897455599786532342558862196115163359241679580296044770649" |
484 | "46470184777360934300451421683607013647479513962138377228261454376934125320985913276672363281251" , |
485 | .fmt: chars_format::fixed, .correct_idx: 1078, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p-1022}, |
486 | |
487 | // above (1 + 2^-53) * 2^-1022: incremented last digit |
488 | {.input: "0." |
489 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
490 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
491 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072016301" |
492 | "2305563795567615250361241457301801308322872404958664760675944619203679411688695321398552054903200090343478188" |
493 | "4412325572184367563347617020518175998922941393629966742598285899994830148971433555578567693279306015978183162" |
494 | "1424250679624607852958851992724935776883207324924799248168692322471659649343292587839501022509739575795105716" |
495 | "0073834364573849432419299709217920738991976169431413149717326525502008499797367678374315520581880443916381057" |
496 | "2367791175177756227497413804253387084478193655533073867420834526162513029462022730109054820067654020201547112" |
497 | "0020281397001415752591234401773622442737124681517501897455599786532342558862196115163359241679580296044770649" |
498 | "4647018477736093430045142168360701364747951396213837722826145437693412532098591327667236328126" , |
499 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p-1022}, |
500 | |
501 | // just below (1 + 1 - 3 * 2^-53) * 2^-1022: decremented last digit, then appended three 9 digits |
502 | {.input: "0." |
503 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
504 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
505 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144020250" |
506 | "8199667279499186358524265859260511351695091228726223124931264069530541271189424317838013700808305231545782515" |
507 | "4530323827726959236845743044099361970891187471508150509418060480375117378320411851935338796416115205148741308" |
508 | "3163272520124606023105869053620631175265621765214646643181420505164043632222668006474326056011713528291579642" |
509 | "2274554896821334728738317548403413978098469341510556195293821919814730032341053661708792231510873354131880491" |
510 | "1055533902788485678121901775450062980622457102958163711745945687733011032421168917765671370549738710820782247" |
511 | "7584250967061891687062782163335299376138075114200886249979505279101870966346394401564490729731565935244123171" |
512 | "5398102212132212018470035807616260163568645811358486831521563686919762403704226016998291015624999" , |
513 | .fmt: chars_format::fixed, .correct_idx: 1080, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep-1022}, |
514 | |
515 | // (1 + 1 - 3 * 2^-53) * 2^-1022 exactly |
516 | {.input: "0." |
517 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
518 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
519 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144020250" |
520 | "8199667279499186358524265859260511351695091228726223124931264069530541271189424317838013700808305231545782515" |
521 | "4530323827726959236845743044099361970891187471508150509418060480375117378320411851935338796416115205148741308" |
522 | "3163272520124606023105869053620631175265621765214646643181420505164043632222668006474326056011713528291579642" |
523 | "2274554896821334728738317548403413978098469341510556195293821919814730032341053661708792231510873354131880491" |
524 | "1055533902788485678121901775450062980622457102958163711745945687733011032421168917765671370549738710820782247" |
525 | "7584250967061891687062782163335299376138075114200886249979505279101870966346394401564490729731565935244123171" |
526 | "5398102212132212018470035807616260163568645811358486831521563686919762403704226016998291015625" , |
527 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep-1022}, |
528 | |
529 | // (1 + 1 - 3 * 2^-53) * 2^-1022 exactly, followed by a thousand 0 digits |
530 | {.input: "0." |
531 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
532 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
533 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144020250" |
534 | "8199667279499186358524265859260511351695091228726223124931264069530541271189424317838013700808305231545782515" |
535 | "4530323827726959236845743044099361970891187471508150509418060480375117378320411851935338796416115205148741308" |
536 | "3163272520124606023105869053620631175265621765214646643181420505164043632222668006474326056011713528291579642" |
537 | "2274554896821334728738317548403413978098469341510556195293821919814730032341053661708792231510873354131880491" |
538 | "1055533902788485678121901775450062980622457102958163711745945687733011032421168917765671370549738710820782247" |
539 | "7584250967061891687062782163335299376138075114200886249979505279101870966346394401564490729731565935244123171" |
540 | "5398102212132212018470035807616260163568645811358486831521563686919762403704226016998291015625000000000000000" |
541 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
542 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
543 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
544 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
545 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
546 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
547 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
548 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
549 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
550 | "0000" , |
551 | .fmt: chars_format::fixed, .correct_idx: 2077, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep-1022}, |
552 | |
553 | // above (1 + 1 - 3 * 2^-53) * 2^-1022: appended a thousand 0 digits followed by a 1 digit |
554 | {.input: "0." |
555 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
556 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
557 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144020250" |
558 | "8199667279499186358524265859260511351695091228726223124931264069530541271189424317838013700808305231545782515" |
559 | "4530323827726959236845743044099361970891187471508150509418060480375117378320411851935338796416115205148741308" |
560 | "3163272520124606023105869053620631175265621765214646643181420505164043632222668006474326056011713528291579642" |
561 | "2274554896821334728738317548403413978098469341510556195293821919814730032341053661708792231510873354131880491" |
562 | "1055533902788485678121901775450062980622457102958163711745945687733011032421168917765671370549738710820782247" |
563 | "7584250967061891687062782163335299376138075114200886249979505279101870966346394401564490729731565935244123171" |
564 | "5398102212132212018470035807616260163568645811358486831521563686919762403704226016998291015625000000000000000" |
565 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
566 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
567 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
568 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
569 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
570 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
571 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
572 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
573 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
574 | "00001" , |
575 | .fmt: chars_format::fixed, .correct_idx: 2078, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp-1022}, |
576 | |
577 | // above (1 + 1 - 3 * 2^-53) * 2^-1022: appended a 1 digit |
578 | {.input: "0." |
579 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
580 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
581 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144020250" |
582 | "8199667279499186358524265859260511351695091228726223124931264069530541271189424317838013700808305231545782515" |
583 | "4530323827726959236845743044099361970891187471508150509418060480375117378320411851935338796416115205148741308" |
584 | "3163272520124606023105869053620631175265621765214646643181420505164043632222668006474326056011713528291579642" |
585 | "2274554896821334728738317548403413978098469341510556195293821919814730032341053661708792231510873354131880491" |
586 | "1055533902788485678121901775450062980622457102958163711745945687733011032421168917765671370549738710820782247" |
587 | "7584250967061891687062782163335299376138075114200886249979505279101870966346394401564490729731565935244123171" |
588 | "53981022121322120184700358076162601635686458113584868315215636869197624037042260169982910156251" , |
589 | .fmt: chars_format::fixed, .correct_idx: 1078, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp-1022}, |
590 | |
591 | // above (1 + 1 - 3 * 2^-53) * 2^-1022: incremented last digit |
592 | {.input: "0." |
593 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
594 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
595 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144020250" |
596 | "8199667279499186358524265859260511351695091228726223124931264069530541271189424317838013700808305231545782515" |
597 | "4530323827726959236845743044099361970891187471508150509418060480375117378320411851935338796416115205148741308" |
598 | "3163272520124606023105869053620631175265621765214646643181420505164043632222668006474326056011713528291579642" |
599 | "2274554896821334728738317548403413978098469341510556195293821919814730032341053661708792231510873354131880491" |
600 | "1055533902788485678121901775450062980622457102958163711745945687733011032421168917765671370549738710820782247" |
601 | "7584250967061891687062782163335299376138075114200886249979505279101870966346394401564490729731565935244123171" |
602 | "5398102212132212018470035807616260163568645811358486831521563686919762403704226016998291015626" , |
603 | .fmt: chars_format::fixed, .correct_idx: 1077, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp-1022}, |
604 | |
605 | // just below (1 + 2^-53) * 2^-33: decremented last digit, then appended three 9 digits |
606 | {.input: "0.00000000011641532182693482737782207114105741986576081359316958696581423282623291015624999" , .fmt: chars_format::fixed, |
607 | .correct_idx: 91, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p-33}, |
608 | |
609 | // (1 + 2^-53) * 2^-33 exactly |
610 | {.input: "0.00000000011641532182693482737782207114105741986576081359316958696581423282623291015625" , .fmt: chars_format::fixed, |
611 | .correct_idx: 88, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p-33}, |
612 | |
613 | // (1 + 2^-53) * 2^-33 exactly, followed by a thousand 0 digits |
614 | {.input: "0." |
615 | "0000000001164153218269348273778220711410574198657608135931695869658142328262329101562500000000000000000000000" |
616 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
617 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
618 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
619 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
620 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
621 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
622 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
623 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
624 | "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , |
625 | .fmt: chars_format::fixed, .correct_idx: 1088, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p-33}, |
626 | |
627 | // above (1 + 2^-53) * 2^-33: appended a thousand 0 digits followed by a 1 digit |
628 | {.input: "0." |
629 | "0000000001164153218269348273778220711410574198657608135931695869658142328262329101562500000000000000000000000" |
630 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
631 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
632 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
633 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
634 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
635 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
636 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
637 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
638 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" , |
639 | .fmt: chars_format::fixed, .correct_idx: 1089, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p-33}, |
640 | |
641 | // above (1 + 2^-53) * 2^-33: appended a 1 digit |
642 | {.input: "0.000000000116415321826934827377822071141057419865760813593169586965814232826232910156251" , .fmt: chars_format::fixed, |
643 | .correct_idx: 89, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p-33}, |
644 | |
645 | // above (1 + 2^-53) * 2^-33: incremented last digit |
646 | {.input: "0.00000000011641532182693482737782207114105741986576081359316958696581423282623291015626" , .fmt: chars_format::fixed, |
647 | .correct_idx: 88, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p-33}, |
648 | |
649 | // just below (1 + 1 - 3 * 2^-53) * 2^-33: decremented last digit, then appended three 9 digits |
650 | {.input: "0.00000000023283064365386959013215878657682774040271755922049123910255730152130126953124999" , .fmt: chars_format::fixed, |
651 | .correct_idx: 91, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep-33}, |
652 | |
653 | // (1 + 1 - 3 * 2^-53) * 2^-33 exactly |
654 | {.input: "0.00000000023283064365386959013215878657682774040271755922049123910255730152130126953125" , .fmt: chars_format::fixed, |
655 | .correct_idx: 88, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep-33}, |
656 | |
657 | // (1 + 1 - 3 * 2^-53) * 2^-33 exactly, followed by a thousand 0 digits |
658 | {.input: "0." |
659 | "0000000002328306436538695901321587865768277404027175592204912391025573015213012695312500000000000000000000000" |
660 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
661 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
662 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
663 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
664 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
665 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
666 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
667 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
668 | "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , |
669 | .fmt: chars_format::fixed, .correct_idx: 1088, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep-33}, |
670 | |
671 | // above (1 + 1 - 3 * 2^-53) * 2^-33: appended a thousand 0 digits followed by a 1 digit |
672 | {.input: "0." |
673 | "0000000002328306436538695901321587865768277404027175592204912391025573015213012695312500000000000000000000000" |
674 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
675 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
676 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
677 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
678 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
679 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
680 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
681 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
682 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" , |
683 | .fmt: chars_format::fixed, .correct_idx: 1089, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp-33}, |
684 | |
685 | // above (1 + 1 - 3 * 2^-53) * 2^-33: appended a 1 digit |
686 | {.input: "0.000000000232830643653869590132158786576827740402717559220491239102557301521301269531251" , .fmt: chars_format::fixed, |
687 | .correct_idx: 89, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp-33}, |
688 | |
689 | // above (1 + 1 - 3 * 2^-53) * 2^-33: incremented last digit |
690 | {.input: "0.00000000023283064365386959013215878657682774040271755922049123910255730152130126953126" , .fmt: chars_format::fixed, |
691 | .correct_idx: 88, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp-33}, |
692 | |
693 | // just below (1 + 2^-53) * 2^0: decremented last digit, then appended three 9 digits |
694 | {.input: "1.00000000000000011102230246251565404236316680908203124999" , .fmt: chars_format::fixed, .correct_idx: 58, .correct_ec: errc{}, |
695 | .correct_value: 0x1.0000000000000p+0}, |
696 | |
697 | // (1 + 2^-53) * 2^0 exactly |
698 | {.input: "1.00000000000000011102230246251565404236316680908203125" , .fmt: chars_format::fixed, .correct_idx: 55, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+0}, |
699 | |
700 | // (1 + 2^-53) * 2^0 exactly, followed by a thousand 0 digits |
701 | {.input: "1." |
702 | "0000000000000001110223024625156540423631668090820312500000000000000000000000000000000000000000000000000000000" |
703 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
704 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
705 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
706 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
707 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
708 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
709 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
710 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
711 | "000000000000000000000000000000000000000000000000000000000000000000000000" , |
712 | .fmt: chars_format::fixed, .correct_idx: 1055, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+0}, |
713 | |
714 | // above (1 + 2^-53) * 2^0: appended a thousand 0 digits followed by a 1 digit |
715 | {.input: "1." |
716 | "0000000000000001110223024625156540423631668090820312500000000000000000000000000000000000000000000000000000000" |
717 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
718 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
719 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
720 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
721 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
722 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
723 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
724 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
725 | "0000000000000000000000000000000000000000000000000000000000000000000000001" , |
726 | .fmt: chars_format::fixed, .correct_idx: 1056, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+0}, |
727 | |
728 | // above (1 + 2^-53) * 2^0: appended a 1 digit |
729 | {.input: "1.000000000000000111022302462515654042363166809082031251" , .fmt: chars_format::fixed, .correct_idx: 56, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+0}, |
730 | |
731 | // above (1 + 2^-53) * 2^0: incremented last digit |
732 | {.input: "1.00000000000000011102230246251565404236316680908203126" , .fmt: chars_format::fixed, .correct_idx: 55, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+0}, |
733 | |
734 | // just below (1 + 1 - 3 * 2^-53) * 2^0: decremented last digit, then appended three 9 digits |
735 | {.input: "1.99999999999999966693309261245303787291049957275390624999" , .fmt: chars_format::fixed, .correct_idx: 58, .correct_ec: errc{}, |
736 | .correct_value: 0x1.ffffffffffffep+0}, |
737 | |
738 | // (1 + 1 - 3 * 2^-53) * 2^0 exactly |
739 | {.input: "1.99999999999999966693309261245303787291049957275390625" , .fmt: chars_format::fixed, .correct_idx: 55, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+0}, |
740 | |
741 | // (1 + 1 - 3 * 2^-53) * 2^0 exactly, followed by a thousand 0 digits |
742 | {.input: "1." |
743 | "9999999999999996669330926124530378729104995727539062500000000000000000000000000000000000000000000000000000000" |
744 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
745 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
746 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
747 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
748 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
749 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
750 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
751 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
752 | "000000000000000000000000000000000000000000000000000000000000000000000000" , |
753 | .fmt: chars_format::fixed, .correct_idx: 1055, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+0}, |
754 | |
755 | // above (1 + 1 - 3 * 2^-53) * 2^0: appended a thousand 0 digits followed by a 1 digit |
756 | {.input: "1." |
757 | "9999999999999996669330926124530378729104995727539062500000000000000000000000000000000000000000000000000000000" |
758 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
759 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
760 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
761 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
762 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
763 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
764 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
765 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
766 | "0000000000000000000000000000000000000000000000000000000000000000000000001" , |
767 | .fmt: chars_format::fixed, .correct_idx: 1056, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+0}, |
768 | |
769 | // above (1 + 1 - 3 * 2^-53) * 2^0: appended a 1 digit |
770 | {.input: "1.999999999999999666933092612453037872910499572753906251" , .fmt: chars_format::fixed, .correct_idx: 56, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+0}, |
771 | |
772 | // above (1 + 1 - 3 * 2^-53) * 2^0: incremented last digit |
773 | {.input: "1.99999999999999966693309261245303787291049957275390626" , .fmt: chars_format::fixed, .correct_idx: 55, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+0}, |
774 | |
775 | // just below (1 + 2^-53) * 2^33: decremented last digit, then appended three 9 digits |
776 | {.input: "8589934592.00000095367431640624999" , .fmt: chars_format::fixed, .correct_idx: 34, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+33}, |
777 | |
778 | // (1 + 2^-53) * 2^33 exactly |
779 | {.input: "8589934592.00000095367431640625" , .fmt: chars_format::fixed, .correct_idx: 31, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+33}, |
780 | |
781 | // (1 + 2^-53) * 2^33 exactly, followed by a thousand 0 digits |
782 | {.input: "8589934592." |
783 | "0000009536743164062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
784 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
785 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
786 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
787 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
788 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
789 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
790 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
791 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
792 | "000000000000000000000000000000000000000" , |
793 | .fmt: chars_format::fixed, .correct_idx: 1031, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+33}, |
794 | |
795 | // above (1 + 2^-53) * 2^33: appended a thousand 0 digits followed by a 1 digit |
796 | {.input: "8589934592." |
797 | "0000009536743164062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
798 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
799 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
800 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
801 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
802 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
803 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
804 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
805 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
806 | "0000000000000000000000000000000000000001" , |
807 | .fmt: chars_format::fixed, .correct_idx: 1032, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+33}, |
808 | |
809 | // above (1 + 2^-53) * 2^33: appended a 1 digit |
810 | {.input: "8589934592.000000953674316406251" , .fmt: chars_format::fixed, .correct_idx: 32, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+33}, |
811 | |
812 | // above (1 + 2^-53) * 2^33: incremented last digit |
813 | {.input: "8589934592.00000095367431640626" , .fmt: chars_format::fixed, .correct_idx: 31, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+33}, |
814 | |
815 | // just below (1 + 1 - 3 * 2^-53) * 2^33: decremented last digit, then appended three 9 digits |
816 | {.input: "17179869183.99999713897705078124999" , .fmt: chars_format::fixed, .correct_idx: 35, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+33}, |
817 | |
818 | // (1 + 1 - 3 * 2^-53) * 2^33 exactly |
819 | {.input: "17179869183.99999713897705078125" , .fmt: chars_format::fixed, .correct_idx: 32, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+33}, |
820 | |
821 | // (1 + 1 - 3 * 2^-53) * 2^33 exactly, followed by a thousand 0 digits |
822 | {.input: "17179869183." |
823 | "9999971389770507812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
824 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
825 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
826 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
827 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
828 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
829 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
830 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
831 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
832 | "000000000000000000000000000000000000000" , |
833 | .fmt: chars_format::fixed, .correct_idx: 1032, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+33}, |
834 | |
835 | // above (1 + 1 - 3 * 2^-53) * 2^33: appended a thousand 0 digits followed by a 1 digit |
836 | {.input: "17179869183." |
837 | "9999971389770507812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
838 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
839 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
840 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
841 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
842 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
843 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
844 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
845 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
846 | "0000000000000000000000000000000000000001" , |
847 | .fmt: chars_format::fixed, .correct_idx: 1033, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+33}, |
848 | |
849 | // above (1 + 1 - 3 * 2^-53) * 2^33: appended a 1 digit |
850 | {.input: "17179869183.999997138977050781251" , .fmt: chars_format::fixed, .correct_idx: 33, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+33}, |
851 | |
852 | // above (1 + 1 - 3 * 2^-53) * 2^33: incremented last digit |
853 | {.input: "17179869183.99999713897705078126" , .fmt: chars_format::fixed, .correct_idx: 32, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+33}, |
854 | |
855 | // just below (1 + 2^-53) * 2^77: decremented last digit, then appended three 9 digits |
856 | {.input: "151115727451828663615487.999" , .fmt: chars_format::fixed, .correct_idx: 28, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+77}, |
857 | |
858 | // (1 + 2^-53) * 2^77 exactly |
859 | {.input: "151115727451828663615488" , .fmt: chars_format::fixed, .correct_idx: 24, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+77}, |
860 | |
861 | // (1 + 2^-53) * 2^77 exactly, followed by a thousand 0 digits |
862 | {.input: "151115727451828663615488." |
863 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
864 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
865 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
866 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
867 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
868 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
869 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
870 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
871 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
872 | "0000000000000000000" , |
873 | .fmt: chars_format::fixed, .correct_idx: 1025, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+77}, |
874 | |
875 | // above (1 + 2^-53) * 2^77: appended a thousand 0 digits followed by a 1 digit |
876 | {.input: "151115727451828663615488." |
877 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
878 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
879 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
880 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
881 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
882 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
883 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
884 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
885 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
886 | "00000000000000000001" , |
887 | .fmt: chars_format::fixed, .correct_idx: 1026, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+77}, |
888 | |
889 | // above (1 + 2^-53) * 2^77: appended a 1 digit |
890 | {.input: "151115727451828663615488.1" , .fmt: chars_format::fixed, .correct_idx: 26, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+77}, |
891 | |
892 | // above (1 + 2^-53) * 2^77: incremented last digit |
893 | {.input: "151115727451828663615489" , .fmt: chars_format::fixed, .correct_idx: 24, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+77}, |
894 | |
895 | // just below (1 + 1 - 3 * 2^-53) * 2^77: decremented last digit, then appended three 9 digits |
896 | {.input: "302231454903657243344895.999" , .fmt: chars_format::fixed, .correct_idx: 28, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+77}, |
897 | |
898 | // (1 + 1 - 3 * 2^-53) * 2^77 exactly |
899 | {.input: "302231454903657243344896" , .fmt: chars_format::fixed, .correct_idx: 24, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+77}, |
900 | |
901 | // (1 + 1 - 3 * 2^-53) * 2^77 exactly, followed by a thousand 0 digits |
902 | {.input: "302231454903657243344896." |
903 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
904 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
905 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
906 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
907 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
908 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
909 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
910 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
911 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
912 | "0000000000000000000" , |
913 | .fmt: chars_format::fixed, .correct_idx: 1025, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+77}, |
914 | |
915 | // above (1 + 1 - 3 * 2^-53) * 2^77: appended a thousand 0 digits followed by a 1 digit |
916 | {.input: "302231454903657243344896." |
917 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
918 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
919 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
920 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
921 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
922 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
923 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
924 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
925 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
926 | "00000000000000000001" , |
927 | .fmt: chars_format::fixed, .correct_idx: 1026, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+77}, |
928 | |
929 | // above (1 + 1 - 3 * 2^-53) * 2^77: appended a 1 digit |
930 | {.input: "302231454903657243344896.1" , .fmt: chars_format::fixed, .correct_idx: 26, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+77}, |
931 | |
932 | // above (1 + 1 - 3 * 2^-53) * 2^77: incremented last digit |
933 | {.input: "302231454903657243344897" , .fmt: chars_format::fixed, .correct_idx: 24, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+77}, |
934 | |
935 | // just below (1 + 2^-53) * 2^1023: decremented last digit, then appended three 9 digits |
936 | {.input: "8988465674311580536566680721305029496276241413130815897397134275615404541548669375241369800602409693534988440" |
937 | "3114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859" |
938 | "063890851407391008830874765563025951597582513936655578157348020066364210154316532161708031.999" , |
939 | .fmt: chars_format::fixed, .correct_idx: 312, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+1023}, |
940 | |
941 | // (1 + 2^-53) * 2^1023 exactly |
942 | {.input: "8988465674311580536566680721305029496276241413130815897397134275615404541548669375241369800602409693534988440" |
943 | "3114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859" |
944 | "063890851407391008830874765563025951597582513936655578157348020066364210154316532161708032" , |
945 | .fmt: chars_format::fixed, .correct_idx: 308, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+1023}, |
946 | |
947 | // (1 + 2^-53) * 2^1023 exactly, followed by a thousand 0 digits |
948 | {.input: "8988465674311580536566680721305029496276241413130815897397134275615404541548669375241369800602409693534988440" |
949 | "3114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859" |
950 | "063890851407391008830874765563025951597582513936655578157348020066364210154316532161708032." |
951 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
952 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
953 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
954 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
955 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
956 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
957 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
958 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
959 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
960 | "0000000000000000000" , |
961 | .fmt: chars_format::fixed, .correct_idx: 1309, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+1023}, |
962 | |
963 | // above (1 + 2^-53) * 2^1023: appended a thousand 0 digits followed by a 1 digit |
964 | {.input: "8988465674311580536566680721305029496276241413130815897397134275615404541548669375241369800602409693534988440" |
965 | "3114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859" |
966 | "063890851407391008830874765563025951597582513936655578157348020066364210154316532161708032." |
967 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
968 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
969 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
970 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
971 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
972 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
973 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
974 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
975 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
976 | "00000000000000000001" , |
977 | .fmt: chars_format::fixed, .correct_idx: 1310, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+1023}, |
978 | |
979 | // above (1 + 2^-53) * 2^1023: appended a 1 digit |
980 | {.input: "8988465674311580536566680721305029496276241413130815897397134275615404541548669375241369800602409693534988440" |
981 | "3114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859" |
982 | "063890851407391008830874765563025951597582513936655578157348020066364210154316532161708032.1" , |
983 | .fmt: chars_format::fixed, .correct_idx: 310, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+1023}, |
984 | |
985 | // above (1 + 2^-53) * 2^1023: incremented last digit |
986 | {.input: "8988465674311580536566680721305029496276241413130815897397134275615404541548669375241369800602409693534988440" |
987 | "3114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859" |
988 | "063890851407391008830874765563025951597582513936655578157348020066364210154316532161708033" , |
989 | .fmt: chars_format::fixed, .correct_idx: 308, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+1023}, |
990 | |
991 | // just below (1 + 1 - 3 * 2^-53) * 2^1023: decremented last digit, then appended three 9 digits |
992 | {.input: "1797693134862315608353258760581052985162070023416521662616611746258695532672923265745300992879465492467506314" |
993 | "9033587701752208710592698796290627760473556921329019091915239418047621712533496094635638726128664019802903779" |
994 | "9514183602981511756283727771403830521483963923935633133642802139091669457927874464075218943.999" , |
995 | .fmt: chars_format::fixed, .correct_idx: 313, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+1023}, |
996 | |
997 | // (1 + 1 - 3 * 2^-53) * 2^1023 exactly |
998 | {.input: "1797693134862315608353258760581052985162070023416521662616611746258695532672923265745300992879465492467506314" |
999 | "9033587701752208710592698796290627760473556921329019091915239418047621712533496094635638726128664019802903779" |
1000 | "9514183602981511756283727771403830521483963923935633133642802139091669457927874464075218944" , |
1001 | .fmt: chars_format::fixed, .correct_idx: 309, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+1023}, |
1002 | |
1003 | // (1 + 1 - 3 * 2^-53) * 2^1023 exactly, followed by a thousand 0 digits |
1004 | {.input: "1797693134862315608353258760581052985162070023416521662616611746258695532672923265745300992879465492467506314" |
1005 | "9033587701752208710592698796290627760473556921329019091915239418047621712533496094635638726128664019802903779" |
1006 | "9514183602981511756283727771403830521483963923935633133642802139091669457927874464075218944." |
1007 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1008 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1009 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1010 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1011 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1012 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1013 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1014 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1015 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1016 | "0000000000000000000" , |
1017 | .fmt: chars_format::fixed, .correct_idx: 1310, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+1023}, |
1018 | |
1019 | // above (1 + 1 - 3 * 2^-53) * 2^1023: appended a thousand 0 digits followed by a 1 digit |
1020 | {.input: "1797693134862315608353258760581052985162070023416521662616611746258695532672923265745300992879465492467506314" |
1021 | "9033587701752208710592698796290627760473556921329019091915239418047621712533496094635638726128664019802903779" |
1022 | "9514183602981511756283727771403830521483963923935633133642802139091669457927874464075218944." |
1023 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1024 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1025 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1026 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1027 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1028 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1029 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1030 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1031 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1032 | "00000000000000000001" , |
1033 | .fmt: chars_format::fixed, .correct_idx: 1311, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+1023}, |
1034 | |
1035 | // above (1 + 1 - 3 * 2^-53) * 2^1023: appended a 1 digit |
1036 | {.input: "1797693134862315608353258760581052985162070023416521662616611746258695532672923265745300992879465492467506314" |
1037 | "9033587701752208710592698796290627760473556921329019091915239418047621712533496094635638726128664019802903779" |
1038 | "9514183602981511756283727771403830521483963923935633133642802139091669457927874464075218944.1" , |
1039 | .fmt: chars_format::fixed, .correct_idx: 311, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+1023}, |
1040 | |
1041 | // above (1 + 1 - 3 * 2^-53) * 2^1023: incremented last digit |
1042 | {.input: "1797693134862315608353258760581052985162070023416521662616611746258695532672923265745300992879465492467506314" |
1043 | "9033587701752208710592698796290627760473556921329019091915239418047621712533496094635638726128664019802903779" |
1044 | "9514183602981511756283727771403830521483963923935633133642802139091669457927874464075218945" , |
1045 | .fmt: chars_format::fixed, .correct_idx: 309, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+1023}, |
1046 | |
1047 | // VSO-852024 also affected hexfloats. |
1048 | {.input: "0.00000000000008p-1022" , .fmt: chars_format::hex, .correct_idx: 22, .correct_ec: errc::result_out_of_range, .correct_value: 0x0.0000000000000p+0}, |
1049 | {.input: "0." |
1050 | "0000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1051 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1052 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1053 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1054 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1055 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1056 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1057 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1058 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1059 | "0000000000000000000000000000000001p-1022" , |
1060 | .fmt: chars_format::hex, .correct_idx: 1023, .correct_ec: errc{}, .correct_value: 0x0.0000000000001p-1022}, |
1061 | |
1062 | {.input: "0.ffffffffffffe8p-1022" , .fmt: chars_format::hex, .correct_idx: 22, .correct_ec: errc{}, .correct_value: 0x0.ffffffffffffep-1022}, |
1063 | {.input: "0." |
1064 | "ffffffffffffe800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1065 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1066 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1067 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1068 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1069 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1070 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1071 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1072 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1073 | "0000000000000000000000000000000001p-1022" , |
1074 | .fmt: chars_format::hex, .correct_idx: 1023, .correct_ec: errc{}, .correct_value: 0x0.fffffffffffffp-1022}, |
1075 | |
1076 | {.input: "1.00000000000008p+0" , .fmt: chars_format::hex, .correct_idx: 19, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+0}, |
1077 | {.input: "1." |
1078 | "0000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1079 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1080 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1081 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1082 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1083 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1084 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1085 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1086 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1087 | "0000000000000000000000000000000001p+0" , |
1088 | .fmt: chars_format::hex, .correct_idx: 1020, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+0}, |
1089 | |
1090 | {.input: "1.ffffffffffffe8p+0" , .fmt: chars_format::hex, .correct_idx: 19, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+0}, |
1091 | {.input: "1." |
1092 | "ffffffffffffe800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1093 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1094 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1095 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1096 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1097 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1098 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1099 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1100 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1101 | "0000000000000000000000000000000001p+0" , |
1102 | .fmt: chars_format::hex, .correct_idx: 1020, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+0}, |
1103 | |
1104 | {.input: "1.00000000000008p+1023" , .fmt: chars_format::hex, .correct_idx: 22, .correct_ec: errc{}, .correct_value: 0x1.0000000000000p+1023}, |
1105 | {.input: "1." |
1106 | "0000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1107 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1108 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1109 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1110 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1111 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1112 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1113 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1114 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1115 | "0000000000000000000000000000000001p+1023" , |
1116 | .fmt: chars_format::hex, .correct_idx: 1023, .correct_ec: errc{}, .correct_value: 0x1.0000000000001p+1023}, |
1117 | |
1118 | {.input: "1.ffffffffffffe8p+1023" , .fmt: chars_format::hex, .correct_idx: 22, .correct_ec: errc{}, .correct_value: 0x1.ffffffffffffep+1023}, |
1119 | {.input: "1." |
1120 | "ffffffffffffe800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1121 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1122 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1123 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1124 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1125 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1126 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1127 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1128 | "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
1129 | "0000000000000000000000000000000001p+1023" , |
1130 | .fmt: chars_format::hex, .correct_idx: 1023, .correct_ec: errc{}, .correct_value: 0x1.fffffffffffffp+1023}, |
1131 | |
1132 | // VSO-733765 "<charconv>: [Feedback] double std::from_chars behavior on exponent out of range" |
1133 | // LWG-3081 "Floating point from_chars API does not distinguish between overflow and underflow" |
1134 | // These test cases exercise every overflow/underflow codepath. |
1135 | {.input: "1e+1000" , .fmt: chars_format::scientific, .correct_idx: 7, .correct_ec: errc::result_out_of_range, .correct_value: double_inf}, |
1136 | {.input: "1e-1000" , .fmt: chars_format::scientific, .correct_idx: 7, .correct_ec: errc::result_out_of_range, .correct_value: 0.0}, |
1137 | {.input: "1.fffffffffffff8p+1023" , .fmt: chars_format::hex, .correct_idx: 22, .correct_ec: errc::result_out_of_range, .correct_value: double_inf}, |
1138 | {.input: "1e+2000" , .fmt: chars_format::scientific, .correct_idx: 7, .correct_ec: errc::result_out_of_range, .correct_value: double_inf}, |
1139 | {.input: "1e-2000" , .fmt: chars_format::scientific, .correct_idx: 7, .correct_ec: errc::result_out_of_range, .correct_value: 0.0}, |
1140 | {.input: "1e+9999" , .fmt: chars_format::scientific, .correct_idx: 7, .correct_ec: errc::result_out_of_range, .correct_value: double_inf}, |
1141 | {.input: "1e-9999" , .fmt: chars_format::scientific, .correct_idx: 7, .correct_ec: errc::result_out_of_range, .correct_value: 0.0}, |
1142 | {.input: "10e+5199" , .fmt: chars_format::scientific, .correct_idx: 8, .correct_ec: errc::result_out_of_range, .correct_value: double_inf}, |
1143 | {.input: "0.001e-5199" , .fmt: chars_format::scientific, .correct_idx: 11, .correct_ec: errc::result_out_of_range, .correct_value: 0.0}, |
1144 | }; |
1145 | |
1146 | #endif // DOUBLE_FROM_CHARS_TEST_CASES_HPP |
1147 | |