1//===-- Unittests for strtod ----------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "src/__support/FPUtil/FPBits.h"
10#include "src/errno/libc_errno.h"
11#include "src/stdlib/strtod.h"
12
13#include "test/UnitTest/ErrnoSetterMatcher.h"
14#include "test/UnitTest/RoundingModeUtils.h"
15#include "test/UnitTest/Test.h"
16
17#include <stddef.h>
18
19using LIBC_NAMESPACE::fputil::testing::ForceRoundingModeTest;
20using LIBC_NAMESPACE::fputil::testing::RoundingMode;
21
22using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
23using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
24
25class LlvmLibcStrToDTest : public LIBC_NAMESPACE::testing::Test,
26 ForceRoundingModeTest<RoundingMode::Nearest> {
27public:
28 void run_test(const char *inputString, const ptrdiff_t expectedStrLen,
29 const uint64_t expectedRawData, const int expectedErrno = 0) {
30 // expectedRawData is the expected double result as a uint64_t, organized
31 // according to IEEE754:
32 //
33 // +-- 1 Sign Bit +-- 52 Mantissa bits
34 // | |
35 // | +-------------------------+------------------------+
36 // | | |
37 // SEEEEEEEEEEEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
38 // | |
39 // +----+----+
40 // |
41 // +-- 11 Exponent Bits
42 //
43 // This is so that the result can be compared in parts.
44 char *str_end = nullptr;
45
46 LIBC_NAMESPACE::fputil::FPBits<double> expected_fp =
47 LIBC_NAMESPACE::fputil::FPBits<double>(expectedRawData);
48
49 LIBC_NAMESPACE::libc_errno = 0;
50 double result = LIBC_NAMESPACE::strtod(str: inputString, str_end: &str_end);
51 if (expectedErrno == 0)
52 EXPECT_THAT(result, Succeeds<double>(expected_fp.get_val()));
53 else
54 EXPECT_THAT(result, Fails<double>(expectedErrno, expected_fp.get_val()));
55 EXPECT_EQ(str_end - inputString, expectedStrLen);
56 }
57};
58
59TEST_F(LlvmLibcStrToDTest, SimpleTest) {
60 run_test(inputString: "123", expectedStrLen: 3, expectedRawData: uint64_t(0x405ec00000000000));
61
62 // This should fail on Eisel-Lemire, forcing a fallback to simple decimal
63 // conversion.
64 run_test(inputString: "12345678901234549760", expectedStrLen: 20, expectedRawData: uint64_t(0x43e56a95319d63d8));
65
66 // Found while looking for difficult test cases here:
67 // https://github.com/nigeltao/parse-number-fxx-test-data/blob/main/more-test-cases/golang-org-issue-36657.txt
68 run_test(inputString: "1090544144181609348835077142190", expectedStrLen: 31, expectedRawData: uint64_t(0x462b8779f2474dfb));
69
70 run_test(inputString: "0x123", expectedStrLen: 5, expectedRawData: uint64_t(0x4072300000000000));
71}
72
73// These are tests that have caused problems in the past.
74TEST_F(LlvmLibcStrToDTest, SpecificFailures) {
75 run_test(inputString: "3E70000000000000", expectedStrLen: 16, expectedRawData: uint64_t(0x7FF0000000000000), ERANGE);
76 run_test(inputString: "358416272e-33", expectedStrLen: 13, expectedRawData: uint64_t(0x3adbbb2a68c9d0b9));
77 run_test(inputString: "2.16656806400000023841857910156251e9", expectedStrLen: 36,
78 expectedRawData: uint64_t(0x41e0246690000001));
79 run_test(inputString: "27949676547093071875", expectedStrLen: 20, expectedRawData: uint64_t(0x43f83e132bc608c9));
80 run_test(
81 inputString: "100000000000000000000000000000000000000000000000000000000000000000000000"
82 "000000000000000000000000000000000000000000000000000000000000000000000000"
83 "000000000000000000000000000000000000000000000000000000000000000000000000"
84 "000000000000000000000000000000000000000000000000000000000000000000000000"
85 "000000000000000000000000000000000000000000000000000000000000000000000000"
86 "000000000000000000000000000000000000000000000000000000000000000000000000"
87 "000000000000000000000000000000000000000000000000000000000000000000000000"
88 "000000000000000000000000000000000000000000000000000000000000000000000000"
89 "000000000000000000000000000000000000000000000000000000000000000000000000"
90 "000000000000000000000000000000000000000000000000000000000000000000000000"
91 "000000000000000000000000000000000000000000000000000000000000000000000000"
92 "000000000e-800",
93 expectedStrLen: 806, expectedRawData: 0x3ff0000000000000);
94 run_test(
95 inputString: "100000000000000000000000000000000000000000000000000000000000000000000000"
96 "000000000000000000000000000000000000000000000000000000000000000000000000"
97 "000000000000000000000000000000000000000000000000000000000000000000000000"
98 "000000000000000000000000000000000000000000000000000000000000000000000000"
99 "000000000000000000000000000000000000000000000000000000000000000000000000"
100 "000000000000000000000000000000000000000000000000000000000000000000000000"
101 "000000000000000000000000000000000000000000000000000000000000000000000000"
102 "000000000000000000000000000000000000000000000000000000000000000000000000"
103 "000000000000000000000000000000000000000000000000000000000000000000000000"
104 "000000000000000000000000000000000000000000000000000000000000000000000000"
105 "000000000000000000000000000000000000000000000000000000000000000000000000"
106 "000000000e-799",
107 expectedStrLen: 806, expectedRawData: 0x4024000000000000);
108 run_test(
109 inputString: "100000000000000000000000000000000000000000000000000000000000000000000000"
110 "000000000000000000000000000000000000000000000000000000000000000000000000"
111 "000000000000000000000000000000000000000000000000000000000000000000000000"
112 "000000000000000000000000000000000000000000000000000000000000000000000000"
113 "000000000000000000000000000000000000000000000000000000000000000000000000"
114 "000000000000000000000000000000000000000000000000000000000000000000000000"
115 "000000000000000000000000000000000000000000000000000000000000000000000000"
116 "000000000000000000000000000000000000000000000000000000000000000000000000"
117 "000000000000000000000000000000000000000000000000000000000000000000000000"
118 "000000000000000000000000000000000000000000000000000000000000000000000000"
119 "000000000000000000000000000000000000000000000000000000000000000000000000"
120 "0000000000e-800",
121 expectedStrLen: 807, expectedRawData: 0x4024000000000000);
122 run_test(
123 inputString: "10000000000000000000000000000000000000000000000000000000000000000e-64",
124 expectedStrLen: 69, expectedRawData: 0x3ff0000000000000);
125 run_test(
126 inputString: "100000000000000000000000000000000000000000000000000000000000000000000000"
127 "000000000000000000000000000000000000000000000000000000000e-128",
128 expectedStrLen: 134, expectedRawData: 0x3ff0000000000000);
129 run_test(inputString: "1000000000000000000000000000000000000000000000000000000000000000000"
130 "0000000000000000000000000000000000000000000000000000000000000000000"
131 "0000000000000000000000000000000000000000000000000000000000000000000"
132 "00000000000000000000000000000000000000000000000000000000e-256",
133 expectedStrLen: 262, expectedRawData: 0x3ff0000000000000);
134 run_test(inputString: "1000000000000000000000000000000000000000000000000000000000000000000"
135 "0000000000000000000000000000000000000000000000000000000000000000000"
136 "0000000000000000000000000000000000000000000000000000000000000000000"
137 "0000000000000000000000000000000000000000000000000000000000000000000"
138 "0000000000000000000000000000000000000000000000000000000000000000000"
139 "0000000000000000000000000000000000000000000000000000000000000000000"
140 "0000000000000000000000000000000000000000000000000000000000000000000"
141 "00000000000000000000000000000000000000000000e-512",
142 expectedStrLen: 518, expectedRawData: 0x3ff0000000000000);
143 run_test(
144 inputString: "100000000000000000000000000000000000000000000000000000000000000000000000"
145 "000000000000000000000000000000000000000000000000000000000000000000000000"
146 "000000000000000000000000000000000000000000000000000000000000000000000000"
147 "000000000000000000000000000000000000000000000000000000000000000000000000"
148 "000000000000000000000000000000000000000000000000000000000000000000000000"
149 "000000000000000000000000000000000000000000000000000000000000000000000000"
150 "000000000000000000000000000000000000000000000000000000000000000000000000"
151 "000000000000000000000000000000000000000000000000000000000000000000000000"
152 "000000000000000000000000000000000000000000000000000000000000000000000000"
153 "000000000000000000000000000000000000000000000000000000000000000000000000"
154 "000000000000000000000000000000000000000000000000000000000000000000000000"
155 "000000000000000000000000000000000000000000000000000000000000000000000000"
156 "000000000000000000000000000000000000000000000000000000000000000000000000"
157 "000000000000000000000000000000000000000000000000000000000000000000000000"
158 "00000000000000000e-1024",
159 expectedStrLen: 1031, expectedRawData: 0x3ff0000000000000);
160 run_test(
161 inputString: "0"
162 "100000000000000000000000000000000000000000000000000000000000000000000000"
163 "000000000000000000000000000000000000000000000000000000000000000000000000"
164 "000000000000000000000000000000000000000000000000000000000000000000000000"
165 "000000000000000000000000000000000000000000000000000000000000000000000000"
166 "000000000000000000000000000000000000000000000000000000000000000000000000"
167 "000000000000000000000000000000000000000000000000000000000000000000000000"
168 "000000000000000000000000000000000000000000000000000000000000000000000000"
169 "000000000000000000000000000000000000000000000000000000000000000000000000"
170 "000000000000000000000000000000000000000000000000000000000000000000000000"
171 "000000000000000000000000000000000000000000000000000000000000000000000000"
172 "000000000000000000000000000000000000000000000000000000000000000000000000"
173 "000000000000000000000000000000000000000000000000000000000000000000000000"
174 "000000000000000000000000000000000000000000000000000000000000000000000000"
175 "000000000000000000000000000000000000000000000000000000000000000000000000"
176 "00000000000000000e-1024",
177 expectedStrLen: 1032, expectedRawData: 0x3ff0000000000000);
178}
179
180TEST_F(LlvmLibcStrToDTest, FuzzFailures) {
181 run_test(inputString: "-\xff\xff\xff\xff\xff\xff\xff\x01", expectedStrLen: 0, expectedRawData: uint64_t(0));
182 run_test(inputString: "-.????", expectedStrLen: 0, expectedRawData: uint64_t(0));
183 run_test(
184 inputString: "44444444444444444444444444444444444444444444444444A44444444444444444"
185 "44444444444*\x99\xff\xff\xff\xff",
186 expectedStrLen: 50, expectedRawData: uint64_t(0x4a3e68fdd0e0b2d8));
187 run_test(inputString: "-NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKNNNNNNNNNNNNNNNNNN?"
188 "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN?",
189 expectedStrLen: 0, expectedRawData: uint64_t(0));
190 run_test(inputString: "0x.666E40", expectedStrLen: 9, expectedRawData: uint64_t(0x3fd99b9000000000));
191
192 // glibc version 2.36 and higher (not tested with lower versions) disagrees
193 // with this result, but ours is correct for the nearest rounding mode. See
194 // this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30220
195 run_test(inputString: "0x30000002222225p-1077", expectedStrLen: 22, expectedRawData: uint64_t(0x0006000000444445), ERANGE);
196
197 // This value triggered a bug by having an exponent exactly equal to the
198 // maximum. The overflow checks would accept a value less than the max value
199 // as valid and greater than the max value as invalid (and set it to the max),
200 // but an exponent of exactly max value hit the else condition which is
201 // intended for underflow and set the exponent to the min exponent.
202 run_test(
203 inputString: "184774460000000000000000000000000000052300000000000000000000000000000000"
204 "000000000000000000000000000000000000000000000000000000000000000000000000"
205 "000000000000000000000000000000000000009351662015430037656316837118788423"
206 "887774460000000000004300376000000000000000000000000000000000000000000000"
207 "000000000000000000000000000000000000000000000000000000000000000000000000"
208 "000000000000000000000000000000000000000000000000000000000000000000000000"
209 "000000000000000000000000000000000000000000000052385811247017194600000000"
210 "000000000171946000000000000000000700460000000000000000000000001000000000"
211 "000000000000000000000000000000000000000000000000000000000000000000000000"
212 "000000000000000000000000000000000000000000000000000000000000000000000000"
213 "000000000000000000000000000000000000000000000000000000020000000000000000"
214 "000000000000563168371187884238877744600000000000000000000000000000523858"
215 "112470171946000000000000000001719460000000000000000007004600000000000000"
216 "000000000000000000000000000000000000000000000000000000000000000000000000"
217 "000000000000000000020000000000000000000000000000000000000000000000000000"
218 "000000000000000000000000000000000000000000000000000000000000000000000000"
219 "000000000000000000000000000000000000000000000000000000000000000000000000"
220 "000000000000000000000000000000000000000000000005238581124701719460000000"
221 "000000000017194600000000000000000070046000000000000000000000000000000000"
222 "000000000000000000000000000000000000000000000000000000000000000000000000"
223 "200000000000000000E608",
224 expectedStrLen: 1462, expectedRawData: uint64_t(0x7ff0000000000000), ERANGE);
225
226 // Same as above but for hex.
227 run_test(inputString: "0x0164810157p2047", expectedStrLen: 17, expectedRawData: uint64_t(0x7ff0000000000000), ERANGE);
228
229 // This test ensures that only the correct number of characters is accepted.
230 // An exponent symbol followed by a sign isn't a valid exponent.
231 run_test(inputString: "2e+", expectedStrLen: 1, expectedRawData: uint64_t(0x4000000000000000));
232 run_test(inputString: "0x2p+", expectedStrLen: 3, expectedRawData: uint64_t(0x4000000000000000));
233
234 // This bug was in the handling of very large exponents in the exponent
235 // marker. Previously anything greater than 10,000 would be set to 10,000.
236 // This caused incorrect behavior if there were more than 10,000 '0's in the
237 // input number, and then a correspondingly large exponent. This test case has
238 // 24,744 zeroes.
239 run_test(
240 inputString: "0x."
241 "000000000000000000000000000000000000000000000000000000000000000000000000"
242 "000000000000000000000000000000000000000000000000000000000000000000000000"
243 "000000000000000000000000000000000000000000000000000000000000000000000000"
244 "000000000000000000000000000000000000000000000000000000000000000000000000"
245 "000000000000000000000000000000000000000000000000000000000000000000000000"
246 "000000000000000000000000000000000000000000000000000000000000000000000000"
247 "000000000000000000000000000000000000000000000000000000000000000000000000"
248 "000000000000000000000000000000000000000000000000000000000000000000000000"
249 "000000000000000000000000000000000000000000000000000000000000000000000000"
250 "000000000000000000000000000000000000000000000000000000000000000000000000"
251 "000000000000000000000000000000000000000000000000000000000000000000000000"
252 "000000000000000000000000000000000000000000000000000000000000000000000000"
253 "000000000000000000000000000000000000000000000000000000000000000000000000"
254 "000000000000000000000000000000000000000000000000000000000000000000000000"
255 "000000000000000000000000000000000000000000000000000000000000000000000000"
256 "000000000000000000000000000000000000000000000000000000000000000000000000"
257 "000000000000000000000000000000000000000000000000000000000000000000000000"
258 "000000000000000000000000000000000000000000000000000000000000000000000000"
259 "000000000000000000000000000000000000000000000000000000000000000000000000"
260 "000000000000000000000000000000000000000000000000000000000000000000000000"
261 "000000000000000000000000000000000000000000000000000000000000000000000000"
262 "000000000000000000000000000000000000000000000000000000000000000000000000"
263 "000000000000000000000000000000000000000000000000000000000000000000000000"
264 "000000000000000000000000000000000000000000000000000000000000000000000000"
265 "000000000000000000000000000000000000000000000000000000000000000000000000"
266 "000000000000000000000000000000000000000000000000000000000000000000000000"
267 "000000000000000000000000000000000000000000000000000000000000000000000000"
268 "000000000000000000000000000000000000000000000000000000000000000000000000"
269 "000000000000000000000000000000000000000000000000000000000000000000000000"
270 "000000000000000000000000000000000000000000000000000000000000000000000000"
271 "000000000000000000000000000000000000000000000000000000000000000000000000"
272 "000000000000000000000000000000000000000000000000000000000000000000000000"
273 "000000000000000000000000000000000000000000000000000000000000000000000000"
274 "000000000000000000000000000000000000000000000000000000000000000000000000"
275 "000000000000000000000000000000000000000000000000000000000000000000000000"
276 "000000000000000000000000000000000000000000000000000000000000000000000000"
277 "000000000000000000000000000000000000000000000000000000000000000000000000"
278 "000000000000000000000000000000000000000000000000000000000000000000000000"
279 "000000000000000000000000000000000000000000000000000000000000000000000000"
280 "000000000000000000000000000000000000000000000000000000000000000000000000"
281 "000000000000000000000000000000000000000000000000000000000000000000000000"
282 "000000000000000000000000000000000000000000000000000000000000000000000000"
283 "000000000000000000000000000000000000000000000000000000000000000000000000"
284 "000000000000000000000000000000000000000000000000000000000000000000000000"
285 "000000000000000000000000000000000000000000000000000000000000000000000000"
286 "000000000000000000000000000000000000000000000000000000000000000000000000"
287 "000000000000000000000000000000000000000000000000000000000000000000000000"
288 "000000000000000000000000000000000000000000000000000000000000000000000000"
289 "000000000000000000000000000000000000000000000000000000000000000000000000"
290 "000000000000000000000000000000000000000000000000000000000000000000000000"
291 "000000000000000000000000000000000000000000000000000000000000000000000000"
292 "000000000000000000000000000000000000000000000000000000000000000000000000"
293 "000000000000000000000000000000000000000000000000000000000000000000000000"
294 "000000000000000000000000000000000000000000000000000000000000000000000000"
295 "000000000000000000000000000000000000000000000000000000000000000000000000"
296 "000000000000000000000000000000000000000000000000000000000000000000000000"
297 "000000000000000000000000000000000000000000000000000000000000000000000000"
298 "000000000000000000000000000000000000000000000000000000000000000000000000"
299 "000000000000000000000000000000000000000000000000000000000000000000000000"
300 "000000000000000000000000000000000000000000000000000000000000000000000000"
301 "000000000000000000000000000000000000000000000000000000000000000000000000"
302 "000000000000000000000000000000000000000000000000000000000000000000000000"
303 "000000000000000000000000000000000000000000000000000000000000000000000000"
304 "000000000000000000000000000000000000000000000000000000000000000000000000"
305 "000000000000000000000000000000000000000000000000000000000000000000000000"
306 "000000000000000000000000000000000000000000000000000000000000000000000000"
307 "000000000000000000000000000000000000000000000000000000000000000000000000"
308 "000000000000000000000000000000000000000000000000000000000000000000000000"
309 "000000000000000000000000000000000000000000000000000000000000000000000000"
310 "000000000000000000000000000000000000000000000000000000000000000000000000"
311 "000000000000000000000000000000000000000000000000000000000000000000000000"
312 "000000000000000000000000000000000000000000000000000000000000000000000000"
313 "000000000000000000000000000000000000000000000000000000000000000000000000"
314 "000000000000000000000000000000000000000000000000000000000000000000000000"
315 "000000000000000000000000000000000000000000000000000000000000000000000000"
316 "000000000000000000000000000000000000000000000000000000000000000000000000"
317 "000000000000000000000000000000000000000000000000000000000000000000000000"
318 "000000000000000000000000000000000000000000000000000000000000000000000000"
319 "000000000000000000000000000000000000000000000000000000000000000000000000"
320 "000000000000000000000000000000000000000000000000000000000000000000000000"
321 "000000000000000000000000000000000000000000000000000000000000000000000000"
322 "000000000000000000000000000000000000000000000000000000000000000000000000"
323 "000000000000000000000000000000000000000000000000000000000000000000000000"
324 "000000000000000000000000000000000000000000000000000000000000000000000000"
325 "000000000000000000000000000000000000000000000000000000000000000000000000"
326 "000000000000000000000000000000000000000000000000000000000000000000000000"
327 "000000000000000000000000000000000000000000000000000000000000000000000000"
328 "000000000000000000000000000000000000000000000000000000000000000000000000"
329 "000000000000000000000000000000000000000000000000000000000000000000000000"
330 "000000000000000000000000000000000000000000000000000000000000000000000000"
331 "000000000000000000000000000000000000000000000000000000000000000000000000"
332 "000000000000000000000000000000000000000000000000000000000000000000000000"
333 "000000000000000000000000000000000000000000000000000000000000000000000000"
334 "000000000000000000000000000000000000000000000000000000000000000000000000"
335 "000000000000000000000000000000000000000000000000000000000000000000000000"
336 "000000000000000000000000000000000000000000000000000000000000000000000000"
337 "000000000000000000000000000000000000000000000000000000000000000000000000"
338 "000000000000000000000000000000000000000000000000000000000000000000000000"
339 "000000000000000000000000000000000000000000000000000000000000000000000000"
340 "000000000000000000000000000000000000000000000000000000000000000000000000"
341 "000000000000000000000000000000000000000000000000000000000000000000000000"
342 "000000000000000000000000000000000000000000000000000000000000000000000000"
343 "000000000000000000000000000000000000000000000000000000000000000000000000"
344 "000000000000000000000000000000000000000000000000000000000000000000000000"
345 "000000000000000000000000000000000000000000000000000000000000000000000000"
346 "000000000000000000000000000000000000000000000000000000000000000000000000"
347 "000000000000000000000000000000000000000000000000000000000000000000000000"
348 "000000000000000000000000000000000000000000000000000000000000000000000000"
349 "000000000000000000000000000000000000000000000000000000000000000000000000"
350 "000000000000000000000000000000000000000000000000000000000000000000000000"
351 "000000000000000000000000000000000000000000000000000000000000000000000000"
352 "000000000000000000000000000000000000000000000000000000000000000000000000"
353 "000000000000000000000000000000000000000000000000000000000000000000000000"
354 "000000000000000000000000000000000000000000000000000000000000000000000000"
355 "000000000000000000000000000000000000000000000000000000000000000000000000"
356 "000000000000000000000000000000000000000000000000000000000000000000000000"
357 "000000000000000000000000000000000000000000000000000000000000000000000000"
358 "000000000000000000000000000000000000000000000000000000000000000000000000"
359 "000000000000000000000000000000000000000000000000000000000000000000000000"
360 "000000000000000000000000000000000000000000000000000000000000000000000000"
361 "000000000000000000000000000000000000000000000000000000000000000000000000"
362 "000000000000000000000000000000000000000000000000000000000000000000000000"
363 "000000000000000000000000000000000000000000000000000000000000000000000000"
364 "000000000000000000000000000000000000000000000000000000000000000000000000"
365 "000000000000000000000000000000000000000000000000000000000000000000000000"
366 "000000000000000000000000000000000000000000000000000000000000000000000000"
367 "000000000000000000000000000000000000000000000000000000000000000000000000"
368 "000000000000000000000000000000000000000000000000000000000000000000000000"
369 "000000000000000000000000000000000000000000000000000000000000000000000000"
370 "000000000000000000000000000000000000000000000000000000000000000000000000"
371 "000000000000000000000000000000000000000000000000000000000000000000000000"
372 "000000000000000000000000000000000000000000000000000000000000000000000000"
373 "000000000000000000000000000000000000000000000000000000000000000000000000"
374 "000000000000000000000000000000000000000000000000000000000000000000000000"
375 "000000000000000000000000000000000000000000000000000000000000000000000000"
376 "000000000000000000000000000000000000000000000000000000000000000000000000"
377 "000000000000000000000000000000000000000000000000000000000000000000000000"
378 "000000000000000000000000000000000000000000000000000000000000000000000000"
379 "000000000000000000000000000000000000000000000000000000000000000000000000"
380 "000000000000000000000000000000000000000000000000000000000000000000000000"
381 "000000000000000000000000000000000000000000000000000000000000000000000000"
382 "000000000000000000000000000000000000000000000000000000000000000000000000"
383 "000000000000000000000000000000000000000000000000000000000000000000000000"
384 "000000000000000000000000000000000000000000000000000000000000000000000000"
385 "000000000000000000000000000000000000000000000000000000000000000000000000"
386 "000000000000000000000000000000000000000000000000000000000000000000000000"
387 "000000000000000000000000000000000000000000000000000000000000000000000000"
388 "000000000000000000000000000000000000000000000000000000000000000000000000"
389 "000000000000000000000000000000000000000000000000000000000000000000000000"
390 "000000000000000000000000000000000000000000000000000000000000000000000000"
391 "000000000000000000000000000000000000000000000000000000000000000000000000"
392 "000000000000000000000000000000000000000000000000000000000000000000000000"
393 "000000000000000000000000000000000000000000000000000000000000000000000000"
394 "000000000000000000000000000000000000000000000000000000000000000000000000"
395 "000000000000000000000000000000000000000000000000000000000000000000000000"
396 "000000000000000000000000000000000000000000000000000000000000000000000000"
397 "000000000000000000000000000000000000000000000000000000000000000000000000"
398 "000000000000000000000000000000000000000000000000000000000000000000000000"
399 "000000000000000000000000000000000000000000000000000000000000000000000000"
400 "000000000000000000000000000000000000000000000000000000000000000000000000"
401 "000000000000000000000000000000000000000000000000000000000000000000000000"
402 "000000000000000000000000000000000000000000000000000000000000000000000000"
403 "000000000000000000000000000000000000000000000000000000000000000000000000"
404 "000000000000000000000000000000000000000000000000000000000000000000000000"
405 "000000000000000000000000000000000000000000000000000000000000000000000000"
406 "000000000000000000000000000000000000000000000000000000000000000000000000"
407 "000000000000000000000000000000000000000000000000000000000000000000000000"
408 "000000000000000000000000000000000000000000000000000000000000000000000000"
409 "000000000000000000000000000000000000000000000000000000000000000000000000"
410 "000000000000000000000000000000000000000000000000000000000000000000000000"
411 "000000000000000000000000000000000000000000000000000000000000000000000000"
412 "000000000000000000000000000000000000000000000000000000000000000000000000"
413 "000000000000000000000000000000000000000000000000000000000000000000000000"
414 "000000000000000000000000000000000000000000000000000000000000000000000000"
415 "000000000000000000000000000000000000000000000000000000000000000000000000"
416 "000000000000000000000000000000000000000000000000000000000000000000000000"
417 "000000000000000000000000000000000000000000000000000000000000000000000000"
418 "000000000000000000000000000000000000000000000000000000000000000000000000"
419 "000000000000000000000000000000000000000000000000000000000000000000000000"
420 "000000000000000000000000000000000000000000000000000000000000000000000000"
421 "000000000000000000000000000000000000000000000000000000000000000000000000"
422 "000000000000000000000000000000000000000000000000000000000000000000000000"
423 "000000000000000000000000000000000000000000000000000000000000000000000000"
424 "000000000000000000000000000000000000000000000000000000000000000000000000"
425 "000000000000000000000000000000000000000000000000000000000000000000000000"
426 "000000000000000000000000000000000000000000000000000000000000000000000000"
427 "000000000000000000000000000000000000000000000000000000000000000000000000"
428 "000000000000000000000000000000000000000000000000000000000000000000000000"
429 "000000000000000000000000000000000000000000000000000000000000000000000000"
430 "000000000000000000000000000000000000000000000000000000000000000000000000"
431 "000000000000000000000000000000000000000000000000000000000000000000000000"
432 "000000000000000000000000000000000000000000000000000000000000000000000000"
433 "000000000000000000000000000000000000000000000000000000000000000000000000"
434 "000000000000000000000000000000000000000000000000000000000000000000000000"
435 "000000000000000000000000000000000000000000000000000000000000000000000000"
436 "000000000000000000000000000000000000000000000000000000000000000000000000"
437 "000000000000000000000000000000000000000000000000000000000000000000000000"
438 "000000000000000000000000000000000000000000000000000000000000000000000000"
439 "000000000000000000000000000000000000000000000000000000000000000000000000"
440 "000000000000000000000000000000000000000000000000000000000000000000000000"
441 "000000000000000000000000000000000000000000000000000000000000000000000000"
442 "000000000000000000000000000000000000000000000000000000000000000000000000"
443 "000000000000000000000000000000000000000000000000000000000000000000000000"
444 "000000000000000000000000000000000000000000000000000000000000000000000000"
445 "000000000000000000000000000000000000000000000000000000000000000000000000"
446 "000000000000000000000000000000000000000000000000000000000000000000000000"
447 "000000000000000000000000000000000000000000000000000000000000000000000000"
448 "000000000000000000000000000000000000000000000000000000000000000000000000"
449 "000000000000000000000000000000000000000000000000000000000000000000000000"
450 "000000000000000000000000000000000000000000000000000000000000000000000000"
451 "000000000000000000000000000000000000000000000000000000000000000000000000"
452 "000000000000000000000000000000000000000000000000000000000000000000000000"
453 "000000000000000000000000000000000000000000000000000000000000000000000000"
454 "000000000000000000000000000000000000000000000000000000000000000000000000"
455 "000000000000000000000000000000000000000000000000000000000000000000000000"
456 "000000000000000000000000000000000000000000000000000000000000000000000000"
457 "000000000000000000000000000000000000000000000000000000000000000000000000"
458 "000000000000000000000000000000000000000000000000000000000000000000000000"
459 "000000000000000000000000000000000000000000000000000000000000000000000000"
460 "000000000000000000000000000000000000000000000000000000000000000000000000"
461 "000000000000000000000000000000000000000000000000000000000000000000000000"
462 "000000000000000000000000000000000000000000000000000000000000000000000000"
463 "000000000000000000000000000000000000000000000000000000000000000000000000"
464 "000000000000000000000000000000000000000000000000000000000000000000000000"
465 "000000000000000000000000000000000000000000000000000000000000000000000000"
466 "000000000000000000000000000000000000000000000000000000000000000000000000"
467 "000000000000000000000000000000000000000000000000000000000000000000000000"
468 "000000000000000000000000000000000000000000000000000000000000000000000000"
469 "000000000000000000000000000000000000000000000000000000000000000000000000"
470 "000000000000000000000000000000000000000000000000000000000000000000000000"
471 "000000000000000000000000000000000000000000000000000000000000000000000000"
472 "000000000000000000000000000000000000000000000000000000000000000000000000"
473 "000000000000000000000000000000000000000000000000000000000000000000000000"
474 "000000000000000000000000000000000000000000000000000000000000000000000000"
475 "000000000000000000000000000000000000000000000000000000000000000000000000"
476 "000000000000000000000000000000000000000000000000000000000000000000000000"
477 "000000000000000000000000000000000000000000000000000000000000000000000000"
478 "000000000000000000000000000000000000000000000000000000000000000000000000"
479 "000000000000000000000000000000000000000000000000000000000000000000000000"
480 "000000000000000000000000000000000000000000000000000000000000000000000000"
481 "000000000000000000000000000000000000000000000000000000000000000000000000"
482 "000000000000000000000000000000000000000000000000000000000000000000000000"
483 "000000000000000000000000000000000000000000000000000000000000000000000000"
484 "000000000000000000000000000000000000000000000000000000000000000000000000"
485 "000000000000000000000000000000000000000000000000000000000000000000000000"
486 "000000000000000000000000000000000000000000000000000000000000000000000000"
487 "000000000000000000000000000000000000000000000000000000000000000000000000"
488 "000000000000000000000000000000000000000000000000000000000000000000000000"
489 "000000000000000000000000000000000000000000000000000000000000000000000000"
490 "000000000000000000000000000000000000000000000000000000000000000000000000"
491 "000000000000000000000000000000000000000000000000000000000000000000000000"
492 "000000000000000000000000000000000000000000000000000000000000000000000000"
493 "000000000000000000000000000000000000000000000000000000000000000000000000"
494 "000000000000000000000000000000000000000000000000000000000000000000000000"
495 "000000000000000000000000000000000000000000000000000000000000000000000000"
496 "000000000000000000000000000000000000000000000000000000000000000000000000"
497 "000000000000000000000000000000000000000000000000000000000000000000000000"
498 "000000000000000000000000000000000000000000000000000000000000000000000000"
499 "000000000000000000000000000000000000000000000000000000000000000000000000"
500 "000000000000000000000000000000000000000000000000000000000000000000000000"
501 "000000000000000000000000000000000000000000000000000000000000000000000000"
502 "000000000000000000000000000000000000000000000000000000000000000000000000"
503 "000000000000000000000000000000000000000000000000000000000000000000000000"
504 "000000000000000000000000000000000000000000000000000000000000000000000000"
505 "000000000000000000000000000000000000000000000000000000000000000000000000"
506 "000000000000000000000000000000000000000000000000000000000000000000000000"
507 "000000000000000000000000000000000000000000000000000000000000000000000000"
508 "000000000000000000000000000000000000000000000000000000000000000000000000"
509 "000000000000000000000000000000000000000000000000000000000000000000000000"
510 "000000000000000000000000000000000000000000000000000000000000000000000000"
511 "000000000000000000000000000000000000000000000000000000000000000000000000"
512 "000000000000000000000000000000000000000000000000000000000000000000000000"
513 "000000000000000000000000000000000000000000000000000000000000000000000000"
514 "000000000000000000000000000000000000000000000000000000000000000000000000"
515 "000000000000000000000000000000000000000000000000000000000000000000000000"
516 "000000000000000000000000000000000000000000000000000000000000000000000000"
517 "000000000000000000000000000000000000000000000000000000000000000000000000"
518 "000000000000000000000000000000000000000000000000000000000000000000000000"
519 "000000000000000000000000000000000000000000000000000000000000000000000000"
520 "000000000000000000000000000000000000000000000000000000000000000000000000"
521 "000000000000000000000000000000000000000000000000000000000000000000000000"
522 "000000000000000000000000000000000000000000000000000000000000000000000000"
523 "000000000000000000000000000000000000000000000000000000000000000000000000"
524 "000000000000000000000000000000000000000000000000000000000000000000000000"
525 "000000000000000000000000000000000000000000000000000000000000000000000000"
526 "000000000000000000000000000000000000000000000000000000000000000000000000"
527 "000000000000000000000000000000000000000000000000000000000000000000000000"
528 "000000000000000000000000000000000000000000000000000000000000000000000000"
529 "000000000000000000000000000000000000000000000000000000000000000000000000"
530 "000000000000000000000000000000000000000000000000000000000000000000000000"
531 "000000000000000000000000000000000000000000000000000000000000000000000000"
532 "000000000000000000000000000000000000000000000000000000000000000000000000"
533 "000000000000000000000000000000000000000000000000000000000000000000000000"
534 "000000000000000000000000000000000000000000000000000000000000000000000000"
535 "000000000000000000000000000000000000000000000000000000000000000000000000"
536 "000000000000000000000000000000000000000000000000000000000000000000000000"
537 "000000000000000000000000000000000000000000000000000000000000000000000000"
538 "000000000000000000000000000000000000000000000000000000000000000000000000"
539 "000000000000000000000000000000000000000000000000000000000000000000000000"
540 "000000000000000000000000000000000000000000000000000000000000000000000000"
541 "000000000000000000000000000000000000000000000000000000000000000000000000"
542 "000000000000000000000000000000000000000000000000000000000000000000000000"
543 "000000000000000000000000000000000000000000000000000000000000000000000000"
544 "000000000000000000000000000000000000000000000000000000000000000000000000"
545 "000000000000000000000000000000000000000000000000000000000000000000000000"
546 "000000000000000000000000000000000000000000000000000000000000000000000000"
547 "000000000000000000000000000000000000000000000000000000000000000000000000"
548 "000000000000000000000000000000000000000000000000000000000000000000000000"
549 "000000000000000000000000000000000000000000000000000000000000000000000000"
550 "000000000000000000000000000000000000000000000000000000000000000000000000"
551 "000000000000000000000000000000000000000000000000000000000000000000000000"
552 "000000000000000000000000000000000000000000000000000000000000000000000000"
553 "000000000000000000000000000000000000000000000000000000000000000000000000"
554 "000000000000000000000000000000000000000000000000000000000000000000000000"
555 "000000000000000000000000000000000000000000000000000000000000000000000000"
556 "000000000000000000000000000000000000000000000000000000000000000000000000"
557 "000000000000000000000000000000000000000000000000000000000000000000000000"
558 "000000000000000000000000000000000000000000000000000000000000000000000000"
559 "000000000000000000000000000000000000000000000000000000000000000000000000"
560 "000000000000000000000000000000000000000000000000000000000000000000000000"
561 "000000000000000000000000000000000000000000000000000000000000000000000000"
562 "000000000000000000000000000000000000000000000000000000000000000000000000"
563 "000000000000000000000000000000000000000000000000000000000000000000000000"
564 "000000000000000000000000000000000000000000000000000000000000000000000000"
565 "000000000000000000000000000000000000000000000000000000000000000000000000"
566 "000000000000000000000000000000000000000000000000000000000000000000000000"
567 "000000000000000000000000000000000000000000000000000000000000000000000000"
568 "000000000000000000000000000000000000000000000000000000000000000000000000"
569 "000000000000000000000000000000000000000000000000000000000000000000000000"
570 "000000000000000000000000000000000000000000000000000000000000000000000000"
571 "000000000000000000000000000000000000000000000000000000000000000000000000"
572 "000000000000000000000000000000000000000000000000000000000000000000000000"
573 "000000000000000000000000000000000000000000000000000000000000000000000000"
574 "000000000000000000000000000000000000000000000000000000000000000000000000"
575 "000000000000000000000000000000000000000000000000000000000000000000000000"
576 "000000000000000000000000000000000000000000000000000000000000000000000000"
577 "000000000000000000000000000000000000000000000000000000000000000000000000"
578 "000000000000000000000000000000000000000000000000000000000000000000000000"
579 "000000000000000000000000000000000000000000000000000000000000000000000000"
580 "000000000000000000000000000000000000000000000000000000000000000000000000"
581 "000000000000000000000000000000000000000000000000000000000000000000000000"
582 "000000000000000000000000000000000000000000000000000000000000000000000000"
583 "000000000000000000000000000000000000000000000000000000000000000000000000"
584 "000000000000000000000000000000000000000000000000fp551615",
585 expectedStrLen: 24755, expectedRawData: uint64_t(0x7ff0000000000000), ERANGE);
586}
587

source code of libc/test/src/stdlib/strtod_test.cpp