]> Cypherpunks.ru repositories - gostls13.git/blob - src/math/rand/v2/regress_test.go
math/rand/v2: simplify Perm
[gostls13.git] / src / math / rand / v2 / regress_test.go
1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Test that random number sequences generated by a specific seed
6 // do not change from version to version.
7 //
8 // Do NOT make changes to the golden outputs. If bugs need to be fixed
9 // in the underlying code, find ways to fix them that do not affect the
10 // outputs.
11
12 package rand_test
13
14 import (
15         "bytes"
16         "flag"
17         "fmt"
18         "go/format"
19         "io"
20         . "math/rand/v2"
21         "os"
22         "reflect"
23         "strings"
24         "testing"
25 )
26
27 var update = flag.Bool("update", false, "update golden results for regression test")
28
29 func TestRegress(t *testing.T) {
30         var int32s = []int32{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1}
31         var uint32s = []uint32{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1, 1<<32 - 2, 1<<32 - 1}
32         var int64s = []int64{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1, 1000000000000000000, 1 << 60, 1<<63 - 2, 1<<63 - 1}
33         var uint64s = []uint64{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1, 1000000000000000000, 1 << 60, 1<<63 - 2, 1<<63 - 1, 1<<64 - 2, 1<<64 - 1}
34         var permSizes = []int{0, 1, 5, 8, 9, 10, 16}
35
36         n := reflect.TypeOf(New(NewSource(1))).NumMethod()
37         p := 0
38         var buf bytes.Buffer
39         if *update {
40                 fmt.Fprintf(&buf, "var regressGolden = []any{\n")
41         }
42         for i := 0; i < n; i++ {
43                 if *update && i > 0 {
44                         fmt.Fprintf(&buf, "\n")
45                 }
46                 r := New(NewSource(1))
47                 rv := reflect.ValueOf(r)
48                 m := rv.Type().Method(i)
49                 mv := rv.Method(i)
50                 mt := mv.Type()
51                 if mt.NumOut() == 0 {
52                         continue
53                 }
54                 for repeat := 0; repeat < 20; repeat++ {
55                         var args []reflect.Value
56                         var argstr string
57                         if mt.NumIn() == 1 {
58                                 var x any
59                                 switch mt.In(0).Kind() {
60                                 default:
61                                         t.Fatalf("unexpected argument type for r.%s", m.Name)
62
63                                 case reflect.Int:
64                                         if m.Name == "Perm" {
65                                                 x = permSizes[repeat%len(permSizes)]
66                                                 break
67                                         }
68                                         big := int64s[repeat%len(int64s)]
69                                         if int64(int(big)) != big {
70                                                 // On 32-bit machine.
71                                                 // Consume an Int64 like on a 64-bit machine,
72                                                 // to keep the golden data the same on different architectures.
73                                                 r.Int64N(big)
74                                                 if *update {
75                                                         t.Fatalf("must run -update on 64-bit machine")
76                                                 }
77                                                 p++
78                                                 continue
79                                         }
80                                         x = int(big)
81
82                                 case reflect.Uint:
83                                         big := uint64s[repeat%len(uint64s)]
84                                         if uint64(uint(big)) != big {
85                                                 r.Uint64N(big) // what would happen on 64-bit machine, to keep stream in sync
86                                                 if *update {
87                                                         t.Fatalf("must run -update on 64-bit machine")
88                                                 }
89                                                 p++
90                                                 continue
91                                         }
92                                         x = uint(big)
93
94                                 case reflect.Int32:
95                                         x = int32s[repeat%len(int32s)]
96
97                                 case reflect.Int64:
98                                         x = int64s[repeat%len(int64s)]
99
100                                 case reflect.Uint32:
101                                         x = uint32s[repeat%len(uint32s)]
102
103                                 case reflect.Uint64:
104                                         x = uint64s[repeat%len(uint64s)]
105                                 }
106                                 argstr = fmt.Sprint(x)
107                                 args = append(args, reflect.ValueOf(x))
108                         }
109
110                         var out any
111                         out = mv.Call(args)[0].Interface()
112                         if m.Name == "Int" || m.Name == "IntN" {
113                                 out = int64(out.(int))
114                         }
115                         if m.Name == "Uint" || m.Name == "UintN" {
116                                 out = uint64(out.(uint))
117                         }
118                         if *update {
119                                 var val string
120                                 big := int64(1 << 60)
121                                 if int64(int(big)) != big && (m.Name == "Int" || m.Name == "IntN") {
122                                         // 32-bit machine cannot print 64-bit results
123                                         val = "truncated"
124                                 } else if reflect.TypeOf(out).Kind() == reflect.Slice {
125                                         val = fmt.Sprintf("%#v", out)
126                                 } else {
127                                         val = fmt.Sprintf("%T(%v)", out, out)
128                                 }
129                                 fmt.Fprintf(&buf, "\t%s, // %s(%s)\n", val, m.Name, argstr)
130                         } else if p >= len(regressGolden) {
131                                 t.Errorf("r.%s(%s) = %v, missing golden value", m.Name, argstr, out)
132                         } else {
133                                 want := regressGolden[p]
134                                 if m.Name == "Int" {
135                                         want = int64(int(uint(want.(int64)) << 1 >> 1))
136                                 }
137                                 if !reflect.DeepEqual(out, want) {
138                                         t.Errorf("r.%s(%s) = %v, want %v", m.Name, argstr, out, want)
139                                 }
140                         }
141                         p++
142                 }
143         }
144         if *update {
145                 replace(t, "regress_test.go", buf.Bytes())
146         }
147 }
148
149 func TestUpdateExample(t *testing.T) {
150         if !*update {
151                 t.Skip("-update not given")
152         }
153
154         oldStdout := os.Stdout
155         defer func() {
156                 os.Stdout = oldStdout
157         }()
158
159         r, w, err := os.Pipe()
160         if err != nil {
161                 t.Fatal(err)
162         }
163         defer r.Close()
164         defer w.Close()
165
166         go func() {
167                 os.Stdout = w
168                 Example_rand()
169                 os.Stdout = oldStdout
170                 w.Close()
171         }()
172         out, err := io.ReadAll(r)
173         if err != nil {
174                 t.Fatal(err)
175         }
176
177         var buf bytes.Buffer
178         fmt.Fprintf(&buf, "\t// Output:\n")
179         for _, line := range strings.Split(string(out), "\n") {
180                 if line != "" {
181                         fmt.Fprintf(&buf, "\t// %s\n", line)
182                 }
183         }
184
185         replace(t, "example_test.go", buf.Bytes())
186
187         // Exit so that Example_rand cannot fail.
188         fmt.Printf("UPDATED; ignore non-zero exit status\n")
189         os.Exit(1)
190 }
191
192 // replace substitutes the definition text from new into the content of file.
193 // The text in new is of the form
194 //
195 //      var whatever = T{
196 //              ...
197 //      }
198 //
199 // Replace searches file for an exact match for the text of the first line,
200 // finds the closing brace, and then substitutes new for what used to be in the file.
201 // This lets us update the regressGolden table during go test -update.
202 func replace(t *testing.T, file string, new []byte) {
203         first, _, _ := bytes.Cut(new, []byte("\n"))
204         first = append(append([]byte("\n"), first...), '\n')
205         data, err := os.ReadFile(file)
206         if err != nil {
207                 t.Fatal(err)
208         }
209         i := bytes.Index(data, first)
210         if i < 0 {
211                 t.Fatalf("cannot find %q in %s", first, file)
212         }
213         j := bytes.Index(data[i+1:], []byte("\n}\n"))
214         if j < 0 {
215                 t.Fatalf("cannot find end in %s", file)
216         }
217         data = append(append(data[:i+1:i+1], new...), data[i+1+j+1:]...)
218         data, err = format.Source(data)
219         if err != nil {
220                 t.Fatal(err)
221         }
222         if err := os.WriteFile(file, data, 0666); err != nil {
223                 t.Fatal(err)
224         }
225 }
226
227 var regressGolden = []any{
228         float64(0.018945741402288857), // ExpFloat64()
229         float64(0.13829043737893842),  // ExpFloat64()
230         float64(1.1409883497761604),   // ExpFloat64()
231         float64(1.2449542292186253),   // ExpFloat64()
232         float64(0.4849966704675476),   // ExpFloat64()
233         float64(0.08948056191408837),  // ExpFloat64()
234         float64(0.41380878045769276),  // ExpFloat64()
235         float64(0.31325729628567145),  // ExpFloat64()
236         float64(0.23118058048615886),  // ExpFloat64()
237         float64(0.2090943007446),      // ExpFloat64()
238         float64(2.6861652769471456),   // ExpFloat64()
239         float64(1.3811947596783387),   // ExpFloat64()
240         float64(1.5595976199841015),   // ExpFloat64()
241         float64(2.3469708688771744),   // ExpFloat64()
242         float64(0.5882760784580738),   // ExpFloat64()
243         float64(0.33463787922271115),  // ExpFloat64()
244         float64(0.8799304551478242),   // ExpFloat64()
245         float64(1.616532211418378),    // ExpFloat64()
246         float64(0.09548420514080316),  // ExpFloat64()
247         float64(2.448910012295588),    // ExpFloat64()
248
249         float32(0.39651686),  // Float32()
250         float32(0.38516325),  // Float32()
251         float32(0.06368679),  // Float32()
252         float32(0.027415931), // Float32()
253         float32(0.3535996),   // Float32()
254         float32(0.9133533),   // Float32()
255         float32(0.40153843),  // Float32()
256         float32(0.034464598), // Float32()
257         float32(0.4120984),   // Float32()
258         float32(0.51671815),  // Float32()
259         float32(0.9472164),   // Float32()
260         float32(0.14591497),  // Float32()
261         float32(0.42577565),  // Float32()
262         float32(0.7241202),   // Float32()
263         float32(0.7114463),   // Float32()
264         float32(0.01790011),  // Float32()
265         float32(0.22837132),  // Float32()
266         float32(0.5170377),   // Float32()
267         float32(0.9228385),   // Float32()
268         float32(0.9747907),   // Float32()
269
270         float64(0.17213489113047786), // Float64()
271         float64(0.0813061580926816),  // Float64()
272         float64(0.5094944957341486),  // Float64()
273         float64(0.2193276794677107),  // Float64()
274         float64(0.8287970009760902),  // Float64()
275         float64(0.30682661592006877), // Float64()
276         float64(0.21230767869565503), // Float64()
277         float64(0.2757168463782187),  // Float64()
278         float64(0.2967873684321951),  // Float64()
279         float64(0.13374523933395033), // Float64()
280         float64(0.5777315861149934),  // Float64()
281         float64(0.16732005385910476), // Float64()
282         float64(0.40620552435192425), // Float64()
283         float64(0.7929618428784644),  // Float64()
284         float64(0.691570514257735),   // Float64()
285         float64(0.14320118008134408), // Float64()
286         float64(0.8269708087758376),  // Float64()
287         float64(0.13630191289931604), // Float64()
288         float64(0.38270814230149663), // Float64()
289         float64(0.7983258549906352),  // Float64()
290
291         int64(5577006791947779410), // Int()
292         int64(8674665223082153551), // Int()
293         int64(6129484611666145821), // Int()
294         int64(4037200794235010051), // Int()
295         int64(3916589616287113937), // Int()
296         int64(6334824724549167320), // Int()
297         int64(605394647632969758),  // Int()
298         int64(1443635317331776148), // Int()
299         int64(894385949183117216),  // Int()
300         int64(2775422040480279449), // Int()
301         int64(4751997750760398084), // Int()
302         int64(7504504064263669287), // Int()
303         int64(1976235410884491574), // Int()
304         int64(3510942875414458836), // Int()
305         int64(2933568871211445515), // Int()
306         int64(4324745483838182873), // Int()
307         int64(2610529275472644968), // Int()
308         int64(2703387474910584091), // Int()
309         int64(6263450610539110790), // Int()
310         int64(2015796113853353331), // Int()
311
312         int32(649249040),  // Int32()
313         int32(1009863943), // Int32()
314         int32(1787307747), // Int32()
315         int32(1543733853), // Int32()
316         int32(455951040),  // Int32()
317         int32(737470659),  // Int32()
318         int32(1144219036), // Int32()
319         int32(1241803094), // Int32()
320         int32(104120228),  // Int32()
321         int32(1396843474), // Int32()
322         int32(553205347),  // Int32()
323         int32(873639255),  // Int32()
324         int32(1303805905), // Int32()
325         int32(408727544),  // Int32()
326         int32(1415254188), // Int32()
327         int32(503466637),  // Int32()
328         int32(1377647429), // Int32()
329         int32(1388457546), // Int32()
330         int32(729161618),  // Int32()
331         int32(1308411377), // Int32()
332
333         int32(0),          // Int32N(1)
334         int32(4),          // Int32N(10)
335         int32(29),         // Int32N(32)
336         int32(883715),     // Int32N(1048576)
337         int32(222632),     // Int32N(1048577)
338         int32(343411536),  // Int32N(1000000000)
339         int32(957743134),  // Int32N(1073741824)
340         int32(1241803092), // Int32N(2147483646)
341         int32(104120228),  // Int32N(2147483647)
342         int32(0),          // Int32N(1)
343         int32(2),          // Int32N(10)
344         int32(7),          // Int32N(32)
345         int32(96566),      // Int32N(1048576)
346         int32(199574),     // Int32N(1048577)
347         int32(659029087),  // Int32N(1000000000)
348         int32(606492121),  // Int32N(1073741824)
349         int32(1377647428), // Int32N(2147483646)
350         int32(1388457546), // Int32N(2147483647)
351         int32(0),          // Int32N(1)
352         int32(6),          // Int32N(10)
353
354         int64(5577006791947779410), // Int64()
355         int64(8674665223082153551), // Int64()
356         int64(6129484611666145821), // Int64()
357         int64(4037200794235010051), // Int64()
358         int64(3916589616287113937), // Int64()
359         int64(6334824724549167320), // Int64()
360         int64(605394647632969758),  // Int64()
361         int64(1443635317331776148), // Int64()
362         int64(894385949183117216),  // Int64()
363         int64(2775422040480279449), // Int64()
364         int64(4751997750760398084), // Int64()
365         int64(7504504064263669287), // Int64()
366         int64(1976235410884491574), // Int64()
367         int64(3510942875414458836), // Int64()
368         int64(2933568871211445515), // Int64()
369         int64(4324745483838182873), // Int64()
370         int64(2610529275472644968), // Int64()
371         int64(2703387474910584091), // Int64()
372         int64(6263450610539110790), // Int64()
373         int64(2015796113853353331), // Int64()
374
375         int64(0),                   // Int64N(1)
376         int64(4),                   // Int64N(10)
377         int64(29),                  // Int64N(32)
378         int64(883715),              // Int64N(1048576)
379         int64(222632),              // Int64N(1048577)
380         int64(343411536),           // Int64N(1000000000)
381         int64(957743134),           // Int64N(1073741824)
382         int64(1241803092),          // Int64N(2147483646)
383         int64(104120228),           // Int64N(2147483647)
384         int64(650455930292643530),  // Int64N(1000000000000000000)
385         int64(140311732333010180),  // Int64N(1152921504606846976)
386         int64(3752252032131834642), // Int64N(9223372036854775806)
387         int64(5599803723869633690), // Int64N(9223372036854775807)
388         int64(0),                   // Int64N(1)
389         int64(6),                   // Int64N(10)
390         int64(25),                  // Int64N(32)
391         int64(920424),              // Int64N(1048576)
392         int64(677958),              // Int64N(1048577)
393         int64(339542337),           // Int64N(1000000000)
394         int64(701992307),           // Int64N(1073741824)
395
396         int64(0),                   // IntN(1)
397         int64(4),                   // IntN(10)
398         int64(29),                  // IntN(32)
399         int64(883715),              // IntN(1048576)
400         int64(222632),              // IntN(1048577)
401         int64(343411536),           // IntN(1000000000)
402         int64(957743134),           // IntN(1073741824)
403         int64(1241803092),          // IntN(2147483646)
404         int64(104120228),           // IntN(2147483647)
405         int64(650455930292643530),  // IntN(1000000000000000000)
406         int64(140311732333010180),  // IntN(1152921504606846976)
407         int64(3752252032131834642), // IntN(9223372036854775806)
408         int64(5599803723869633690), // IntN(9223372036854775807)
409         int64(0),                   // IntN(1)
410         int64(6),                   // IntN(10)
411         int64(25),                  // IntN(32)
412         int64(920424),              // IntN(1048576)
413         int64(677958),              // IntN(1048577)
414         int64(339542337),           // IntN(1000000000)
415         int64(701992307),           // IntN(1073741824)
416
417         float64(0.06909351197715208),  // NormFloat64()
418         float64(0.5938704963270934),   // NormFloat64()
419         float64(1.306028863617345),    // NormFloat64()
420         float64(1.4117443127537266),   // NormFloat64()
421         float64(0.15696085092285333),  // NormFloat64()
422         float64(1.360954184661658),    // NormFloat64()
423         float64(0.34312984093649135),  // NormFloat64()
424         float64(0.7340067314938814),   // NormFloat64()
425         float64(0.22135434353553696),  // NormFloat64()
426         float64(-0.15741313389982836), // NormFloat64()
427         float64(-1.080896970111088),   // NormFloat64()
428         float64(-0.6107370548788273),  // NormFloat64()
429         float64(-2.3550050260853643),  // NormFloat64()
430         float64(1.8363976597396832),   // NormFloat64()
431         float64(-0.7167650947520989),  // NormFloat64()
432         float64(0.6860847654927735),   // NormFloat64()
433         float64(0.3403802538398155),   // NormFloat64()
434         float64(-1.3884780626234523),  // NormFloat64()
435         float64(0.14097321427512907),  // NormFloat64()
436         float64(-1.032800550788109),   // NormFloat64()
437
438         []int{},                             // Perm(0)
439         []int{0},                            // Perm(1)
440         []int{0, 4, 2, 3, 1},                // Perm(5)
441         []int{4, 5, 7, 0, 6, 3, 2, 1},       // Perm(8)
442         []int{2, 5, 4, 0, 7, 8, 1, 6, 3},    // Perm(9)
443         []int{9, 8, 7, 1, 3, 2, 5, 4, 0, 6}, // Perm(10)
444         []int{1, 5, 8, 11, 14, 2, 7, 10, 15, 9, 13, 6, 0, 3, 12, 4}, // Perm(16)
445         []int{},                             // Perm(0)
446         []int{0},                            // Perm(1)
447         []int{4, 1, 2, 0, 3},                // Perm(5)
448         []int{7, 0, 3, 5, 4, 1, 2, 6},       // Perm(8)
449         []int{6, 7, 1, 2, 0, 5, 8, 3, 4},    // Perm(9)
450         []int{7, 2, 8, 6, 1, 5, 9, 0, 3, 4}, // Perm(10)
451         []int{11, 0, 5, 1, 12, 4, 13, 9, 7, 2, 15, 10, 8, 14, 6, 3}, // Perm(16)
452         []int{},                             // Perm(0)
453         []int{0},                            // Perm(1)
454         []int{2, 4, 0, 3, 1},                // Perm(5)
455         []int{4, 2, 5, 0, 6, 3, 1, 7},       // Perm(8)
456         []int{3, 2, 8, 6, 5, 7, 1, 4, 0},    // Perm(9)
457         []int{2, 0, 7, 5, 6, 1, 8, 3, 4, 9}, // Perm(10)
458
459         uint32(1298498081), // Uint32()
460         uint32(2019727887), // Uint32()
461         uint32(3574615495), // Uint32()
462         uint32(3087467707), // Uint32()
463         uint32(911902081),  // Uint32()
464         uint32(1474941318), // Uint32()
465         uint32(2288438073), // Uint32()
466         uint32(2483606188), // Uint32()
467         uint32(208240456),  // Uint32()
468         uint32(2793686948), // Uint32()
469         uint32(1106410694), // Uint32()
470         uint32(1747278511), // Uint32()
471         uint32(2607611810), // Uint32()
472         uint32(817455089),  // Uint32()
473         uint32(2830508376), // Uint32()
474         uint32(1006933274), // Uint32()
475         uint32(2755294859), // Uint32()
476         uint32(2776915093), // Uint32()
477         uint32(1458323237), // Uint32()
478         uint32(2616822754), // Uint32()
479
480         uint32(0),          // Uint32N(1)
481         uint32(4),          // Uint32N(10)
482         uint32(29),         // Uint32N(32)
483         uint32(883715),     // Uint32N(1048576)
484         uint32(222632),     // Uint32N(1048577)
485         uint32(343411536),  // Uint32N(1000000000)
486         uint32(957743134),  // Uint32N(1073741824)
487         uint32(1241803092), // Uint32N(2147483646)
488         uint32(104120228),  // Uint32N(2147483647)
489         uint32(2793686946), // Uint32N(4294967294)
490         uint32(1106410694), // Uint32N(4294967295)
491         uint32(0),          // Uint32N(1)
492         uint32(6),          // Uint32N(10)
493         uint32(20),         // Uint32N(32)
494         uint32(240907),     // Uint32N(1048576)
495         uint32(245833),     // Uint32N(1048577)
496         uint32(641517075),  // Uint32N(1000000000)
497         uint32(340335899),  // Uint32N(1073741824)
498         uint32(729161617),  // Uint32N(2147483646)
499         uint32(1308411376), // Uint32N(2147483647)
500
501         uint64(5577006791947779410),  // Uint64()
502         uint64(8674665223082153551),  // Uint64()
503         uint64(15352856648520921629), // Uint64()
504         uint64(13260572831089785859), // Uint64()
505         uint64(3916589616287113937),  // Uint64()
506         uint64(6334824724549167320),  // Uint64()
507         uint64(9828766684487745566),  // Uint64()
508         uint64(10667007354186551956), // Uint64()
509         uint64(894385949183117216),   // Uint64()
510         uint64(11998794077335055257), // Uint64()
511         uint64(4751997750760398084),  // Uint64()
512         uint64(7504504064263669287),  // Uint64()
513         uint64(11199607447739267382), // Uint64()
514         uint64(3510942875414458836),  // Uint64()
515         uint64(12156940908066221323), // Uint64()
516         uint64(4324745483838182873),  // Uint64()
517         uint64(11833901312327420776), // Uint64()
518         uint64(11926759511765359899), // Uint64()
519         uint64(6263450610539110790),  // Uint64()
520         uint64(11239168150708129139), // Uint64()
521
522         uint64(0),                    // Uint64N(1)
523         uint64(4),                    // Uint64N(10)
524         uint64(29),                   // Uint64N(32)
525         uint64(883715),               // Uint64N(1048576)
526         uint64(222632),               // Uint64N(1048577)
527         uint64(343411536),            // Uint64N(1000000000)
528         uint64(957743134),            // Uint64N(1073741824)
529         uint64(1241803092),           // Uint64N(2147483646)
530         uint64(104120228),            // Uint64N(2147483647)
531         uint64(650455930292643530),   // Uint64N(1000000000000000000)
532         uint64(140311732333010180),   // Uint64N(1152921504606846976)
533         uint64(3752252032131834642),  // Uint64N(9223372036854775806)
534         uint64(5599803723869633690),  // Uint64N(9223372036854775807)
535         uint64(3510942875414458835),  // Uint64N(18446744073709551614)
536         uint64(12156940908066221322), // Uint64N(18446744073709551615)
537         uint64(0),                    // Uint64N(1)
538         uint64(6),                    // Uint64N(10)
539         uint64(27),                   // Uint64N(32)
540         uint64(205190),               // Uint64N(1048576)
541         uint64(638873),               // Uint64N(1048577)
542
543         uint64(0),                    // UintN(1)
544         uint64(4),                    // UintN(10)
545         uint64(29),                   // UintN(32)
546         uint64(883715),               // UintN(1048576)
547         uint64(222632),               // UintN(1048577)
548         uint64(343411536),            // UintN(1000000000)
549         uint64(957743134),            // UintN(1073741824)
550         uint64(1241803092),           // UintN(2147483646)
551         uint64(104120228),            // UintN(2147483647)
552         uint64(650455930292643530),   // UintN(1000000000000000000)
553         uint64(140311732333010180),   // UintN(1152921504606846976)
554         uint64(3752252032131834642),  // UintN(9223372036854775806)
555         uint64(5599803723869633690),  // UintN(9223372036854775807)
556         uint64(3510942875414458835),  // UintN(18446744073709551614)
557         uint64(12156940908066221322), // UintN(18446744073709551615)
558         uint64(0),                    // UintN(1)
559         uint64(6),                    // UintN(10)
560         uint64(27),                   // UintN(32)
561         uint64(205190),               // UintN(1048576)
562         uint64(638873),               // UintN(1048577)
563 }