Lines Matching +full:2 +full:- +full:6
1 /*-
3 * Copyright 2013 John-Mark Gurney
11 * 2. Redistributions in binary form must reproduce the above copyright
52 /* tests 0-13 test 1000 suffixes */
53 { 2, "0 ", (int64_t)0L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
60 { 2, "1 ", (int64_t)1L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
61 { 3, "2 k", (int64_t)1500L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
62 { 3, "2 M", (int64_t)1500*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
63 { 3, "2 G", (int64_t)1500*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
64 { 3, "2 T", (int64_t)1500*1000*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
65 { 3, "2 P", (int64_t)1500*1000*1000*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
66 { 3, "2 E", (int64_t)1500*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
68 /* tests 14-27 test 1024 suffixes */
69 { 2, "0 ", (int64_t)0L, 0, HN_AUTOSCALE, 4 },
76 { 2, "1 ", (int64_t)1L, 0, HN_AUTOSCALE, 4 },
77 { 3, "2 K", (int64_t)1536L, 0, HN_AUTOSCALE, 4 },
78 { 3, "2 M", (int64_t)1536*1024L, 0, HN_AUTOSCALE, 4 },
79 { 3, "2 G", (int64_t)1536*1024*1024L, 0, HN_AUTOSCALE, 4 },
80 { 3, "2 T", (int64_t)1536*1024*1024*1024L, 0, HN_AUTOSCALE, 4 },
81 { 3, "2 P", (int64_t)1536*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 4 },
82 { 3, "2 E", (int64_t)1536*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 4 },
84 /* tests 28-37 test rounding */
85 { 3, "0 M", (int64_t)500*1000L-1, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
87 { 3, "1 M", (int64_t)1000*1000L + 500*1000L-1, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
88 { 3, "2 M", (int64_t)1000*1000L + 500*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 4 },
89 { 3, "0 K", (int64_t)512L-1, 0, HN_AUTOSCALE, 4 },
91 { 3, "0 M", (int64_t)512*1024L-1, 0, HN_AUTOSCALE, 4 },
93 { 3, "1 M", (int64_t)1024*1024L + 512*1024L-1, 0, HN_AUTOSCALE, 4 },
94 { 3, "2 M", (int64_t)1024*1024L + 512*1024L, 0, HN_AUTOSCALE, 4 },
96 /* tests 38-61 test specific scale factors with 1000 divisor */
99 { 3, "0 M", (int64_t)500L, HN_DIVISOR_1000, 2, 4 },
100 { 3, "1 M", (int64_t)500*1000L, HN_DIVISOR_1000, 2, 4 },
107 { 3, "0 E", (int64_t)500*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 4 },
108 { 3, "1 E", (int64_t)500*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 4 },
110 { 3, "2 k", (int64_t)1500L, HN_DIVISOR_1000, 1, 4 },
111 { 3, "0 M", (int64_t)1500L, HN_DIVISOR_1000, 2, 4 },
112 { 3, "2 M", (int64_t)1500*1000L, HN_DIVISOR_1000, 2, 4 },
114 { 3, "2 G", (int64_t)1500*1000*1000L, HN_DIVISOR_1000, 3, 4 },
116 { 3, "2 T", (int64_t)1500*1000*1000*1000L, HN_DIVISOR_1000, 4, 4 },
118 { 3, "2 P", (int64_t)1500*1000*1000*1000*1000L, HN_DIVISOR_1000, 5, 4 },
119 { 3, "0 E", (int64_t)1500*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 4 },
120 { 3, "2 E", (int64_t)1500*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 4 },
122 /* tests 62-85 test specific scale factors with 1024 divisor */
125 { 3, "0 M", (int64_t)512L, 0, 2, 4 },
126 { 3, "1 M", (int64_t)512*1024L, 0, 2, 4 },
133 { 3, "0 E", (int64_t)512*1024*1024*1024*1024L, 0, 6, 4 },
134 { 3, "1 E", (int64_t)512*1024*1024*1024*1024*1024L, 0, 6, 4 },
136 { 3, "2 K", (int64_t)1536L, 0, 1, 4 },
137 { 3, "0 M", (int64_t)1536L, 0, 2, 4 },
138 { 3, "2 M", (int64_t)1536*1024L, 0, 2, 4 },
140 { 3, "2 G", (int64_t)1536*1024*1024L, 0, 3, 4 },
142 { 3, "2 T", (int64_t)1536*1024*1024*1024L, 0, 4, 4 },
144 { 3, "2 P", (int64_t)1536*1024*1024*1024*1024L, 0, 5, 4 },
145 { 3, "0 E", (int64_t)1536*1024*1024*1024*1024L, 0, 6, 4 },
146 { 3, "2 E", (int64_t)1536*1024*1024*1024*1024*1024L, 0, 6, 4 },
148 /* tests 86-99 test invalid specific scale values of < 0 or >= 7 with
152 { -1, "", (int64_t)1L, 0, 7, 4 },
153 { -1, "", (int64_t)1L, HN_DIVISOR_1000, 7, 4 },
154 { -1, "", (int64_t)1L, 0, 1000, 4 },
155 { -1, "", (int64_t)1L, HN_DIVISOR_1000, 1000, 4 },
156 { -1, "", (int64_t)0L, 0, 1000*1000, 4 },
157 { -1, "", (int64_t)0L, HN_DIVISOR_1000, 1000*1000, 4 },
158 { -1, "", (int64_t)0L, 0, INT_MAX, 4 },
159 { -1, "", (int64_t)0L, HN_DIVISOR_1000, INT_MAX, 4 },
162 by the existing library routine - should report as error */
165 { -1, "", (int64_t)1L, 0, -1, 4 },
166 { -1, "", (int64_t)1L, HN_DIVISOR_1000, -1, 4 },
167 { -1, "", (int64_t)1L, 0, -1000, 4 },
168 { -1, "", (int64_t)1L, HN_DIVISOR_1000, -1000, 4 },
172 { -1, "", (int64_t)1L, 0, -__INT_MAX, 4 },
173 { -1, "", (int64_t)1L, HN_DIVISOR_1000, -__INT_MAX, 4 },
177 /* tests 100-114 test scale 0 with 1000 divisor - print first N digits */
178 { 2, "0 ", (int64_t)0L, HN_DIVISOR_1000, 0, 4 },
179 { 2, "1 ", (int64_t)1L, HN_DIVISOR_1000, 0, 4 },
194 /* tests 115-126 test scale 0 with 1024 divisor - print first N digits */
195 { 2, "0 ", (int64_t)0L, 0, 0, 4 },
196 { 2, "1 ", (int64_t)1L, 0, 0, 4 },
215 /* Requires buflen >= 6 */
216 { 3, "8 E", INT64_MAX, 0, 6, 6 },
217 { 4, "-8 E", -INT64_MAX, 0, 6, 6 },
218 { 3, "0 E", (int64_t)92*1024*1024*1024*1024*1024L, 0, 6, 6 },
219 { 3, "0 E", -(int64_t)92*1024*1024*1024*1024*1024L, 0, 6, 6 },
220 { 3, "0 E", (int64_t)82*1024*1024*1024*1024*1024L, 0, 6, 6 },
221 { 3, "0 E", -(int64_t)82*1024*1024*1024*1024*1024L, 0, 6, 6 },
222 { 3, "0 E", (int64_t)81*1024*1024*1024*1024*1024L, 0, 6, 6 },
223 { 3, "0 E", -(int64_t)81*1024*1024*1024*1024*1024L, 0, 6, 6 },
224 { 4, "92 P", (int64_t)92*1024*1024*1024*1024*1024L, 0, 5, 6 },
225 { 5, "-92 P", -(int64_t)92*1024*1024*1024*1024*1024L, 0, 5, 6 },
226 { 4, "82 P", (int64_t)82*1024*1024*1024*1024*1024L, 0, 5, 6 },
227 { 5, "-82 P", -(int64_t)82*1024*1024*1024*1024*1024L, 0, 5, 6 },
228 { 4, "81 P", (int64_t)81*1024*1024*1024*1024*1024L, 0, 5, 6 },
229 { 5, "-81 P", -(int64_t)81*1024*1024*1024*1024*1024L, 0, 5, 6 },
232 { 3, "9 E", INT64_MAX, HN_DIVISOR_1000, 6, 6 },
233 { 4, "-9 E", -INT64_MAX, HN_DIVISOR_1000, 6, 6 },
234 { 3, "0 E", (int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 6, 6 },
235 { 3, "0 E", -(int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 6, 6 },
236 { 3, "0 E", (int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 6, 6 },
237 { 3, "0 E", -(int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 6, 6 },
238 { 4, "92 P", (int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 5, 6 },
239 { 5, "-92 P", -(int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 5, 6 },
240 { 4, "91 P", (int64_t)81*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 5, 6 },
241 { 5, "-91 P", -(int64_t)81*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 5, 6 },
244 { 3, "8 E", INT64_MAX, 0, HN_AUTOSCALE, 6 },
245 { 4, "-8 E", -INT64_MAX, 0, HN_AUTOSCALE, 6 },
246 { 4, "92 P", (int64_t)92*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 6 },
247 { 5, "-92 P", -(int64_t)92*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 6 },
248 { 4, "82 P", (int64_t)82*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 6 },
249 { 5, "-82 P", -(int64_t)82*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 6 },
250 { 4, "81 P", (int64_t)81*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 6 },
251 { 5, "-81 P", -(int64_t)81*1024*1024*1024*1024*1024L, 0, HN_AUTOSCALE, 6 },
253 { 3, "9 E", INT64_MAX, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
254 { 4, "-9 E", -INT64_MAX, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
255 { 4, "92 P", (int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
256 { 5, "-92 P", -(int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
257 { 4, "91 P", (int64_t)81*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
258 { 5, "-91 P", -(int64_t)81*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
261 { 12, "skdj", INT64_MAX, 0, 0, 6 },
262 { 21, "-9223", -INT64_MAX, 0, 0, 6 },
263 { 19, "10358", (int64_t)92*1024*1024*1024*1024*1024L, 0, 0, 6 },
264 { 20, "-1035", -(int64_t)92*1024*1024*1024*1024*1024L, 0, 0, 6 },
265 { 18, "92323", (int64_t)82*1024*1024*1024*1024*1024L, 0, 0, 6 },
266 { 19, "-9232", -(int64_t)82*1024*1024*1024*1024*1024L, 0, 0, 6 },
267 { 18, "91197", (int64_t)81*1024*1024*1024*1024*1024L, 0, 0, 6 },
268 { 19, "-9119", -(int64_t)81*1024*1024*1024*1024*1024L, 0, 0, 6 },
271 /* XXX - why does this fail? */
272 { -1, "", INT64_MAX, HN_DIVISOR_1000, 0, 6 },
273 { 21, "-9223", -INT64_MAX, HN_DIVISOR_1000, 0, 6 },
274 { 19, "10358", (int64_t)92*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 0, 6 },
275 { 20, "-1035", -(int64_t)92*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 0, 6 },
276 { 18, "92323", (int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 0, 6 },
277 { 19, "-9232", -(int64_t)82*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 0, 6 },
279 { 18, "91197", (int64_t)81*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 0, 6 },
280 { 19, "-9119", -(int64_t)81*1024*1024*1024*1024*1024L, HN_DIVISOR_1000, 0, 6 },
285 /* { ?, "", (int64_t)0L, HN_DIVISOR_1000, HN_GETSCALE, 6 },
290 { 5, "500 k", (int64_t)500*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
291 { 5, "994 k", (int64_t)994*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
292 { 5, "995 k", (int64_t)995*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
293 { 5, "999 k", (int64_t)999*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
294 { 5, "1.0 M", (int64_t)1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
295 { 5, "1.5 M", (int64_t)1500*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
296 { 5, "1.9 M", (int64_t)1949*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
297 { 5, "2.0 M", (int64_t)1950*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
298 { 5, "9.9 M", (int64_t)9949*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
299 { 4, "10 M", (int64_t)9950*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
300 { 5, "500 M", (int64_t)500*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
301 { 5, "994 M", (int64_t)994*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
302 { 5, "995 M", (int64_t)995*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
303 { 5, "999 M", (int64_t)999*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
305 { 5, "500 K", (int64_t)500*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
306 { 5, "994 K", (int64_t)994*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
307 { 5, "995 K", (int64_t)995*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
308 { 5, "999 K", (int64_t)999*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
309 { 5, "1.0 M", (int64_t)1000*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
310 { 5, "1.0 M", (int64_t)1018*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
311 { 5, "1.0 M", (int64_t)1019*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
312 { 5, "1.5 M", (int64_t)1536*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
313 { 5, "1.9 M", (int64_t)1996*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
314 { 5, "2.0 M", (int64_t)1997*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
315 { 5, "2.0 M", (int64_t)2047*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
316 { 5, "2.0 M", (int64_t)2048*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
317 { 5, "2.0 M", (int64_t)2099*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
318 { 5, "2.1 M", (int64_t)2100*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
319 { 5, "9.9 M", (int64_t)10188*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
320 /* XXX - shouldn't the following two be "10. M"? */
321 { 4, "10 M", (int64_t)10189*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
322 { 4, "10 M", (int64_t)10240*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
323 { 5, "500 M", (int64_t)500*1024*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
324 { 5, "994 M", (int64_t)994*1024*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
325 { 5, "995 M", (int64_t)995*1024*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
326 { 5, "999 M", (int64_t)999*1024*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
327 { 5, "1.0 G", (int64_t)1000*1024*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
328 { 5, "1.0 G", (int64_t)1023*1024*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
330 /* Negative, Autoscale - should pass */
331 { 6, "-1.5 ", -(int64_t)1500*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
332 { 6, "-1.9 ", -(int64_t)1949*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
333 { 6, "-9.9 ", -(int64_t)9949*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
335 { 6, "-1.5 ", -(int64_t)1536*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
336 { 6, "-1.9 ", -(int64_t)1949*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
337 { 6, "-9.7 ", -(int64_t)9949*1024L, HN_DECIMAL, HN_AUTOSCALE, 6 },
340 { 5, "500 P", (int64_t)500*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
341 { 5, "1.9 E", (int64_t)1949*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
342 { 5, "8.9 E", (int64_t)8949*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
343 { 5, "9.2 E", INT64_MAX, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
345 { 6, "-9.2 ", -INT64_MAX, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, 6 },
346 …{ 6, "-8.9 ", -(int64_t)8949*1000*1000*1000*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, HN_AUTOSCALE, …
348 { 5, "8.0 E", INT64_MAX, HN_DECIMAL, HN_AUTOSCALE, 6 },
349 { 5, "7.9 E", INT64_MAX-(int64_t)100*1024*1024*1024*1024*1024LL, HN_DECIMAL, HN_AUTOSCALE, 6 },
350 { 6, "-8.0 ", -INT64_MAX, HN_DECIMAL, HN_AUTOSCALE, 6 },
351 { 6, "-7.9 ", -INT64_MAX+(int64_t)100*1024*1024*1024*1024*1024LL, HN_DECIMAL, HN_AUTOSCALE, 6 },
354 { 5, "500 k", (int64_t)500*1000L, HN_DECIMAL|HN_DIVISOR_1000, 1, 6 },
355 { 5, "0.5 M", (int64_t)500*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
356 { 5, "949 k", (int64_t)949*1000L, HN_DECIMAL|HN_DIVISOR_1000, 1, 6 },
357 { 5, "0.9 M", (int64_t)949*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
358 { 5, "950 k", (int64_t)950*1000L, HN_DECIMAL|HN_DIVISOR_1000, 1, 6 },
359 { 5, "1.0 M", (int64_t)950*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
360 { 5, "999 k", (int64_t)999*1000L, HN_DECIMAL|HN_DIVISOR_1000, 1, 6 },
361 { 5, "1.0 M", (int64_t)999*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
362 { 5, "1.5 M", (int64_t)1500*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
363 { 5, "1.9 M", (int64_t)1949*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
364 { 5, "2.0 M", (int64_t)1950*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
365 { 5, "9.9 M", (int64_t)9949*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
366 { 4, "10 M", (int64_t)9950*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
367 { 5, "500 M", (int64_t)500*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
368 { 5, "0.5 G", (int64_t)500*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, 3, 6 },
369 { 5, "999 M", (int64_t)999*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, 2, 6 },
370 { 5, "1.0 G", (int64_t)999*1000*1000L, HN_DECIMAL|HN_DIVISOR_1000, 3, 6 },
372 { 5, "500 P", (int64_t)500*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, 5, 6 },
373 { 5, "1.0 E", (int64_t)500*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 6 },
374 { 5, "1.9 E", (int64_t)1949*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 6 },
375 { 5, "8.9 E", (int64_t)8949*1000*1000*1000*1000*1000L, HN_DIVISOR_1000, 6, 6 },
376 { 5, "9.2 E", INT64_MAX, HN_DECIMAL|HN_DIVISOR_1000, 6, 6 },
379 { 5, "512 K", (int64_t)512*1024L, HN_DECIMAL, 1, 6 },
380 { 5, "0.5 M", (int64_t)512*1024L, HN_DECIMAL, 2, 6 },
392 printf("Usage: %s [-nE] [-l num] [-v]\n\n", progname); in usage()
394 printf("\t-l num\tSet max length for result; buflen = num + 1\n"); in usage()
396 printf("\t-n\tInclude negative scale tests, which cause older libutil\n"); in usage()
398 printf("\t-E\tInclude numbers > 1/2 Exa[byte] which currently fail\n"); in usage()
399 printf("\t-v\tVerbose - always print summary results\n"); in usage()
400 printf("\t-h, -?\tShow options\n"); in usage()
410 while ((ch = getopt(argc, argv, "nEh?vl:")) != -1) { in read_options()
493 printf("ok %zu # skip - not turned on\n", i); in testskipped()