OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [apps/] [testfloat/] [testCases.c] - Blame information for rev 397

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 349 julius
 
2
/*
3
===============================================================================
4
 
5
This C source file is part of TestFloat, Release 2a, a package of programs
6
for testing the correctness of floating-point arithmetic complying to the
7
IEC/IEEE Standard for Floating-Point.
8
 
9
Written by John R. Hauser.  More information is available through the Web
10
page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
11
 
12
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
13
has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
14
TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
15
PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
16
AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
17
 
18
Derivative works are acceptable, even for commercial purposes, so long as
19
(1) they include prominent notice that the work is derivative, and (2) they
20
include prominent notice akin to these four paragraphs for those parts of
21
this code that are retained.
22
 
23
Modified for use with or1ksim's testsuite.
24
 
25
Contributor Julius Baxter <julius.baxter@orsoc.se>
26
 
27
===============================================================================
28
*/
29
 
30
#include "milieu.h"
31
#include "fail.h"
32
#include "random.h"
33
#include "softfloat.h"
34
#include "testCases.h"
35
 
36
typedef struct {
37
    int16 expNum, term1Num, term2Num;
38
    flag done;
39
} sequenceT;
40
 
41
enum {
42
    int32NumP1 = 124
43
};
44
 
45
static const uint32 int32P1[ int32NumP1 ] = {
46
    0x00000000,
47
    0x00000001,
48
    0x00000002,
49
    0x00000004,
50
    0x00000008,
51
    0x00000010,
52
    0x00000020,
53
    0x00000040,
54
    0x00000080,
55
    0x00000100,
56
    0x00000200,
57
    0x00000400,
58
    0x00000800,
59
    0x00001000,
60
    0x00002000,
61
    0x00004000,
62
    0x00008000,
63
    0x00010000,
64
    0x00020000,
65
    0x00040000,
66
    0x00080000,
67
    0x00100000,
68
    0x00200000,
69
    0x00400000,
70
    0x00800000,
71
    0x01000000,
72
    0x02000000,
73
    0x04000000,
74
    0x08000000,
75
    0x10000000,
76
    0x20000000,
77
    0x40000000,
78
    0x80000000,
79
    0xC0000000,
80
    0xE0000000,
81
    0xF0000000,
82
    0xF8000000,
83
    0xFC000000,
84
    0xFE000000,
85
    0xFF000000,
86
    0xFF800000,
87
    0xFFC00000,
88
    0xFFE00000,
89
    0xFFF00000,
90
    0xFFF80000,
91
    0xFFFC0000,
92
    0xFFFE0000,
93
    0xFFFF0000,
94
    0xFFFF8000,
95
    0xFFFFC000,
96
    0xFFFFE000,
97
    0xFFFFF000,
98
    0xFFFFF800,
99
    0xFFFFFC00,
100
    0xFFFFFE00,
101
    0xFFFFFF00,
102
    0xFFFFFF80,
103
    0xFFFFFFC0,
104
    0xFFFFFFE0,
105
    0xFFFFFFF0,
106
    0xFFFFFFF8,
107
    0xFFFFFFFC,
108
    0xFFFFFFFE,
109
    0xFFFFFFFF,
110
    0xFFFFFFFD,
111
    0xFFFFFFFB,
112
    0xFFFFFFF7,
113
    0xFFFFFFEF,
114
    0xFFFFFFDF,
115
    0xFFFFFFBF,
116
    0xFFFFFF7F,
117
    0xFFFFFEFF,
118
    0xFFFFFDFF,
119
    0xFFFFFBFF,
120
    0xFFFFF7FF,
121
    0xFFFFEFFF,
122
    0xFFFFDFFF,
123
    0xFFFFBFFF,
124
    0xFFFF7FFF,
125
    0xFFFEFFFF,
126
    0xFFFDFFFF,
127
    0xFFFBFFFF,
128
    0xFFF7FFFF,
129
    0xFFEFFFFF,
130
    0xFFDFFFFF,
131
    0xFFBFFFFF,
132
    0xFF7FFFFF,
133
    0xFEFFFFFF,
134
    0xFDFFFFFF,
135
    0xFBFFFFFF,
136
    0xF7FFFFFF,
137
    0xEFFFFFFF,
138
    0xDFFFFFFF,
139
    0xBFFFFFFF,
140
    0x7FFFFFFF,
141
    0x3FFFFFFF,
142
    0x1FFFFFFF,
143
    0x0FFFFFFF,
144
    0x07FFFFFF,
145
    0x03FFFFFF,
146
    0x01FFFFFF,
147
    0x00FFFFFF,
148
    0x007FFFFF,
149
    0x003FFFFF,
150
    0x001FFFFF,
151
    0x000FFFFF,
152
    0x0007FFFF,
153
    0x0003FFFF,
154
    0x0001FFFF,
155
    0x0000FFFF,
156
    0x00007FFF,
157
    0x00003FFF,
158
    0x00001FFF,
159
    0x00000FFF,
160
    0x000007FF,
161
    0x000003FF,
162
    0x000001FF,
163
    0x000000FF,
164
    0x0000007F,
165
    0x0000003F,
166
    0x0000001F,
167
    0x0000000F,
168
    0x00000007,
169
    0x00000003
170
};
171
 
172
static int32 int32NextP1( sequenceT *sequencePtr )
173
{
174
    uint8 termNum;
175
    int32 z;
176
 
177
    termNum = sequencePtr->term1Num;
178
    z = int32P1[ termNum ];
179
    ++termNum;
180
    if ( int32NumP1 <= termNum ) {
181
        termNum = 0;
182
        sequencePtr->done = TRUE;
183
    }
184
    sequencePtr->term1Num = termNum;
185
    return (sbits32) z;
186
 
187
}
188
 
189
static const int32 int32NumP2 = ( int32NumP1 * int32NumP1 + int32NumP1 ) / 2;
190
 
191
static int32 int32NextP2( sequenceT *sequencePtr )
192
{
193
    uint8 term1Num, term2Num;
194
    int32 z;
195
 
196
    term2Num = sequencePtr->term2Num;
197
    term1Num = sequencePtr->term1Num;
198
    z = int32P1[ term1Num ] + int32P1[ term2Num ];
199
    ++term2Num;
200
    if ( int32NumP1 <= term2Num ) {
201
        ++term1Num;
202
        if ( int32NumP1 <= term1Num ) {
203
            term1Num = 0;
204
            sequencePtr->done = TRUE;
205
        }
206
        term2Num = term1Num;
207
        sequencePtr->term1Num = term1Num;
208
    }
209
    sequencePtr->term2Num = term2Num;
210
    return (sbits32) z;
211
 
212
}
213
 
214
static int32 int32RandomP3( void )
215
{
216
 
217
    return
218
        (sbits32) (
219
              int32P1[ randomUint8() % int32NumP1 ]
220
            + int32P1[ randomUint8() % int32NumP1 ]
221
            + int32P1[ randomUint8() % int32NumP1 ]
222
        );
223
 
224
}
225
 
226
enum {
227
    int32NumPInfWeightMasks = 29
228
};
229
 
230
static const uint32 int32PInfWeightMasks[ int32NumPInfWeightMasks ] = {
231
    0xFFFFFFFF,
232
    0x7FFFFFFF,
233
    0x3FFFFFFF,
234
    0x1FFFFFFF,
235
    0x0FFFFFFF,
236
    0x07FFFFFF,
237
    0x03FFFFFF,
238
    0x01FFFFFF,
239
    0x00FFFFFF,
240
    0x007FFFFF,
241
    0x003FFFFF,
242
    0x001FFFFF,
243
    0x000FFFFF,
244
    0x0007FFFF,
245
    0x0003FFFF,
246
    0x0001FFFF,
247
    0x0000FFFF,
248
    0x00007FFF,
249
    0x00003FFF,
250
    0x00001FFF,
251
    0x00000FFF,
252
    0x000007FF,
253
    0x000003FF,
254
    0x000001FF,
255
    0x000000FF,
256
    0x0000007F,
257
    0x0000003F,
258
    0x0000001F,
259
    0x0000000F
260
};
261
 
262
static const uint32 int32PInfWeightOffsets[ int32NumPInfWeightMasks ] = {
263
    0x00000000,
264
    0xC0000000,
265
    0xE0000000,
266
    0xF0000000,
267
    0xF8000000,
268
    0xFC000000,
269
    0xFE000000,
270
    0xFF000000,
271
    0xFF800000,
272
    0xFFC00000,
273
    0xFFE00000,
274
    0xFFF00000,
275
    0xFFF80000,
276
    0xFFFC0000,
277
    0xFFFE0000,
278
    0xFFFF0000,
279
    0xFFFF8000,
280
    0xFFFFC000,
281
    0xFFFFE000,
282
    0xFFFFF000,
283
    0xFFFFF800,
284
    0xFFFFFC00,
285
    0xFFFFFE00,
286
    0xFFFFFF00,
287
    0xFFFFFF80,
288
    0xFFFFFFC0,
289
    0xFFFFFFE0,
290
    0xFFFFFFF0,
291
    0xFFFFFFF8
292
};
293
 
294
static int32 int32RandomPInf( void )
295
{
296
    int8 weightMaskNum;
297
 
298
    weightMaskNum = randomUint8() % int32NumPInfWeightMasks;
299
    return
300
        (sbits32) (
301
              ( randomUint32() & int32PInfWeightMasks[ weightMaskNum ] )
302
            + int32PInfWeightOffsets[ weightMaskNum ]
303
        );
304
 
305
}
306
 
307
#ifdef BITS64
308
 
309
enum {
310
    int64NumP1 = 252
311
};
312
 
313
static const uint64 int64P1[ int64NumP1 ] = {
314
    LIT64( 0x0000000000000000 ),
315
    LIT64( 0x0000000000000001 ),
316
    LIT64( 0x0000000000000002 ),
317
    LIT64( 0x0000000000000004 ),
318
    LIT64( 0x0000000000000008 ),
319
    LIT64( 0x0000000000000010 ),
320
    LIT64( 0x0000000000000020 ),
321
    LIT64( 0x0000000000000040 ),
322
    LIT64( 0x0000000000000080 ),
323
    LIT64( 0x0000000000000100 ),
324
    LIT64( 0x0000000000000200 ),
325
    LIT64( 0x0000000000000400 ),
326
    LIT64( 0x0000000000000800 ),
327
    LIT64( 0x0000000000001000 ),
328
    LIT64( 0x0000000000002000 ),
329
    LIT64( 0x0000000000004000 ),
330
    LIT64( 0x0000000000008000 ),
331
    LIT64( 0x0000000000010000 ),
332
    LIT64( 0x0000000000020000 ),
333
    LIT64( 0x0000000000040000 ),
334
    LIT64( 0x0000000000080000 ),
335
    LIT64( 0x0000000000100000 ),
336
    LIT64( 0x0000000000200000 ),
337
    LIT64( 0x0000000000400000 ),
338
    LIT64( 0x0000000000800000 ),
339
    LIT64( 0x0000000001000000 ),
340
    LIT64( 0x0000000002000000 ),
341
    LIT64( 0x0000000004000000 ),
342
    LIT64( 0x0000000008000000 ),
343
    LIT64( 0x0000000010000000 ),
344
    LIT64( 0x0000000020000000 ),
345
    LIT64( 0x0000000040000000 ),
346
    LIT64( 0x0000000080000000 ),
347
    LIT64( 0x0000000100000000 ),
348
    LIT64( 0x0000000200000000 ),
349
    LIT64( 0x0000000400000000 ),
350
    LIT64( 0x0000000800000000 ),
351
    LIT64( 0x0000001000000000 ),
352
    LIT64( 0x0000002000000000 ),
353
    LIT64( 0x0000004000000000 ),
354
    LIT64( 0x0000008000000000 ),
355
    LIT64( 0x0000010000000000 ),
356
    LIT64( 0x0000020000000000 ),
357
    LIT64( 0x0000040000000000 ),
358
    LIT64( 0x0000080000000000 ),
359
    LIT64( 0x0000100000000000 ),
360
    LIT64( 0x0000200000000000 ),
361
    LIT64( 0x0000400000000000 ),
362
    LIT64( 0x0000800000000000 ),
363
    LIT64( 0x0001000000000000 ),
364
    LIT64( 0x0002000000000000 ),
365
    LIT64( 0x0004000000000000 ),
366
    LIT64( 0x0008000000000000 ),
367
    LIT64( 0x0010000000000000 ),
368
    LIT64( 0x0020000000000000 ),
369
    LIT64( 0x0040000000000000 ),
370
    LIT64( 0x0080000000000000 ),
371
    LIT64( 0x0100000000000000 ),
372
    LIT64( 0x0200000000000000 ),
373
    LIT64( 0x0400000000000000 ),
374
    LIT64( 0x0800000000000000 ),
375
    LIT64( 0x1000000000000000 ),
376
    LIT64( 0x2000000000000000 ),
377
    LIT64( 0x4000000000000000 ),
378
    LIT64( 0x8000000000000000 ),
379
    LIT64( 0xC000000000000000 ),
380
    LIT64( 0xE000000000000000 ),
381
    LIT64( 0xF000000000000000 ),
382
    LIT64( 0xF800000000000000 ),
383
    LIT64( 0xFC00000000000000 ),
384
    LIT64( 0xFE00000000000000 ),
385
    LIT64( 0xFF00000000000000 ),
386
    LIT64( 0xFF80000000000000 ),
387
    LIT64( 0xFFC0000000000000 ),
388
    LIT64( 0xFFE0000000000000 ),
389
    LIT64( 0xFFF0000000000000 ),
390
    LIT64( 0xFFF8000000000000 ),
391
    LIT64( 0xFFFC000000000000 ),
392
    LIT64( 0xFFFE000000000000 ),
393
    LIT64( 0xFFFF000000000000 ),
394
    LIT64( 0xFFFF800000000000 ),
395
    LIT64( 0xFFFFC00000000000 ),
396
    LIT64( 0xFFFFE00000000000 ),
397
    LIT64( 0xFFFFF00000000000 ),
398
    LIT64( 0xFFFFF80000000000 ),
399
    LIT64( 0xFFFFFC0000000000 ),
400
    LIT64( 0xFFFFFE0000000000 ),
401
    LIT64( 0xFFFFFF0000000000 ),
402
    LIT64( 0xFFFFFF8000000000 ),
403
    LIT64( 0xFFFFFFC000000000 ),
404
    LIT64( 0xFFFFFFE000000000 ),
405
    LIT64( 0xFFFFFFF000000000 ),
406
    LIT64( 0xFFFFFFF800000000 ),
407
    LIT64( 0xFFFFFFFC00000000 ),
408
    LIT64( 0xFFFFFFFE00000000 ),
409
    LIT64( 0xFFFFFFFF00000000 ),
410
    LIT64( 0xFFFFFFFF80000000 ),
411
    LIT64( 0xFFFFFFFFC0000000 ),
412
    LIT64( 0xFFFFFFFFE0000000 ),
413
    LIT64( 0xFFFFFFFFF0000000 ),
414
    LIT64( 0xFFFFFFFFF8000000 ),
415
    LIT64( 0xFFFFFFFFFC000000 ),
416
    LIT64( 0xFFFFFFFFFE000000 ),
417
    LIT64( 0xFFFFFFFFFF000000 ),
418
    LIT64( 0xFFFFFFFFFF800000 ),
419
    LIT64( 0xFFFFFFFFFFC00000 ),
420
    LIT64( 0xFFFFFFFFFFE00000 ),
421
    LIT64( 0xFFFFFFFFFFF00000 ),
422
    LIT64( 0xFFFFFFFFFFF80000 ),
423
    LIT64( 0xFFFFFFFFFFFC0000 ),
424
    LIT64( 0xFFFFFFFFFFFE0000 ),
425
    LIT64( 0xFFFFFFFFFFFF0000 ),
426
    LIT64( 0xFFFFFFFFFFFF8000 ),
427
    LIT64( 0xFFFFFFFFFFFFC000 ),
428
    LIT64( 0xFFFFFFFFFFFFE000 ),
429
    LIT64( 0xFFFFFFFFFFFFF000 ),
430
    LIT64( 0xFFFFFFFFFFFFF800 ),
431
    LIT64( 0xFFFFFFFFFFFFFC00 ),
432
    LIT64( 0xFFFFFFFFFFFFFE00 ),
433
    LIT64( 0xFFFFFFFFFFFFFF00 ),
434
    LIT64( 0xFFFFFFFFFFFFFF80 ),
435
    LIT64( 0xFFFFFFFFFFFFFFC0 ),
436
    LIT64( 0xFFFFFFFFFFFFFFE0 ),
437
    LIT64( 0xFFFFFFFFFFFFFFF0 ),
438
    LIT64( 0xFFFFFFFFFFFFFFF8 ),
439
    LIT64( 0xFFFFFFFFFFFFFFFC ),
440
    LIT64( 0xFFFFFFFFFFFFFFFE ),
441
    LIT64( 0xFFFFFFFFFFFFFFFF ),
442
    LIT64( 0xFFFFFFFFFFFFFFFD ),
443
    LIT64( 0xFFFFFFFFFFFFFFFB ),
444
    LIT64( 0xFFFFFFFFFFFFFFF7 ),
445
    LIT64( 0xFFFFFFFFFFFFFFEF ),
446
    LIT64( 0xFFFFFFFFFFFFFFDF ),
447
    LIT64( 0xFFFFFFFFFFFFFFBF ),
448
    LIT64( 0xFFFFFFFFFFFFFF7F ),
449
    LIT64( 0xFFFFFFFFFFFFFEFF ),
450
    LIT64( 0xFFFFFFFFFFFFFDFF ),
451
    LIT64( 0xFFFFFFFFFFFFFBFF ),
452
    LIT64( 0xFFFFFFFFFFFFF7FF ),
453
    LIT64( 0xFFFFFFFFFFFFEFFF ),
454
    LIT64( 0xFFFFFFFFFFFFDFFF ),
455
    LIT64( 0xFFFFFFFFFFFFBFFF ),
456
    LIT64( 0xFFFFFFFFFFFF7FFF ),
457
    LIT64( 0xFFFFFFFFFFFEFFFF ),
458
    LIT64( 0xFFFFFFFFFFFDFFFF ),
459
    LIT64( 0xFFFFFFFFFFFBFFFF ),
460
    LIT64( 0xFFFFFFFFFFF7FFFF ),
461
    LIT64( 0xFFFFFFFFFFEFFFFF ),
462
    LIT64( 0xFFFFFFFFFFDFFFFF ),
463
    LIT64( 0xFFFFFFFFFFBFFFFF ),
464
    LIT64( 0xFFFFFFFFFF7FFFFF ),
465
    LIT64( 0xFFFFFFFFFEFFFFFF ),
466
    LIT64( 0xFFFFFFFFFDFFFFFF ),
467
    LIT64( 0xFFFFFFFFFBFFFFFF ),
468
    LIT64( 0xFFFFFFFFF7FFFFFF ),
469
    LIT64( 0xFFFFFFFFEFFFFFFF ),
470
    LIT64( 0xFFFFFFFFDFFFFFFF ),
471
    LIT64( 0xFFFFFFFFBFFFFFFF ),
472
    LIT64( 0xFFFFFFFF7FFFFFFF ),
473
    LIT64( 0xFFFFFFFEFFFFFFFF ),
474
    LIT64( 0xFFFFFFFDFFFFFFFF ),
475
    LIT64( 0xFFFFFFFBFFFFFFFF ),
476
    LIT64( 0xFFFFFFF7FFFFFFFF ),
477
    LIT64( 0xFFFFFFEFFFFFFFFF ),
478
    LIT64( 0xFFFFFFDFFFFFFFFF ),
479
    LIT64( 0xFFFFFFBFFFFFFFFF ),
480
    LIT64( 0xFFFFFF7FFFFFFFFF ),
481
    LIT64( 0xFFFFFEFFFFFFFFFF ),
482
    LIT64( 0xFFFFFDFFFFFFFFFF ),
483
    LIT64( 0xFFFFFBFFFFFFFFFF ),
484
    LIT64( 0xFFFFF7FFFFFFFFFF ),
485
    LIT64( 0xFFFFEFFFFFFFFFFF ),
486
    LIT64( 0xFFFFDFFFFFFFFFFF ),
487
    LIT64( 0xFFFFBFFFFFFFFFFF ),
488
    LIT64( 0xFFFF7FFFFFFFFFFF ),
489
    LIT64( 0xFFFEFFFFFFFFFFFF ),
490
    LIT64( 0xFFFDFFFFFFFFFFFF ),
491
    LIT64( 0xFFFBFFFFFFFFFFFF ),
492
    LIT64( 0xFFF7FFFFFFFFFFFF ),
493
    LIT64( 0xFFEFFFFFFFFFFFFF ),
494
    LIT64( 0xFFDFFFFFFFFFFFFF ),
495
    LIT64( 0xFFBFFFFFFFFFFFFF ),
496
    LIT64( 0xFF7FFFFFFFFFFFFF ),
497
    LIT64( 0xFEFFFFFFFFFFFFFF ),
498
    LIT64( 0xFDFFFFFFFFFFFFFF ),
499
    LIT64( 0xFBFFFFFFFFFFFFFF ),
500
    LIT64( 0xF7FFFFFFFFFFFFFF ),
501
    LIT64( 0xEFFFFFFFFFFFFFFF ),
502
    LIT64( 0xDFFFFFFFFFFFFFFF ),
503
    LIT64( 0xBFFFFFFFFFFFFFFF ),
504
    LIT64( 0x7FFFFFFFFFFFFFFF ),
505
    LIT64( 0x3FFFFFFFFFFFFFFF ),
506
    LIT64( 0x1FFFFFFFFFFFFFFF ),
507
    LIT64( 0x0FFFFFFFFFFFFFFF ),
508
    LIT64( 0x07FFFFFFFFFFFFFF ),
509
    LIT64( 0x03FFFFFFFFFFFFFF ),
510
    LIT64( 0x01FFFFFFFFFFFFFF ),
511
    LIT64( 0x00FFFFFFFFFFFFFF ),
512
    LIT64( 0x007FFFFFFFFFFFFF ),
513
    LIT64( 0x003FFFFFFFFFFFFF ),
514
    LIT64( 0x001FFFFFFFFFFFFF ),
515
    LIT64( 0x000FFFFFFFFFFFFF ),
516
    LIT64( 0x0007FFFFFFFFFFFF ),
517
    LIT64( 0x0003FFFFFFFFFFFF ),
518
    LIT64( 0x0001FFFFFFFFFFFF ),
519
    LIT64( 0x0000FFFFFFFFFFFF ),
520
    LIT64( 0x00007FFFFFFFFFFF ),
521
    LIT64( 0x00003FFFFFFFFFFF ),
522
    LIT64( 0x00001FFFFFFFFFFF ),
523
    LIT64( 0x00000FFFFFFFFFFF ),
524
    LIT64( 0x000007FFFFFFFFFF ),
525
    LIT64( 0x000003FFFFFFFFFF ),
526
    LIT64( 0x000001FFFFFFFFFF ),
527
    LIT64( 0x000000FFFFFFFFFF ),
528
    LIT64( 0x0000007FFFFFFFFF ),
529
    LIT64( 0x0000003FFFFFFFFF ),
530
    LIT64( 0x0000001FFFFFFFFF ),
531
    LIT64( 0x0000000FFFFFFFFF ),
532
    LIT64( 0x00000007FFFFFFFF ),
533
    LIT64( 0x00000003FFFFFFFF ),
534
    LIT64( 0x00000001FFFFFFFF ),
535
    LIT64( 0x00000000FFFFFFFF ),
536
    LIT64( 0x000000007FFFFFFF ),
537
    LIT64( 0x000000003FFFFFFF ),
538
    LIT64( 0x000000001FFFFFFF ),
539
    LIT64( 0x000000000FFFFFFF ),
540
    LIT64( 0x0000000007FFFFFF ),
541
    LIT64( 0x0000000003FFFFFF ),
542
    LIT64( 0x0000000001FFFFFF ),
543
    LIT64( 0x0000000000FFFFFF ),
544
    LIT64( 0x00000000007FFFFF ),
545
    LIT64( 0x00000000003FFFFF ),
546
    LIT64( 0x00000000001FFFFF ),
547
    LIT64( 0x00000000000FFFFF ),
548
    LIT64( 0x000000000007FFFF ),
549
    LIT64( 0x000000000003FFFF ),
550
    LIT64( 0x000000000001FFFF ),
551
    LIT64( 0x000000000000FFFF ),
552
    LIT64( 0x0000000000007FFF ),
553
    LIT64( 0x0000000000003FFF ),
554
    LIT64( 0x0000000000001FFF ),
555
    LIT64( 0x0000000000000FFF ),
556
    LIT64( 0x00000000000007FF ),
557
    LIT64( 0x00000000000003FF ),
558
    LIT64( 0x00000000000001FF ),
559
    LIT64( 0x00000000000000FF ),
560
    LIT64( 0x000000000000007F ),
561
    LIT64( 0x000000000000003F ),
562
    LIT64( 0x000000000000001F ),
563
    LIT64( 0x000000000000000F ),
564
    LIT64( 0x0000000000000007 ),
565
    LIT64( 0x0000000000000003 )
566
};
567
 
568
static int64 int64NextP1( sequenceT *sequencePtr )
569
{
570
    uint8 termNum;
571
    int64 z;
572
 
573
    termNum = sequencePtr->term1Num;
574
    z = int64P1[ termNum ];
575
    ++termNum;
576
    if ( int64NumP1 <= termNum ) {
577
        termNum = 0;
578
        sequencePtr->done = TRUE;
579
    }
580
    sequencePtr->term1Num = termNum;
581
    return (sbits64) z;
582
 
583
}
584
 
585
static const int64 int64NumP2 = ( int64NumP1 * int64NumP1 + int64NumP1 ) / 2;
586
 
587
static int64 int64NextP2( sequenceT *sequencePtr )
588
{
589
    uint8 term1Num, term2Num;
590
    int64 z;
591
 
592
    term2Num = sequencePtr->term2Num;
593
    term1Num = sequencePtr->term1Num;
594
    z = int64P1[ term1Num ] + int64P1[ term2Num ];
595
    ++term2Num;
596
    if ( int64NumP1 <= term2Num ) {
597
        ++term1Num;
598
        if ( int64NumP1 <= term1Num ) {
599
            term1Num = 0;
600
            sequencePtr->done = TRUE;
601
        }
602
        term2Num = term1Num;
603
        sequencePtr->term1Num = term1Num;
604
    }
605
    sequencePtr->term2Num = term2Num;
606
    return (sbits64) z;
607
 
608
}
609
 
610
static int64 int64RandomP3( void )
611
{
612
 
613
    return
614
        (sbits64) (
615
              int64P1[ randomUint8() % int64NumP1 ]
616
            + int64P1[ randomUint8() % int64NumP1 ]
617
            + int64P1[ randomUint8() % int64NumP1 ]
618
        );
619
 
620
}
621
 
622
enum {
623
    int64NumPInfWeightMasks = 61
624
};
625
 
626
static const uint64 int64PInfWeightMasks[ int64NumPInfWeightMasks ] = {
627
    LIT64( 0xFFFFFFFFFFFFFFFF ),
628
    LIT64( 0x7FFFFFFFFFFFFFFF ),
629
    LIT64( 0x3FFFFFFFFFFFFFFF ),
630
    LIT64( 0x1FFFFFFFFFFFFFFF ),
631
    LIT64( 0x0FFFFFFFFFFFFFFF ),
632
    LIT64( 0x07FFFFFFFFFFFFFF ),
633
    LIT64( 0x03FFFFFFFFFFFFFF ),
634
    LIT64( 0x01FFFFFFFFFFFFFF ),
635
    LIT64( 0x00FFFFFFFFFFFFFF ),
636
    LIT64( 0x007FFFFFFFFFFFFF ),
637
    LIT64( 0x003FFFFFFFFFFFFF ),
638
    LIT64( 0x001FFFFFFFFFFFFF ),
639
    LIT64( 0x000FFFFFFFFFFFFF ),
640
    LIT64( 0x0007FFFFFFFFFFFF ),
641
    LIT64( 0x0003FFFFFFFFFFFF ),
642
    LIT64( 0x0001FFFFFFFFFFFF ),
643
    LIT64( 0x0000FFFFFFFFFFFF ),
644
    LIT64( 0x00007FFFFFFFFFFF ),
645
    LIT64( 0x00003FFFFFFFFFFF ),
646
    LIT64( 0x00001FFFFFFFFFFF ),
647
    LIT64( 0x00000FFFFFFFFFFF ),
648
    LIT64( 0x000007FFFFFFFFFF ),
649
    LIT64( 0x000003FFFFFFFFFF ),
650
    LIT64( 0x000001FFFFFFFFFF ),
651
    LIT64( 0x000000FFFFFFFFFF ),
652
    LIT64( 0x0000007FFFFFFFFF ),
653
    LIT64( 0x0000003FFFFFFFFF ),
654
    LIT64( 0x0000001FFFFFFFFF ),
655
    LIT64( 0x0000000FFFFFFFFF ),
656
    LIT64( 0x00000007FFFFFFFF ),
657
    LIT64( 0x00000003FFFFFFFF ),
658
    LIT64( 0x00000001FFFFFFFF ),
659
    LIT64( 0x00000000FFFFFFFF ),
660
    LIT64( 0x000000007FFFFFFF ),
661
    LIT64( 0x000000003FFFFFFF ),
662
    LIT64( 0x000000001FFFFFFF ),
663
    LIT64( 0x000000000FFFFFFF ),
664
    LIT64( 0x0000000007FFFFFF ),
665
    LIT64( 0x0000000003FFFFFF ),
666
    LIT64( 0x0000000001FFFFFF ),
667
    LIT64( 0x0000000000FFFFFF ),
668
    LIT64( 0x00000000007FFFFF ),
669
    LIT64( 0x00000000003FFFFF ),
670
    LIT64( 0x00000000001FFFFF ),
671
    LIT64( 0x00000000000FFFFF ),
672
    LIT64( 0x000000000007FFFF ),
673
    LIT64( 0x000000000003FFFF ),
674
    LIT64( 0x000000000001FFFF ),
675
    LIT64( 0x000000000000FFFF ),
676
    LIT64( 0x0000000000007FFF ),
677
    LIT64( 0x0000000000003FFF ),
678
    LIT64( 0x0000000000001FFF ),
679
    LIT64( 0x0000000000000FFF ),
680
    LIT64( 0x00000000000007FF ),
681
    LIT64( 0x00000000000003FF ),
682
    LIT64( 0x00000000000001FF ),
683
    LIT64( 0x00000000000000FF ),
684
    LIT64( 0x000000000000007F ),
685
    LIT64( 0x000000000000003F ),
686
    LIT64( 0x000000000000001F ),
687
    LIT64( 0x000000000000000F )
688
};
689
 
690
static const uint64 int64PInfWeightOffsets[ int64NumPInfWeightMasks ] = {
691
    LIT64( 0x0000000000000000 ),
692
    LIT64( 0xC000000000000000 ),
693
    LIT64( 0xE000000000000000 ),
694
    LIT64( 0xF000000000000000 ),
695
    LIT64( 0xF800000000000000 ),
696
    LIT64( 0xFC00000000000000 ),
697
    LIT64( 0xFE00000000000000 ),
698
    LIT64( 0xFF00000000000000 ),
699
    LIT64( 0xFF80000000000000 ),
700
    LIT64( 0xFFC0000000000000 ),
701
    LIT64( 0xFFE0000000000000 ),
702
    LIT64( 0xFFF0000000000000 ),
703
    LIT64( 0xFFF8000000000000 ),
704
    LIT64( 0xFFFC000000000000 ),
705
    LIT64( 0xFFFE000000000000 ),
706
    LIT64( 0xFFFF000000000000 ),
707
    LIT64( 0xFFFF800000000000 ),
708
    LIT64( 0xFFFFC00000000000 ),
709
    LIT64( 0xFFFFE00000000000 ),
710
    LIT64( 0xFFFFF00000000000 ),
711
    LIT64( 0xFFFFF80000000000 ),
712
    LIT64( 0xFFFFFC0000000000 ),
713
    LIT64( 0xFFFFFE0000000000 ),
714
    LIT64( 0xFFFFFF0000000000 ),
715
    LIT64( 0xFFFFFF8000000000 ),
716
    LIT64( 0xFFFFFFC000000000 ),
717
    LIT64( 0xFFFFFFE000000000 ),
718
    LIT64( 0xFFFFFFF000000000 ),
719
    LIT64( 0xFFFFFFF800000000 ),
720
    LIT64( 0xFFFFFFFC00000000 ),
721
    LIT64( 0xFFFFFFFE00000000 ),
722
    LIT64( 0xFFFFFFFF00000000 ),
723
    LIT64( 0xFFFFFFFF80000000 ),
724
    LIT64( 0xFFFFFFFFC0000000 ),
725
    LIT64( 0xFFFFFFFFE0000000 ),
726
    LIT64( 0xFFFFFFFFF0000000 ),
727
    LIT64( 0xFFFFFFFFF8000000 ),
728
    LIT64( 0xFFFFFFFFFC000000 ),
729
    LIT64( 0xFFFFFFFFFE000000 ),
730
    LIT64( 0xFFFFFFFFFF000000 ),
731
    LIT64( 0xFFFFFFFFFF800000 ),
732
    LIT64( 0xFFFFFFFFFFC00000 ),
733
    LIT64( 0xFFFFFFFFFFE00000 ),
734
    LIT64( 0xFFFFFFFFFFF00000 ),
735
    LIT64( 0xFFFFFFFFFFF80000 ),
736
    LIT64( 0xFFFFFFFFFFFC0000 ),
737
    LIT64( 0xFFFFFFFFFFFE0000 ),
738
    LIT64( 0xFFFFFFFFFFFF0000 ),
739
    LIT64( 0xFFFFFFFFFFFF8000 ),
740
    LIT64( 0xFFFFFFFFFFFFC000 ),
741
    LIT64( 0xFFFFFFFFFFFFE000 ),
742
    LIT64( 0xFFFFFFFFFFFFF000 ),
743
    LIT64( 0xFFFFFFFFFFFFF800 ),
744
    LIT64( 0xFFFFFFFFFFFFFC00 ),
745
    LIT64( 0xFFFFFFFFFFFFFE00 ),
746
    LIT64( 0xFFFFFFFFFFFFFF00 ),
747
    LIT64( 0xFFFFFFFFFFFFFF80 ),
748
    LIT64( 0xFFFFFFFFFFFFFFC0 ),
749
    LIT64( 0xFFFFFFFFFFFFFFE0 ),
750
    LIT64( 0xFFFFFFFFFFFFFFF0 ),
751
    LIT64( 0xFFFFFFFFFFFFFFF8 )
752
};
753
 
754
static int64 int64RandomPInf( void )
755
{
756
    int8 weightMaskNum;
757
 
758
    weightMaskNum = randomUint8() % int64NumPInfWeightMasks;
759
    return
760
        (sbits64) (
761
              ( randomUint64() & int64PInfWeightMasks[ weightMaskNum ] )
762
            + int64PInfWeightOffsets[ weightMaskNum ]
763
        );
764
 
765
}
766
 
767
#endif
768
 
769
enum {
770
    float32NumQIn  = 22,
771
    float32NumQOut = 50,
772
    float32NumP1   =  4,
773
    float32NumP2   = 88
774
};
775
 
776
static const uint32 float32QIn[ float32NumQIn ] = {
777
    0x00000000,         /* positive, subnormal          */
778
    0x00800000,         /* positive, -126               */
779
    0x33800000,         /* positive,  -24               */
780
    0x3E800000,         /* positive,   -2               */
781
    0x3F000000,         /* positive,   -1               */
782
    0x3F800000,         /* positive,    0               */
783
    0x40000000,         /* positive,    1               */
784
    0x40800000,         /* positive,    2               */
785
    0x4B800000,         /* positive,   24               */
786
    0x7F000000,         /* positive,  127               */
787
    0x7F800000,         /* positive, infinity or NaN    */
788
    0x80000000,         /* negative, subnormal          */
789
    0x80800000,         /* negative, -126               */
790
    0xB3800000,         /* negative,  -24               */
791
    0xBE800000,         /* negative,   -2               */
792
    0xBF000000,         /* negative,   -1               */
793
    0xBF800000,         /* negative,    0               */
794
    0xC0000000,         /* negative,    1               */
795
    0xC0800000,         /* negative,    2               */
796
    0xCB800000,         /* negative,   24               */
797
    0xFE800000,         /* negative,  126               */
798
    0xFF800000          /* negative, infinity or NaN    */
799
};
800
 
801
static const uint32 float32QOut[ float32NumQOut ] = {
802
    0x00000000,         /* positive, subnormal          */
803
    0x00800000,         /* positive, -126               */
804
    0x01000000,         /* positive, -125               */
805
    0x33800000,         /* positive,  -24               */
806
    0x3D800000,         /* positive,   -4               */
807
    0x3E000000,         /* positive,   -3               */
808
    0x3E800000,         /* positive,   -2               */
809
    0x3F000000,         /* positive,   -1               */
810
    0x3F800000,         /* positive,    0               */
811
    0x40000000,         /* positive,    1               */
812
    0x40800000,         /* positive,    2               */
813
    0x41000000,         /* positive,    3               */
814
    0x41800000,         /* positive,    4               */
815
    0x4B800000,         /* positive,   24               */
816
    0x4E000000,         /* positive,   29               */
817
    0x4E800000,         /* positive,   30               */
818
    0x4F000000,         /* positive,   31               */
819
    0x4F800000,         /* positive,   32               */
820
    0x5E000000,         /* positive,   61               */
821
    0x5E800000,         /* positive,   62               */
822
    0x5F000000,         /* positive,   63               */
823
    0x5F800000,         /* positive,   64               */
824
    0x7E800000,         /* positive,  126               */
825
    0x7F000000,         /* positive,  127               */
826
    0x7F800000,         /* positive, infinity or NaN    */
827
    0x80000000,         /* negative, subnormal          */
828
    0x80800000,         /* negative, -126               */
829
    0x81000000,         /* negative, -125               */
830
    0xB3800000,         /* negative,  -24               */
831
    0xBD800000,         /* negative,   -4               */
832
    0xBE000000,         /* negative,   -3               */
833
    0xBE800000,         /* negative,   -2               */
834
    0xBF000000,         /* negative,   -1               */
835
    0xBF800000,         /* negative,    0               */
836
    0xC0000000,         /* negative,    1               */
837
    0xC0800000,         /* negative,    2               */
838
    0xC1000000,         /* negative,    3               */
839
    0xC1800000,         /* negative,    4               */
840
    0xCB800000,         /* negative,   24               */
841
    0xCE000000,         /* negative,   29               */
842
    0xCE800000,         /* negative,   30               */
843
    0xCF000000,         /* negative,   31               */
844
    0xCF800000,         /* negative,   32               */
845
    0xDE000000,         /* negative,   61               */
846
    0xDE800000,         /* negative,   62               */
847
    0xDF000000,         /* negative,   63               */
848
    0xDF800000,         /* negative,   64               */
849
    0xFE800000,         /* negative,  126               */
850
    0xFF000000,         /* negative,  127               */
851
    0xFF800000          /* negative, infinity or NaN    */
852
};
853
 
854
static const uint32 float32P1[ float32NumP1 ] = {
855
    0x00000000,
856
    0x00000001,
857
    0x007FFFFF,
858
    0x007FFFFE
859
};
860
 
861
static const uint32 float32P2[ float32NumP2 ] = {
862
    0x00000000,
863
    0x00000001,
864
    0x00000002,
865
    0x00000004,
866
    0x00000008,
867
    0x00000010,
868
    0x00000020,
869
    0x00000040,
870
    0x00000080,
871
    0x00000100,
872
    0x00000200,
873
    0x00000400,
874
    0x00000800,
875
    0x00001000,
876
    0x00002000,
877
    0x00004000,
878
    0x00008000,
879
    0x00010000,
880
    0x00020000,
881
    0x00040000,
882
    0x00080000,
883
    0x00100000,
884
    0x00200000,
885
    0x00400000,
886
    0x00600000,
887
    0x00700000,
888
    0x00780000,
889
    0x007C0000,
890
    0x007E0000,
891
    0x007F0000,
892
    0x007F8000,
893
    0x007FC000,
894
    0x007FE000,
895
    0x007FF000,
896
    0x007FF800,
897
    0x007FFC00,
898
    0x007FFE00,
899
    0x007FFF00,
900
    0x007FFF80,
901
    0x007FFFC0,
902
    0x007FFFE0,
903
    0x007FFFF0,
904
    0x007FFFF8,
905
    0x007FFFFC,
906
    0x007FFFFE,
907
    0x007FFFFF,
908
    0x007FFFFD,
909
    0x007FFFFB,
910
    0x007FFFF7,
911
    0x007FFFEF,
912
    0x007FFFDF,
913
    0x007FFFBF,
914
    0x007FFF7F,
915
    0x007FFEFF,
916
    0x007FFDFF,
917
    0x007FFBFF,
918
    0x007FF7FF,
919
    0x007FEFFF,
920
    0x007FDFFF,
921
    0x007FBFFF,
922
    0x007F7FFF,
923
    0x007EFFFF,
924
    0x007DFFFF,
925
    0x007BFFFF,
926
    0x0077FFFF,
927
    0x006FFFFF,
928
    0x005FFFFF,
929
    0x003FFFFF,
930
    0x001FFFFF,
931
    0x000FFFFF,
932
    0x0007FFFF,
933
    0x0003FFFF,
934
    0x0001FFFF,
935
    0x0000FFFF,
936
    0x00007FFF,
937
    0x00003FFF,
938
    0x00001FFF,
939
    0x00000FFF,
940
    0x000007FF,
941
    0x000003FF,
942
    0x000001FF,
943
    0x000000FF,
944
    0x0000007F,
945
    0x0000003F,
946
    0x0000001F,
947
    0x0000000F,
948
    0x00000007,
949
    0x00000003
950
};
951
 
952
static const uint32 float32NumQInP1 = float32NumQIn * float32NumP1;
953
static const uint32 float32NumQOutP1 = float32NumQOut * float32NumP1;
954
 
955
static float32 float32NextQInP1( sequenceT *sequencePtr )
956
{
957
    uint8 expNum, sigNum;
958
    float32 z;
959
 
960
    sigNum = sequencePtr->term1Num;
961
    expNum = sequencePtr->expNum;
962
    z = float32QIn[ expNum ] | float32P1[ sigNum ];
963
    ++sigNum;
964
    if ( float32NumP1 <= sigNum ) {
965
        sigNum = 0;
966
        ++expNum;
967
        if ( float32NumQIn <= expNum ) {
968
            expNum = 0;
969
            sequencePtr->done = TRUE;
970
        }
971
        sequencePtr->expNum = expNum;
972
    }
973
    sequencePtr->term1Num = sigNum;
974
    return z;
975
 
976
}
977
 
978
static float32 float32NextQOutP1( sequenceT *sequencePtr )
979
{
980
    uint8 expNum, sigNum;
981
    float32 z;
982
 
983
    sigNum = sequencePtr->term1Num;
984
    expNum = sequencePtr->expNum;
985
    z = float32QOut[ expNum ] | float32P1[ sigNum ];
986
    ++sigNum;
987
    if ( float32NumP1 <= sigNum ) {
988
        sigNum = 0;
989
        ++expNum;
990
        if ( float32NumQOut <= expNum ) {
991
            expNum = 0;
992
            sequencePtr->done = TRUE;
993
        }
994
        sequencePtr->expNum = expNum;
995
    }
996
    sequencePtr->term1Num = sigNum;
997
    return z;
998
 
999
}
1000
 
1001
static const uint32 float32NumQInP2 = float32NumQIn * float32NumP2;
1002
static const uint32 float32NumQOutP2 = float32NumQOut * float32NumP2;
1003
 
1004
static float32 float32NextQInP2( sequenceT *sequencePtr )
1005
{
1006
    uint8 expNum, sigNum;
1007
    float32 z;
1008
 
1009
    sigNum = sequencePtr->term1Num;
1010
    expNum = sequencePtr->expNum;
1011
    z = float32QIn[ expNum ] | float32P2[ sigNum ];
1012
    ++sigNum;
1013
    if ( float32NumP2 <= sigNum ) {
1014
        sigNum = 0;
1015
        ++expNum;
1016
        if ( float32NumQIn <= expNum ) {
1017
            expNum = 0;
1018
            sequencePtr->done = TRUE;
1019
        }
1020
        sequencePtr->expNum = expNum;
1021
    }
1022
    sequencePtr->term1Num = sigNum;
1023
    return z;
1024
 
1025
}
1026
 
1027
static float32 float32NextQOutP2( sequenceT *sequencePtr )
1028
{
1029
    uint8 expNum, sigNum;
1030
    float32 z;
1031
 
1032
    sigNum = sequencePtr->term1Num;
1033
    expNum = sequencePtr->expNum;
1034
    z = float32QOut[ expNum ] | float32P2[ sigNum ];
1035
    ++sigNum;
1036
    if ( float32NumP2 <= sigNum ) {
1037
        sigNum = 0;
1038
        ++expNum;
1039
        if ( float32NumQOut <= expNum ) {
1040
            expNum = 0;
1041
            sequencePtr->done = TRUE;
1042
        }
1043
        sequencePtr->expNum = expNum;
1044
    }
1045
    sequencePtr->term1Num = sigNum;
1046
    return z;
1047
 
1048
}
1049
 
1050
static float32 float32RandomQOutP3( void )
1051
{
1052
 
1053
    return
1054
          float32QOut[ randomUint8() % float32NumQOut ]
1055
        | (   (   float32P2[ randomUint8() % float32NumP2 ]
1056
                + float32P2[ randomUint8() % float32NumP2 ] )
1057
            & 0x007FFFFF );
1058
 
1059
}
1060
 
1061
static float32 float32RandomQOutPInf( void )
1062
{
1063
 
1064
    return
1065
          float32QOut[ randomUint8() % float32NumQOut ]
1066
        | ( randomUint32() & 0x007FFFFF );
1067
 
1068
}
1069
 
1070
enum {
1071
    float32NumQInfWeightMasks = 7
1072
};
1073
 
1074
static const uint32 float32QInfWeightMasks[ float32NumQInfWeightMasks ] = {
1075
    0x7F800000,
1076
    0x7F800000,
1077
    0x3F800000,
1078
    0x1F800000,
1079
    0x0F800000,
1080
    0x07800000,
1081
    0x03800000
1082
};
1083
 
1084
static const uint32 float32QInfWeightOffsets[ float32NumQInfWeightMasks ] = {
1085
    0x00000000,
1086
    0x00000000,
1087
    0x20000000,
1088
    0x30000000,
1089
    0x38000000,
1090
    0x3C000000,
1091
    0x3E000000
1092
};
1093
 
1094
static float32 float32RandomQInfP3( void )
1095
{
1096
    int8 weightMaskNum;
1097
 
1098
    weightMaskNum = randomUint8() % float32NumQInfWeightMasks;
1099
    return
1100
          ( ( (uint32) ( randomUint8() & 1 ) )<<31 )
1101
        | (   (   ( ( (uint32) ( randomUint16() & 0x1FF ) )<<23 )
1102
                & float32QInfWeightMasks[ weightMaskNum ] )
1103
            + float32QInfWeightOffsets[ weightMaskNum ]
1104
          )
1105
        | (   (   float32P2[ randomUint8() % float32NumP2 ]
1106
                + float32P2[ randomUint8() % float32NumP2 ] )
1107
            & 0x007FFFFF );
1108
 
1109
}
1110
 
1111
static float32 float32RandomQInfPInf( void )
1112
{
1113
    int8 weightMaskNum;
1114
 
1115
    weightMaskNum = randomUint8() % float32NumQInfWeightMasks;
1116
    return
1117
          ( ( (uint32) ( randomUint8() & 1 ) )<<31 )
1118
        | (   (   ( ( (uint32) ( randomUint16() & 0x1FF ) )<<23 )
1119
                & float32QInfWeightMasks[ weightMaskNum ] )
1120
            + float32QInfWeightOffsets[ weightMaskNum ]
1121
          )
1122
        | ( randomUint32() & 0x007FFFFF );
1123
 
1124
}
1125
 
1126
static float32 float32Random( void )
1127
{
1128
 
1129
    switch ( randomUint8() & 7 ) {
1130
     case 0:
1131
     case 1:
1132
     case 2:
1133
        return float32RandomQOutP3();
1134
     case 3:
1135
        return float32RandomQOutPInf();
1136
     case 4:
1137
     case 5:
1138
     case 6:
1139
        return float32RandomQInfP3();
1140
     case 7:
1141
        return float32RandomQInfPInf();
1142
    default:
1143
      // Added this - GCC warning that control reached end of non-void return
1144
      // function, but we actually cover all cases here (0-7) for the 3-bit
1145
      // value that results from the masking in the switch() - JB
1146
      return 0;
1147
    }
1148
 
1149
}
1150
 
1151
#ifdef BITS64
1152
#define SETFLOAT64( z, zHigh, zLow ) z = ( ( (float64) zHigh )<<32 ) | zLow
1153
#else
1154
#define SETFLOAT64( z, zHigh, zLow ) z.low = zLow; z.high = zHigh
1155
#endif
1156
 
1157
enum {
1158
    float64NumQIn  =  22,
1159
    float64NumQOut =  64,
1160
    float64NumP1   =   4,
1161
    float64NumP2   = 204
1162
};
1163
 
1164
static const uint32 float64QIn[ float64NumQIn ] = {
1165
    0x00000000,         /* positive, subnormal          */
1166
    0x00100000,         /* positive, -1022              */
1167
    0x3CA00000,         /* positive,   -53              */
1168
    0x3FD00000,         /* positive,    -2              */
1169
    0x3FE00000,         /* positive,    -1              */
1170
    0x3FF00000,         /* positive,     0              */
1171
    0x40000000,         /* positive,     1              */
1172
    0x40100000,         /* positive,     2              */
1173
    0x43400000,         /* positive,    53              */
1174
    0x7FE00000,         /* positive,  1023              */
1175
    0x7FF00000,         /* positive, infinity or NaN    */
1176
    0x80000000,         /* negative, subnormal          */
1177
    0x80100000,         /* negative, -1022              */
1178
    0xBCA00000,         /* negative,   -53              */
1179
    0xBFD00000,         /* negative,    -2              */
1180
    0xBFE00000,         /* negative,    -1              */
1181
    0xBFF00000,         /* negative,     0              */
1182
    0xC0000000,         /* negative,     1              */
1183
    0xC0100000,         /* negative,     2              */
1184
    0xC3400000,         /* negative,    53              */
1185
    0xFFE00000,         /* negative,  1023              */
1186
    0xFFF00000          /* negative, infinity or NaN    */
1187
};
1188
 
1189
static const uint32 float64QOut[ float64NumQOut ] = {
1190
    0x00000000,         /* positive, subnormal          */
1191
    0x00100000,         /* positive, -1022              */
1192
    0x00200000,         /* positive, -1021              */
1193
    0x37E00000,         /* positive,  -129              */
1194
    0x37F00000,         /* positive,  -128              */
1195
    0x38000000,         /* positive,  -127              */
1196
    0x38100000,         /* positive,  -126              */
1197
    0x3CA00000,         /* positive,   -53              */
1198
    0x3FB00000,         /* positive,    -4              */
1199
    0x3FC00000,         /* positive,    -3              */
1200
    0x3FD00000,         /* positive,    -2              */
1201
    0x3FE00000,         /* positive,    -1              */
1202
    0x3FF00000,         /* positive,     0              */
1203
    0x40000000,         /* positive,     1              */
1204
    0x40100000,         /* positive,     2              */
1205
    0x40200000,         /* positive,     3              */
1206
    0x40300000,         /* positive,     4              */
1207
    0x41C00000,         /* positive,    29              */
1208
    0x41D00000,         /* positive,    30              */
1209
    0x41E00000,         /* positive,    31              */
1210
    0x41F00000,         /* positive,    32              */
1211
    0x43400000,         /* positive,    53              */
1212
    0x43C00000,         /* positive,    61              */
1213
    0x43D00000,         /* positive,    62              */
1214
    0x43E00000,         /* positive,    63              */
1215
    0x43F00000,         /* positive,    64              */
1216
    0x47E00000,         /* positive,   127              */
1217
    0x47F00000,         /* positive,   128              */
1218
    0x48000000,         /* positive,   129              */
1219
    0x7FD00000,         /* positive,  1022              */
1220
    0x7FE00000,         /* positive,  1023              */
1221
    0x7FF00000,         /* positive, infinity or NaN    */
1222
    0x80000000,         /* negative, subnormal          */
1223
    0x80100000,         /* negative, -1022              */
1224
    0x80200000,         /* negative, -1021              */
1225
    0xB7E00000,         /* negative,  -129              */
1226
    0xB7F00000,         /* negative,  -128              */
1227
    0xB8000000,         /* negative,  -127              */
1228
    0xB8100000,         /* negative,  -126              */
1229
    0xBCA00000,         /* negative,   -53              */
1230
    0xBFB00000,         /* negative,    -4              */
1231
    0xBFC00000,         /* negative,    -3              */
1232
    0xBFD00000,         /* negative,    -2              */
1233
    0xBFE00000,         /* negative,    -1              */
1234
    0xBFF00000,         /* negative,     0              */
1235
    0xC0000000,         /* negative,     1              */
1236
    0xC0100000,         /* negative,     2              */
1237
    0xC0200000,         /* negative,     3              */
1238
    0xC0300000,         /* negative,     4              */
1239
    0xC1C00000,         /* negative,    29              */
1240
    0xC1D00000,         /* negative,    30              */
1241
    0xC1E00000,         /* negative,    31              */
1242
    0xC1F00000,         /* negative,    32              */
1243
    0xC3400000,         /* negative,    53              */
1244
    0xC3C00000,         /* negative,    61              */
1245
    0xC3D00000,         /* negative,    62              */
1246
    0xC3E00000,         /* negative,    63              */
1247
    0xC3F00000,         /* negative,    64              */
1248
    0xC7E00000,         /* negative,   127              */
1249
    0xC7F00000,         /* negative,   128              */
1250
    0xC8000000,         /* negative,   129              */
1251
    0xFFD00000,         /* negative,  1022              */
1252
    0xFFE00000,         /* negative,  1023              */
1253
    0xFFF00000          /* negative, infinity or NaN    */
1254
};
1255
 
1256
static const struct { bits32 high, low; } float64P1[ float64NumP1 ] = {
1257
    { 0x00000000, 0x00000000 },
1258
    { 0x00000000, 0x00000001 },
1259
    { 0x000FFFFF, 0xFFFFFFFF },
1260
    { 0x000FFFFF, 0xFFFFFFFE }
1261
};
1262
 
1263
static const struct { bits32 high, low; } float64P2[ float64NumP2 ] = {
1264
    { 0x00000000, 0x00000000 },
1265
    { 0x00000000, 0x00000001 },
1266
    { 0x00000000, 0x00000002 },
1267
    { 0x00000000, 0x00000004 },
1268
    { 0x00000000, 0x00000008 },
1269
    { 0x00000000, 0x00000010 },
1270
    { 0x00000000, 0x00000020 },
1271
    { 0x00000000, 0x00000040 },
1272
    { 0x00000000, 0x00000080 },
1273
    { 0x00000000, 0x00000100 },
1274
    { 0x00000000, 0x00000200 },
1275
    { 0x00000000, 0x00000400 },
1276
    { 0x00000000, 0x00000800 },
1277
    { 0x00000000, 0x00001000 },
1278
    { 0x00000000, 0x00002000 },
1279
    { 0x00000000, 0x00004000 },
1280
    { 0x00000000, 0x00008000 },
1281
    { 0x00000000, 0x00010000 },
1282
    { 0x00000000, 0x00020000 },
1283
    { 0x00000000, 0x00040000 },
1284
    { 0x00000000, 0x00080000 },
1285
    { 0x00000000, 0x00100000 },
1286
    { 0x00000000, 0x00200000 },
1287
    { 0x00000000, 0x00400000 },
1288
    { 0x00000000, 0x00800000 },
1289
    { 0x00000000, 0x01000000 },
1290
    { 0x00000000, 0x02000000 },
1291
    { 0x00000000, 0x04000000 },
1292
    { 0x00000000, 0x08000000 },
1293
    { 0x00000000, 0x10000000 },
1294
    { 0x00000000, 0x20000000 },
1295
    { 0x00000000, 0x40000000 },
1296
    { 0x00000000, 0x80000000 },
1297
    { 0x00000001, 0x00000000 },
1298
    { 0x00000002, 0x00000000 },
1299
    { 0x00000004, 0x00000000 },
1300
    { 0x00000008, 0x00000000 },
1301
    { 0x00000010, 0x00000000 },
1302
    { 0x00000020, 0x00000000 },
1303
    { 0x00000040, 0x00000000 },
1304
    { 0x00000080, 0x00000000 },
1305
    { 0x00000100, 0x00000000 },
1306
    { 0x00000200, 0x00000000 },
1307
    { 0x00000400, 0x00000000 },
1308
    { 0x00000800, 0x00000000 },
1309
    { 0x00001000, 0x00000000 },
1310
    { 0x00002000, 0x00000000 },
1311
    { 0x00004000, 0x00000000 },
1312
    { 0x00008000, 0x00000000 },
1313
    { 0x00010000, 0x00000000 },
1314
    { 0x00020000, 0x00000000 },
1315
    { 0x00040000, 0x00000000 },
1316
    { 0x00080000, 0x00000000 },
1317
    { 0x000C0000, 0x00000000 },
1318
    { 0x000E0000, 0x00000000 },
1319
    { 0x000F0000, 0x00000000 },
1320
    { 0x000F8000, 0x00000000 },
1321
    { 0x000FC000, 0x00000000 },
1322
    { 0x000FE000, 0x00000000 },
1323
    { 0x000FF000, 0x00000000 },
1324
    { 0x000FF800, 0x00000000 },
1325
    { 0x000FFC00, 0x00000000 },
1326
    { 0x000FFE00, 0x00000000 },
1327
    { 0x000FFF00, 0x00000000 },
1328
    { 0x000FFF80, 0x00000000 },
1329
    { 0x000FFFC0, 0x00000000 },
1330
    { 0x000FFFE0, 0x00000000 },
1331
    { 0x000FFFF0, 0x00000000 },
1332
    { 0x000FFFF8, 0x00000000 },
1333
    { 0x000FFFFC, 0x00000000 },
1334
    { 0x000FFFFE, 0x00000000 },
1335
    { 0x000FFFFF, 0x00000000 },
1336
    { 0x000FFFFF, 0x80000000 },
1337
    { 0x000FFFFF, 0xC0000000 },
1338
    { 0x000FFFFF, 0xE0000000 },
1339
    { 0x000FFFFF, 0xF0000000 },
1340
    { 0x000FFFFF, 0xF8000000 },
1341
    { 0x000FFFFF, 0xFC000000 },
1342
    { 0x000FFFFF, 0xFE000000 },
1343
    { 0x000FFFFF, 0xFF000000 },
1344
    { 0x000FFFFF, 0xFF800000 },
1345
    { 0x000FFFFF, 0xFFC00000 },
1346
    { 0x000FFFFF, 0xFFE00000 },
1347
    { 0x000FFFFF, 0xFFF00000 },
1348
    { 0x000FFFFF, 0xFFF80000 },
1349
    { 0x000FFFFF, 0xFFFC0000 },
1350
    { 0x000FFFFF, 0xFFFE0000 },
1351
    { 0x000FFFFF, 0xFFFF0000 },
1352
    { 0x000FFFFF, 0xFFFF8000 },
1353
    { 0x000FFFFF, 0xFFFFC000 },
1354
    { 0x000FFFFF, 0xFFFFE000 },
1355
    { 0x000FFFFF, 0xFFFFF000 },
1356
    { 0x000FFFFF, 0xFFFFF800 },
1357
    { 0x000FFFFF, 0xFFFFFC00 },
1358
    { 0x000FFFFF, 0xFFFFFE00 },
1359
    { 0x000FFFFF, 0xFFFFFF00 },
1360
    { 0x000FFFFF, 0xFFFFFF80 },
1361
    { 0x000FFFFF, 0xFFFFFFC0 },
1362
    { 0x000FFFFF, 0xFFFFFFE0 },
1363
    { 0x000FFFFF, 0xFFFFFFF0 },
1364
    { 0x000FFFFF, 0xFFFFFFF8 },
1365
    { 0x000FFFFF, 0xFFFFFFFC },
1366
    { 0x000FFFFF, 0xFFFFFFFE },
1367
    { 0x000FFFFF, 0xFFFFFFFF },
1368
    { 0x000FFFFF, 0xFFFFFFFD },
1369
    { 0x000FFFFF, 0xFFFFFFFB },
1370
    { 0x000FFFFF, 0xFFFFFFF7 },
1371
    { 0x000FFFFF, 0xFFFFFFEF },
1372
    { 0x000FFFFF, 0xFFFFFFDF },
1373
    { 0x000FFFFF, 0xFFFFFFBF },
1374
    { 0x000FFFFF, 0xFFFFFF7F },
1375
    { 0x000FFFFF, 0xFFFFFEFF },
1376
    { 0x000FFFFF, 0xFFFFFDFF },
1377
    { 0x000FFFFF, 0xFFFFFBFF },
1378
    { 0x000FFFFF, 0xFFFFF7FF },
1379
    { 0x000FFFFF, 0xFFFFEFFF },
1380
    { 0x000FFFFF, 0xFFFFDFFF },
1381
    { 0x000FFFFF, 0xFFFFBFFF },
1382
    { 0x000FFFFF, 0xFFFF7FFF },
1383
    { 0x000FFFFF, 0xFFFEFFFF },
1384
    { 0x000FFFFF, 0xFFFDFFFF },
1385
    { 0x000FFFFF, 0xFFFBFFFF },
1386
    { 0x000FFFFF, 0xFFF7FFFF },
1387
    { 0x000FFFFF, 0xFFEFFFFF },
1388
    { 0x000FFFFF, 0xFFDFFFFF },
1389
    { 0x000FFFFF, 0xFFBFFFFF },
1390
    { 0x000FFFFF, 0xFF7FFFFF },
1391
    { 0x000FFFFF, 0xFEFFFFFF },
1392
    { 0x000FFFFF, 0xFDFFFFFF },
1393
    { 0x000FFFFF, 0xFBFFFFFF },
1394
    { 0x000FFFFF, 0xF7FFFFFF },
1395
    { 0x000FFFFF, 0xEFFFFFFF },
1396
    { 0x000FFFFF, 0xDFFFFFFF },
1397
    { 0x000FFFFF, 0xBFFFFFFF },
1398
    { 0x000FFFFF, 0x7FFFFFFF },
1399
    { 0x000FFFFE, 0xFFFFFFFF },
1400
    { 0x000FFFFD, 0xFFFFFFFF },
1401
    { 0x000FFFFB, 0xFFFFFFFF },
1402
    { 0x000FFFF7, 0xFFFFFFFF },
1403
    { 0x000FFFEF, 0xFFFFFFFF },
1404
    { 0x000FFFDF, 0xFFFFFFFF },
1405
    { 0x000FFFBF, 0xFFFFFFFF },
1406
    { 0x000FFF7F, 0xFFFFFFFF },
1407
    { 0x000FFEFF, 0xFFFFFFFF },
1408
    { 0x000FFDFF, 0xFFFFFFFF },
1409
    { 0x000FFBFF, 0xFFFFFFFF },
1410
    { 0x000FF7FF, 0xFFFFFFFF },
1411
    { 0x000FEFFF, 0xFFFFFFFF },
1412
    { 0x000FDFFF, 0xFFFFFFFF },
1413
    { 0x000FBFFF, 0xFFFFFFFF },
1414
    { 0x000F7FFF, 0xFFFFFFFF },
1415
    { 0x000EFFFF, 0xFFFFFFFF },
1416
    { 0x000DFFFF, 0xFFFFFFFF },
1417
    { 0x000BFFFF, 0xFFFFFFFF },
1418
    { 0x0007FFFF, 0xFFFFFFFF },
1419
    { 0x0003FFFF, 0xFFFFFFFF },
1420
    { 0x0001FFFF, 0xFFFFFFFF },
1421
    { 0x0000FFFF, 0xFFFFFFFF },
1422
    { 0x00007FFF, 0xFFFFFFFF },
1423
    { 0x00003FFF, 0xFFFFFFFF },
1424
    { 0x00001FFF, 0xFFFFFFFF },
1425
    { 0x00000FFF, 0xFFFFFFFF },
1426
    { 0x000007FF, 0xFFFFFFFF },
1427
    { 0x000003FF, 0xFFFFFFFF },
1428
    { 0x000001FF, 0xFFFFFFFF },
1429
    { 0x000000FF, 0xFFFFFFFF },
1430
    { 0x0000007F, 0xFFFFFFFF },
1431
    { 0x0000003F, 0xFFFFFFFF },
1432
    { 0x0000001F, 0xFFFFFFFF },
1433
    { 0x0000000F, 0xFFFFFFFF },
1434
    { 0x00000007, 0xFFFFFFFF },
1435
    { 0x00000003, 0xFFFFFFFF },
1436
    { 0x00000001, 0xFFFFFFFF },
1437
    { 0x00000000, 0xFFFFFFFF },
1438
    { 0x00000000, 0x7FFFFFFF },
1439
    { 0x00000000, 0x3FFFFFFF },
1440
    { 0x00000000, 0x1FFFFFFF },
1441
    { 0x00000000, 0x0FFFFFFF },
1442
    { 0x00000000, 0x07FFFFFF },
1443
    { 0x00000000, 0x03FFFFFF },
1444
    { 0x00000000, 0x01FFFFFF },
1445
    { 0x00000000, 0x00FFFFFF },
1446
    { 0x00000000, 0x007FFFFF },
1447
    { 0x00000000, 0x003FFFFF },
1448
    { 0x00000000, 0x001FFFFF },
1449
    { 0x00000000, 0x000FFFFF },
1450
    { 0x00000000, 0x0007FFFF },
1451
    { 0x00000000, 0x0003FFFF },
1452
    { 0x00000000, 0x0001FFFF },
1453
    { 0x00000000, 0x0000FFFF },
1454
    { 0x00000000, 0x00007FFF },
1455
    { 0x00000000, 0x00003FFF },
1456
    { 0x00000000, 0x00001FFF },
1457
    { 0x00000000, 0x00000FFF },
1458
    { 0x00000000, 0x000007FF },
1459
    { 0x00000000, 0x000003FF },
1460
    { 0x00000000, 0x000001FF },
1461
    { 0x00000000, 0x000000FF },
1462
    { 0x00000000, 0x0000007F },
1463
    { 0x00000000, 0x0000003F },
1464
    { 0x00000000, 0x0000001F },
1465
    { 0x00000000, 0x0000000F },
1466
    { 0x00000000, 0x00000007 },
1467
    { 0x00000000, 0x00000003 }
1468
};
1469
 
1470
static const uint32 float64NumQInP1 = float64NumQIn * float64NumP1;
1471
static const uint32 float64NumQOutP1 = float64NumQOut * float64NumP1;
1472
 
1473
static float64 float64NextQInP1( sequenceT *sequencePtr )
1474
{
1475
    uint8 expNum, sigNum;
1476
    float64 z;
1477
 
1478
    sigNum = sequencePtr->term1Num;
1479
    expNum = sequencePtr->expNum;
1480
    SETFLOAT64(
1481
        z,
1482
        float64QIn[ expNum ] | float64P1[ sigNum ].high,
1483
        float64P1[ sigNum ].low
1484
    );
1485
    ++sigNum;
1486
    if ( float64NumP1 <= sigNum ) {
1487
        sigNum = 0;
1488
        ++expNum;
1489
        if ( float64NumQIn <= expNum ) {
1490
            expNum = 0;
1491
            sequencePtr->done = TRUE;
1492
        }
1493
        sequencePtr->expNum = expNum;
1494
    }
1495
    sequencePtr->term1Num = sigNum;
1496
    return z;
1497
 
1498
}
1499
 
1500
static float64 float64NextQOutP1( sequenceT *sequencePtr )
1501
{
1502
    uint8 expNum, sigNum;
1503
    float64 z;
1504
 
1505
    sigNum = sequencePtr->term1Num;
1506
    expNum = sequencePtr->expNum;
1507
    SETFLOAT64(
1508
        z,
1509
        float64QOut[ expNum ] | float64P1[ sigNum ].high,
1510
        float64P1[ sigNum ].low
1511
    );
1512
    ++sigNum;
1513
    if ( float64NumP1 <= sigNum ) {
1514
        sigNum = 0;
1515
        ++expNum;
1516
        if ( float64NumQOut <= expNum ) {
1517
            expNum = 0;
1518
            sequencePtr->done = TRUE;
1519
        }
1520
        sequencePtr->expNum = expNum;
1521
    }
1522
    sequencePtr->term1Num = sigNum;
1523
    return z;
1524
 
1525
}
1526
 
1527
static const uint32 float64NumQInP2 = float64NumQIn * float64NumP2;
1528
static const uint32 float64NumQOutP2 = float64NumQOut * float64NumP2;
1529
 
1530
static float64 float64NextQInP2( sequenceT *sequencePtr )
1531
{
1532
    uint8 expNum, sigNum;
1533
    float64 z;
1534
 
1535
    sigNum = sequencePtr->term1Num;
1536
    expNum = sequencePtr->expNum;
1537
    SETFLOAT64(
1538
        z,
1539
        float64QIn[ expNum ] | float64P2[ sigNum ].high,
1540
        float64P2[ sigNum ].low
1541
    );
1542
    ++sigNum;
1543
    if ( float64NumP2 <= sigNum ) {
1544
        sigNum = 0;
1545
        ++expNum;
1546
        if ( float64NumQIn <= expNum ) {
1547
            expNum = 0;
1548
            sequencePtr->done = TRUE;
1549
        }
1550
        sequencePtr->expNum = expNum;
1551
    }
1552
    sequencePtr->term1Num = sigNum;
1553
    return z;
1554
 
1555
}
1556
 
1557
static float64 float64NextQOutP2( sequenceT *sequencePtr )
1558
{
1559
    uint8 expNum, sigNum;
1560
    float64 z;
1561
 
1562
    sigNum = sequencePtr->term1Num;
1563
    expNum = sequencePtr->expNum;
1564
    SETFLOAT64(
1565
        z,
1566
        float64QOut[ expNum ] | float64P2[ sigNum ].high,
1567
        float64P2[ sigNum ].low
1568
    );
1569
    ++sigNum;
1570
    if ( float64NumP2 <= sigNum ) {
1571
        sigNum = 0;
1572
        ++expNum;
1573
        if ( float64NumQOut <= expNum ) {
1574
            expNum = 0;
1575
            sequencePtr->done = TRUE;
1576
        }
1577
        sequencePtr->expNum = expNum;
1578
    }
1579
    sequencePtr->term1Num = sigNum;
1580
    return z;
1581
 
1582
}
1583
 
1584
static float64 float64RandomQOutP3( void )
1585
{
1586
    int8 sigNum1, sigNum2;
1587
    uint32 sig1Low, sig2Low, zLow;
1588
    float64 z;
1589
 
1590
    sigNum1 = randomUint8() % float64NumP2;
1591
    sigNum2 = randomUint8() % float64NumP2;
1592
    sig1Low = float64P2[ sigNum1 ].low;
1593
    sig2Low = float64P2[ sigNum2 ].low;
1594
    zLow = sig1Low + sig2Low;
1595
    SETFLOAT64(
1596
        z,
1597
          float64QOut[ randomUint8() % float64NumQOut ]
1598
        | (   (   float64P2[ sigNum1 ].high
1599
                + float64P2[ sigNum2 ].high
1600
                + ( zLow < sig1Low )
1601
              )
1602
            & 0x000FFFFF
1603
          ),
1604
        zLow
1605
    );
1606
    return z;
1607
 
1608
}
1609
 
1610
static float64 float64RandomQOutPInf( void )
1611
{
1612
    float64 z;
1613
 
1614
    SETFLOAT64(
1615
        z,
1616
          float64QOut[ randomUint8() % float64NumQOut ]
1617
        | ( randomUint32() & 0x000FFFFF ),
1618
        randomUint32()
1619
    );
1620
    return z;
1621
 
1622
}
1623
 
1624
enum {
1625
    float64NumQInfWeightMasks = 10
1626
};
1627
 
1628
static const uint32 float64QInfWeightMasks[ float64NumQInfWeightMasks ] = {
1629
    0x7FF00000,
1630
    0x7FF00000,
1631
    0x3FF00000,
1632
    0x1FF00000,
1633
    0x0FF00000,
1634
    0x07F00000,
1635
    0x03F00000,
1636
    0x01F00000,
1637
    0x00F00000,
1638
    0x00700000
1639
};
1640
 
1641
static const uint32 float64QInfWeightOffsets[ float64NumQInfWeightMasks ] = {
1642
    0x00000000,
1643
    0x00000000,
1644
    0x20000000,
1645
    0x30000000,
1646
    0x38000000,
1647
    0x3C000000,
1648
    0x3E000000,
1649
    0x3F000000,
1650
    0x3F800000,
1651
    0x3FC00000
1652
};
1653
 
1654
static float64 float64RandomQInfP3( void )
1655
{
1656
    int8 sigNum1, sigNum2;
1657
    uint32 sig1Low, sig2Low, zLow;
1658
    int8 weightMaskNum;
1659
    float64 z;
1660
 
1661
    sigNum1 = randomUint8() % float64NumP2;
1662
    sigNum2 = randomUint8() % float64NumP2;
1663
    sig1Low = float64P2[ sigNum1 ].low;
1664
    sig2Low = float64P2[ sigNum2 ].low;
1665
    zLow = sig1Low + sig2Low;
1666
    weightMaskNum = randomUint8() % float64NumQInfWeightMasks;
1667
    SETFLOAT64(
1668
        z,
1669
          ( ( (uint32) ( randomUint8() & 1 ) )<<31 )
1670
        | (   (   ( ( (uint32) ( randomUint16() & 0xFFF ) )<<20 )
1671
                & float64QInfWeightMasks[ weightMaskNum ] )
1672
            + float64QInfWeightOffsets[ weightMaskNum ]
1673
          )
1674
        | (   (   float64P2[ sigNum1 ].high
1675
                + float64P2[ sigNum2 ].high
1676
                + ( zLow < sig1Low )
1677
              )
1678
            & 0x000FFFFF
1679
          ),
1680
        zLow
1681
    );
1682
    return z;
1683
 
1684
}
1685
 
1686
static float64 float64RandomQInfPInf( void )
1687
{
1688
    int8 weightMaskNum;
1689
    float64 z;
1690
 
1691
    weightMaskNum = randomUint8() % float64NumQInfWeightMasks;
1692
    SETFLOAT64(
1693
        z,
1694
          ( ( (uint32) ( randomUint8() & 1 ) )<<31 )
1695
        | (   (   ( ( (uint32) ( randomUint16() & 0xFFF ) )<<20 )
1696
                & float64QInfWeightMasks[ weightMaskNum ] )
1697
            + float64QInfWeightOffsets[ weightMaskNum ]
1698
          )
1699
        | ( randomUint32() & 0x000FFFFF ),
1700
        randomUint32()
1701
    );
1702
    return z;
1703
 
1704
}
1705
 
1706
static float64 float64Random( void )
1707
{
1708
 
1709
    switch ( randomUint8() & 7 ) {
1710
     case 0:
1711
     case 1:
1712
     case 2:
1713
        return float64RandomQOutP3();
1714
     case 3:
1715
        return float64RandomQOutPInf();
1716
     case 4:
1717
     case 5:
1718
     case 6:
1719
        return float64RandomQInfP3();
1720
     case 7:
1721
        return float64RandomQInfPInf();
1722
    default:
1723
      // Added this - GCC warning that control reached end of non-void return
1724
      // function, but we actually cover all cases here (0-7) for the 3-bit
1725
      // value that results from the masking in the switch() - JB
1726
      return 0;
1727
    }
1728
 
1729
}
1730
 
1731
#ifdef FLOATX80
1732
 
1733
enum {
1734
    floatx80NumQIn  =  22,
1735
    floatx80NumQOut =  76,
1736
    floatx80NumP1   =   4,
1737
    floatx80NumP2   = 248
1738
};
1739
 
1740
static const uint16 floatx80QIn[ floatx80NumQIn ] = {
1741
    0x0000,             /* positive, subnormal          */
1742
    0x0001,             /* positive, -16382             */
1743
    0x3FBF,             /* positive,    -64             */
1744
    0x3FFD,             /* positive,     -2             */
1745
    0x3FFE,             /* positive,     -1             */
1746
    0x3FFF,             /* positive,      0             */
1747
    0x4000,             /* positive,      1             */
1748
    0x4001,             /* positive,      2             */
1749
    0x403F,             /* positive,     64             */
1750
    0x7FFE,             /* positive,  16383             */
1751
    0x7FFF,             /* positive, infinity or NaN    */
1752
    0x8000,             /* negative, subnormal          */
1753
    0x8001,             /* negative, -16382             */
1754
    0xBFBF,             /* negative,    -64             */
1755
    0xBFFD,             /* negative,     -2             */
1756
    0xBFFE,             /* negative,     -1             */
1757
    0xBFFF,             /* negative,      0             */
1758
    0xC000,             /* negative,      1             */
1759
    0xC001,             /* negative,      2             */
1760
    0xC03F,             /* negative,     64             */
1761
    0xFFFE,             /* negative,  16383             */
1762
    0xFFFF              /* negative, infinity or NaN    */
1763
};
1764
 
1765
static const uint16 floatx80QOut[ floatx80NumQOut ] = {
1766
    0x0000,             /* positive, subnormal          */
1767
    0x0001,             /* positive, -16382             */
1768
    0x0002,             /* positive, -16381             */
1769
    0x3BFE,             /* positive,  -1025             */
1770
    0x3BFF,             /* positive,  -1024             */
1771
    0x3C00,             /* positive,  -1023             */
1772
    0x3C01,             /* positive,  -1022             */
1773
    0x3F7E,             /* positive,   -129             */
1774
    0x3F7F,             /* positive,   -128             */
1775
    0x3F80,             /* positive,   -127             */
1776
    0x3F81,             /* positive,   -126             */
1777
    0x3FBF,             /* positive,    -64             */
1778
    0x3FFB,             /* positive,     -4             */
1779
    0x3FFC,             /* positive,     -3             */
1780
    0x3FFD,             /* positive,     -2             */
1781
    0x3FFE,             /* positive,     -1             */
1782
    0x3FFF,             /* positive,      0             */
1783
    0x4000,             /* positive,      1             */
1784
    0x4001,             /* positive,      2             */
1785
    0x4002,             /* positive,      3             */
1786
    0x4003,             /* positive,      4             */
1787
    0x401C,             /* positive,     29             */
1788
    0x401D,             /* positive,     30             */
1789
    0x401E,             /* positive,     31             */
1790
    0x401F,             /* positive,     32             */
1791
    0x403C,             /* positive,     61             */
1792
    0x403D,             /* positive,     62             */
1793
    0x403E,             /* positive,     63             */
1794
    0x403F,             /* positive,     64             */
1795
    0x407E,             /* positive,    127             */
1796
    0x407F,             /* positive,    128             */
1797
    0x4080,             /* positive,    129             */
1798
    0x43FE,             /* positive,   1023             */
1799
    0x43FF,             /* positive,   1024             */
1800
    0x4400,             /* positive,   1025             */
1801
    0x7FFD,             /* positive,  16382             */
1802
    0x7FFE,             /* positive,  16383             */
1803
    0x7FFF,             /* positive, infinity or NaN    */
1804
    0x8000,             /* negative, subnormal          */
1805
    0x8001,             /* negative, -16382             */
1806
    0x8002,             /* negative, -16381             */
1807
    0xBBFE,             /* negative,  -1025             */
1808
    0xBBFF,             /* negative,  -1024             */
1809
    0xBC00,             /* negative,  -1023             */
1810
    0xBC01,             /* negative,  -1022             */
1811
    0xBF7E,             /* negative,   -129             */
1812
    0xBF7F,             /* negative,   -128             */
1813
    0xBF80,             /* negative,   -127             */
1814
    0xBF81,             /* negative,   -126             */
1815
    0xBFBF,             /* negative,    -64             */
1816
    0xBFFB,             /* negative,     -4             */
1817
    0xBFFC,             /* negative,     -3             */
1818
    0xBFFD,             /* negative,     -2             */
1819
    0xBFFE,             /* negative,     -1             */
1820
    0xBFFF,             /* negative,      0             */
1821
    0xC000,             /* negative,      1             */
1822
    0xC001,             /* negative,      2             */
1823
    0xC002,             /* negative,      3             */
1824
    0xC003,             /* negative,      4             */
1825
    0xC01C,             /* negative,     29             */
1826
    0xC01D,             /* negative,     30             */
1827
    0xC01E,             /* negative,     31             */
1828
    0xC01F,             /* negative,     32             */
1829
    0xC03C,             /* negative,     61             */
1830
    0xC03D,             /* negative,     62             */
1831
    0xC03E,             /* negative,     63             */
1832
    0xC03F,             /* negative,     64             */
1833
    0xC07E,             /* negative,    127             */
1834
    0xC07F,             /* negative,    128             */
1835
    0xC080,             /* negative,    129             */
1836
    0xC3FE,             /* negative,   1023             */
1837
    0xC3FF,             /* negative,   1024             */
1838
    0xC400,             /* negative,   1025             */
1839
    0xFFFD,             /* negative,  16382             */
1840
    0xFFFE,             /* negative,  16383             */
1841
    0xFFFF              /* negative, infinity or NaN    */
1842
};
1843
 
1844
static const bits64 floatx80P1[ floatx80NumP1 ] = {
1845
    LIT64( 0x0000000000000000 ),
1846
    LIT64( 0x0000000000000001 ),
1847
    LIT64( 0x7FFFFFFFFFFFFFFF ),
1848
    LIT64( 0x7FFFFFFFFFFFFFFE )
1849
};
1850
 
1851
static const bits64 floatx80P2[ floatx80NumP2 ] = {
1852
    LIT64( 0x0000000000000000 ),
1853
    LIT64( 0x0000000000000001 ),
1854
    LIT64( 0x0000000000000002 ),
1855
    LIT64( 0x0000000000000004 ),
1856
    LIT64( 0x0000000000000008 ),
1857
    LIT64( 0x0000000000000010 ),
1858
    LIT64( 0x0000000000000020 ),
1859
    LIT64( 0x0000000000000040 ),
1860
    LIT64( 0x0000000000000080 ),
1861
    LIT64( 0x0000000000000100 ),
1862
    LIT64( 0x0000000000000200 ),
1863
    LIT64( 0x0000000000000400 ),
1864
    LIT64( 0x0000000000000800 ),
1865
    LIT64( 0x0000000000001000 ),
1866
    LIT64( 0x0000000000002000 ),
1867
    LIT64( 0x0000000000004000 ),
1868
    LIT64( 0x0000000000008000 ),
1869
    LIT64( 0x0000000000010000 ),
1870
    LIT64( 0x0000000000020000 ),
1871
    LIT64( 0x0000000000040000 ),
1872
    LIT64( 0x0000000000080000 ),
1873
    LIT64( 0x0000000000100000 ),
1874
    LIT64( 0x0000000000200000 ),
1875
    LIT64( 0x0000000000400000 ),
1876
    LIT64( 0x0000000000800000 ),
1877
    LIT64( 0x0000000001000000 ),
1878
    LIT64( 0x0000000002000000 ),
1879
    LIT64( 0x0000000004000000 ),
1880
    LIT64( 0x0000000008000000 ),
1881
    LIT64( 0x0000000010000000 ),
1882
    LIT64( 0x0000000020000000 ),
1883
    LIT64( 0x0000000040000000 ),
1884
    LIT64( 0x0000000080000000 ),
1885
    LIT64( 0x0000000100000000 ),
1886
    LIT64( 0x0000000200000000 ),
1887
    LIT64( 0x0000000400000000 ),
1888
    LIT64( 0x0000000800000000 ),
1889
    LIT64( 0x0000001000000000 ),
1890
    LIT64( 0x0000002000000000 ),
1891
    LIT64( 0x0000004000000000 ),
1892
    LIT64( 0x0000008000000000 ),
1893
    LIT64( 0x0000010000000000 ),
1894
    LIT64( 0x0000020000000000 ),
1895
    LIT64( 0x0000040000000000 ),
1896
    LIT64( 0x0000080000000000 ),
1897
    LIT64( 0x0000100000000000 ),
1898
    LIT64( 0x0000200000000000 ),
1899
    LIT64( 0x0000400000000000 ),
1900
    LIT64( 0x0000800000000000 ),
1901
    LIT64( 0x0001000000000000 ),
1902
    LIT64( 0x0002000000000000 ),
1903
    LIT64( 0x0004000000000000 ),
1904
    LIT64( 0x0008000000000000 ),
1905
    LIT64( 0x0010000000000000 ),
1906
    LIT64( 0x0020000000000000 ),
1907
    LIT64( 0x0040000000000000 ),
1908
    LIT64( 0x0080000000000000 ),
1909
    LIT64( 0x0100000000000000 ),
1910
    LIT64( 0x0200000000000000 ),
1911
    LIT64( 0x0400000000000000 ),
1912
    LIT64( 0x0800000000000000 ),
1913
    LIT64( 0x1000000000000000 ),
1914
    LIT64( 0x2000000000000000 ),
1915
    LIT64( 0x4000000000000000 ),
1916
    LIT64( 0x6000000000000000 ),
1917
    LIT64( 0x7000000000000000 ),
1918
    LIT64( 0x7800000000000000 ),
1919
    LIT64( 0x7C00000000000000 ),
1920
    LIT64( 0x7E00000000000000 ),
1921
    LIT64( 0x7F00000000000000 ),
1922
    LIT64( 0x7F80000000000000 ),
1923
    LIT64( 0x7FC0000000000000 ),
1924
    LIT64( 0x7FE0000000000000 ),
1925
    LIT64( 0x7FF0000000000000 ),
1926
    LIT64( 0x7FF8000000000000 ),
1927
    LIT64( 0x7FFC000000000000 ),
1928
    LIT64( 0x7FFE000000000000 ),
1929
    LIT64( 0x7FFF000000000000 ),
1930
    LIT64( 0x7FFF800000000000 ),
1931
    LIT64( 0x7FFFC00000000000 ),
1932
    LIT64( 0x7FFFE00000000000 ),
1933
    LIT64( 0x7FFFF00000000000 ),
1934
    LIT64( 0x7FFFF80000000000 ),
1935
    LIT64( 0x7FFFFC0000000000 ),
1936
    LIT64( 0x7FFFFE0000000000 ),
1937
    LIT64( 0x7FFFFF0000000000 ),
1938
    LIT64( 0x7FFFFF8000000000 ),
1939
    LIT64( 0x7FFFFFC000000000 ),
1940
    LIT64( 0x7FFFFFE000000000 ),
1941
    LIT64( 0x7FFFFFF000000000 ),
1942
    LIT64( 0x7FFFFFF800000000 ),
1943
    LIT64( 0x7FFFFFFC00000000 ),
1944
    LIT64( 0x7FFFFFFE00000000 ),
1945
    LIT64( 0x7FFFFFFF00000000 ),
1946
    LIT64( 0x7FFFFFFF80000000 ),
1947
    LIT64( 0x7FFFFFFFC0000000 ),
1948
    LIT64( 0x7FFFFFFFE0000000 ),
1949
    LIT64( 0x7FFFFFFFF0000000 ),
1950
    LIT64( 0x7FFFFFFFF8000000 ),
1951
    LIT64( 0x7FFFFFFFFC000000 ),
1952
    LIT64( 0x7FFFFFFFFE000000 ),
1953
    LIT64( 0x7FFFFFFFFF000000 ),
1954
    LIT64( 0x7FFFFFFFFF800000 ),
1955
    LIT64( 0x7FFFFFFFFFC00000 ),
1956
    LIT64( 0x7FFFFFFFFFE00000 ),
1957
    LIT64( 0x7FFFFFFFFFF00000 ),
1958
    LIT64( 0x7FFFFFFFFFF80000 ),
1959
    LIT64( 0x7FFFFFFFFFFC0000 ),
1960
    LIT64( 0x7FFFFFFFFFFE0000 ),
1961
    LIT64( 0x7FFFFFFFFFFF0000 ),
1962
    LIT64( 0x7FFFFFFFFFFF8000 ),
1963
    LIT64( 0x7FFFFFFFFFFFC000 ),
1964
    LIT64( 0x7FFFFFFFFFFFE000 ),
1965
    LIT64( 0x7FFFFFFFFFFFF000 ),
1966
    LIT64( 0x7FFFFFFFFFFFF800 ),
1967
    LIT64( 0x7FFFFFFFFFFFFC00 ),
1968
    LIT64( 0x7FFFFFFFFFFFFE00 ),
1969
    LIT64( 0x7FFFFFFFFFFFFF00 ),
1970
    LIT64( 0x7FFFFFFFFFFFFF80 ),
1971
    LIT64( 0x7FFFFFFFFFFFFFC0 ),
1972
    LIT64( 0x7FFFFFFFFFFFFFE0 ),
1973
    LIT64( 0x7FFFFFFFFFFFFFF0 ),
1974
    LIT64( 0x7FFFFFFFFFFFFFF8 ),
1975
    LIT64( 0x7FFFFFFFFFFFFFFC ),
1976
    LIT64( 0x7FFFFFFFFFFFFFFE ),
1977
    LIT64( 0x7FFFFFFFFFFFFFFF ),
1978
    LIT64( 0x7FFFFFFFFFFFFFFD ),
1979
    LIT64( 0x7FFFFFFFFFFFFFFB ),
1980
    LIT64( 0x7FFFFFFFFFFFFFF7 ),
1981
    LIT64( 0x7FFFFFFFFFFFFFEF ),
1982
    LIT64( 0x7FFFFFFFFFFFFFDF ),
1983
    LIT64( 0x7FFFFFFFFFFFFFBF ),
1984
    LIT64( 0x7FFFFFFFFFFFFF7F ),
1985
    LIT64( 0x7FFFFFFFFFFFFEFF ),
1986
    LIT64( 0x7FFFFFFFFFFFFDFF ),
1987
    LIT64( 0x7FFFFFFFFFFFFBFF ),
1988
    LIT64( 0x7FFFFFFFFFFFF7FF ),
1989
    LIT64( 0x7FFFFFFFFFFFEFFF ),
1990
    LIT64( 0x7FFFFFFFFFFFDFFF ),
1991
    LIT64( 0x7FFFFFFFFFFFBFFF ),
1992
    LIT64( 0x7FFFFFFFFFFF7FFF ),
1993
    LIT64( 0x7FFFFFFFFFFEFFFF ),
1994
    LIT64( 0x7FFFFFFFFFFDFFFF ),
1995
    LIT64( 0x7FFFFFFFFFFBFFFF ),
1996
    LIT64( 0x7FFFFFFFFFF7FFFF ),
1997
    LIT64( 0x7FFFFFFFFFEFFFFF ),
1998
    LIT64( 0x7FFFFFFFFFDFFFFF ),
1999
    LIT64( 0x7FFFFFFFFFBFFFFF ),
2000
    LIT64( 0x7FFFFFFFFF7FFFFF ),
2001
    LIT64( 0x7FFFFFFFFEFFFFFF ),
2002
    LIT64( 0x7FFFFFFFFDFFFFFF ),
2003
    LIT64( 0x7FFFFFFFFBFFFFFF ),
2004
    LIT64( 0x7FFFFFFFF7FFFFFF ),
2005
    LIT64( 0x7FFFFFFFEFFFFFFF ),
2006
    LIT64( 0x7FFFFFFFDFFFFFFF ),
2007
    LIT64( 0x7FFFFFFFBFFFFFFF ),
2008
    LIT64( 0x7FFFFFFF7FFFFFFF ),
2009
    LIT64( 0x7FFFFFFEFFFFFFFF ),
2010
    LIT64( 0x7FFFFFFDFFFFFFFF ),
2011
    LIT64( 0x7FFFFFFBFFFFFFFF ),
2012
    LIT64( 0x7FFFFFF7FFFFFFFF ),
2013
    LIT64( 0x7FFFFFEFFFFFFFFF ),
2014
    LIT64( 0x7FFFFFDFFFFFFFFF ),
2015
    LIT64( 0x7FFFFFBFFFFFFFFF ),
2016
    LIT64( 0x7FFFFF7FFFFFFFFF ),
2017
    LIT64( 0x7FFFFEFFFFFFFFFF ),
2018
    LIT64( 0x7FFFFDFFFFFFFFFF ),
2019
    LIT64( 0x7FFFFBFFFFFFFFFF ),
2020
    LIT64( 0x7FFFF7FFFFFFFFFF ),
2021
    LIT64( 0x7FFFEFFFFFFFFFFF ),
2022
    LIT64( 0x7FFFDFFFFFFFFFFF ),
2023
    LIT64( 0x7FFFBFFFFFFFFFFF ),
2024
    LIT64( 0x7FFF7FFFFFFFFFFF ),
2025
    LIT64( 0x7FFEFFFFFFFFFFFF ),
2026
    LIT64( 0x7FFDFFFFFFFFFFFF ),
2027
    LIT64( 0x7FFBFFFFFFFFFFFF ),
2028
    LIT64( 0x7FF7FFFFFFFFFFFF ),
2029
    LIT64( 0x7FEFFFFFFFFFFFFF ),
2030
    LIT64( 0x7FDFFFFFFFFFFFFF ),
2031
    LIT64( 0x7FBFFFFFFFFFFFFF ),
2032
    LIT64( 0x7F7FFFFFFFFFFFFF ),
2033
    LIT64( 0x7EFFFFFFFFFFFFFF ),
2034
    LIT64( 0x7DFFFFFFFFFFFFFF ),
2035
    LIT64( 0x7BFFFFFFFFFFFFFF ),
2036
    LIT64( 0x77FFFFFFFFFFFFFF ),
2037
    LIT64( 0x6FFFFFFFFFFFFFFF ),
2038
    LIT64( 0x5FFFFFFFFFFFFFFF ),
2039
    LIT64( 0x3FFFFFFFFFFFFFFF ),
2040
    LIT64( 0x1FFFFFFFFFFFFFFF ),
2041
    LIT64( 0x0FFFFFFFFFFFFFFF ),
2042
    LIT64( 0x07FFFFFFFFFFFFFF ),
2043
    LIT64( 0x03FFFFFFFFFFFFFF ),
2044
    LIT64( 0x01FFFFFFFFFFFFFF ),
2045
    LIT64( 0x00FFFFFFFFFFFFFF ),
2046
    LIT64( 0x007FFFFFFFFFFFFF ),
2047
    LIT64( 0x003FFFFFFFFFFFFF ),
2048
    LIT64( 0x001FFFFFFFFFFFFF ),
2049
    LIT64( 0x000FFFFFFFFFFFFF ),
2050
    LIT64( 0x0007FFFFFFFFFFFF ),
2051
    LIT64( 0x0003FFFFFFFFFFFF ),
2052
    LIT64( 0x0001FFFFFFFFFFFF ),
2053
    LIT64( 0x0000FFFFFFFFFFFF ),
2054
    LIT64( 0x00007FFFFFFFFFFF ),
2055
    LIT64( 0x00003FFFFFFFFFFF ),
2056
    LIT64( 0x00001FFFFFFFFFFF ),
2057
    LIT64( 0x00000FFFFFFFFFFF ),
2058
    LIT64( 0x000007FFFFFFFFFF ),
2059
    LIT64( 0x000003FFFFFFFFFF ),
2060
    LIT64( 0x000001FFFFFFFFFF ),
2061
    LIT64( 0x000000FFFFFFFFFF ),
2062
    LIT64( 0x0000007FFFFFFFFF ),
2063
    LIT64( 0x0000003FFFFFFFFF ),
2064
    LIT64( 0x0000001FFFFFFFFF ),
2065
    LIT64( 0x0000000FFFFFFFFF ),
2066
    LIT64( 0x00000007FFFFFFFF ),
2067
    LIT64( 0x00000003FFFFFFFF ),
2068
    LIT64( 0x00000001FFFFFFFF ),
2069
    LIT64( 0x00000000FFFFFFFF ),
2070
    LIT64( 0x000000007FFFFFFF ),
2071
    LIT64( 0x000000003FFFFFFF ),
2072
    LIT64( 0x000000001FFFFFFF ),
2073
    LIT64( 0x000000000FFFFFFF ),
2074
    LIT64( 0x0000000007FFFFFF ),
2075
    LIT64( 0x0000000003FFFFFF ),
2076
    LIT64( 0x0000000001FFFFFF ),
2077
    LIT64( 0x0000000000FFFFFF ),
2078
    LIT64( 0x00000000007FFFFF ),
2079
    LIT64( 0x00000000003FFFFF ),
2080
    LIT64( 0x00000000001FFFFF ),
2081
    LIT64( 0x00000000000FFFFF ),
2082
    LIT64( 0x000000000007FFFF ),
2083
    LIT64( 0x000000000003FFFF ),
2084
    LIT64( 0x000000000001FFFF ),
2085
    LIT64( 0x000000000000FFFF ),
2086
    LIT64( 0x0000000000007FFF ),
2087
    LIT64( 0x0000000000003FFF ),
2088
    LIT64( 0x0000000000001FFF ),
2089
    LIT64( 0x0000000000000FFF ),
2090
    LIT64( 0x00000000000007FF ),
2091
    LIT64( 0x00000000000003FF ),
2092
    LIT64( 0x00000000000001FF ),
2093
    LIT64( 0x00000000000000FF ),
2094
    LIT64( 0x000000000000007F ),
2095
    LIT64( 0x000000000000003F ),
2096
    LIT64( 0x000000000000001F ),
2097
    LIT64( 0x000000000000000F ),
2098
    LIT64( 0x0000000000000007 ),
2099
    LIT64( 0x0000000000000003 )
2100
};
2101
 
2102
static const uint32 floatx80NumQInP1 = floatx80NumQIn * floatx80NumP1;
2103
static const uint32 floatx80NumQOutP1 = floatx80NumQOut * floatx80NumP1;
2104
 
2105
static floatx80 floatx80NextQInP1( sequenceT *sequencePtr )
2106
{
2107
    int16 expNum, sigNum;
2108
    floatx80 z;
2109
 
2110
    sigNum = sequencePtr->term1Num;
2111
    expNum = sequencePtr->expNum;
2112
    z.low = floatx80P1[ sigNum ];
2113
    z.high = floatx80QIn[ expNum ];
2114
    if ( z.high & 0x7FFF ) z.low |= LIT64( 0x8000000000000000 );
2115
    ++sigNum;
2116
    if ( floatx80NumP1 <= sigNum ) {
2117
        sigNum = 0;
2118
        ++expNum;
2119
        if ( floatx80NumQIn <= expNum ) {
2120
            expNum = 0;
2121
            sequencePtr->done = TRUE;
2122
        }
2123
        sequencePtr->expNum = expNum;
2124
    }
2125
    sequencePtr->term1Num = sigNum;
2126
    return z;
2127
 
2128
}
2129
 
2130
static floatx80 floatx80NextQOutP1( sequenceT *sequencePtr )
2131
{
2132
    int16 expNum, sigNum;
2133
    floatx80 z;
2134
 
2135
    sigNum = sequencePtr->term1Num;
2136
    expNum = sequencePtr->expNum;
2137
    z.low = floatx80P1[ sigNum ];
2138
    z.high = floatx80QOut[ expNum ];
2139
    if ( z.high & 0x7FFF ) z.low |= LIT64( 0x8000000000000000 );
2140
    ++sigNum;
2141
    if ( floatx80NumP1 <= sigNum ) {
2142
        sigNum = 0;
2143
        ++expNum;
2144
        if ( floatx80NumQOut <= expNum ) {
2145
            expNum = 0;
2146
            sequencePtr->done = TRUE;
2147
        }
2148
        sequencePtr->expNum = expNum;
2149
    }
2150
    sequencePtr->term1Num = sigNum;
2151
    return z;
2152
 
2153
}
2154
 
2155
static const uint32 floatx80NumQInP2 = floatx80NumQIn * floatx80NumP2;
2156
static const uint32 floatx80NumQOutP2 = floatx80NumQOut * floatx80NumP2;
2157
 
2158
static floatx80 floatx80NextQInP2( sequenceT *sequencePtr )
2159
{
2160
    int16 expNum, sigNum;
2161
    floatx80 z;
2162
 
2163
    sigNum = sequencePtr->term1Num;
2164
    expNum = sequencePtr->expNum;
2165
    z.low = floatx80P2[ sigNum ];
2166
    z.high = floatx80QIn[ expNum ];
2167
    if ( z.high & 0x7FFF ) z.low |= LIT64( 0x8000000000000000 );
2168
    ++sigNum;
2169
    if ( floatx80NumP2 <= sigNum ) {
2170
        sigNum = 0;
2171
        ++expNum;
2172
        if ( floatx80NumQIn <= expNum ) {
2173
            expNum = 0;
2174
            sequencePtr->done = TRUE;
2175
        }
2176
        sequencePtr->expNum = expNum;
2177
    }
2178
    sequencePtr->term1Num = sigNum;
2179
    return z;
2180
 
2181
}
2182
 
2183
static floatx80 floatx80NextQOutP2( sequenceT *sequencePtr )
2184
{
2185
    int16 expNum, sigNum;
2186
    floatx80 z;
2187
 
2188
    sigNum = sequencePtr->term1Num;
2189
    expNum = sequencePtr->expNum;
2190
    z.low = floatx80P2[ sigNum ];
2191
    z.high = floatx80QOut[ expNum ];
2192
    if ( z.high & 0x7FFF ) z.low |= LIT64( 0x8000000000000000 );
2193
    ++sigNum;
2194
    if ( floatx80NumP2 <= sigNum ) {
2195
        sigNum = 0;
2196
        ++expNum;
2197
        if ( floatx80NumQOut <= expNum ) {
2198
            expNum = 0;
2199
            sequencePtr->done = TRUE;
2200
        }
2201
        sequencePtr->expNum = expNum;
2202
    }
2203
    sequencePtr->term1Num = sigNum;
2204
    return z;
2205
 
2206
}
2207
 
2208
static floatx80 floatx80RandomQOutP3( void )
2209
{
2210
    floatx80 z;
2211
 
2212
    z.low =
2213
          (   floatx80P2[ randomUint8() % floatx80NumP2 ]
2214
            + floatx80P2[ randomUint8() % floatx80NumP2 ] )
2215
        & LIT64( 0x7FFFFFFFFFFFFFFF );
2216
    z.high = floatx80QOut[ randomUint8() % floatx80NumQOut ];
2217
    if ( z.high & 0x7FFF ) z.low |= LIT64( 0x8000000000000000 );
2218
    return z;
2219
 
2220
}
2221
 
2222
static floatx80 floatx80RandomQOutPInf( void )
2223
{
2224
    floatx80 z;
2225
 
2226
    z.low = randomUint64() & LIT64( 0x7FFFFFFFFFFFFFFF );
2227
    z.high = floatx80QOut[ randomUint8() % floatx80NumQOut ];
2228
    if ( z.high & 0x7FFF ) z.low |= LIT64( 0x8000000000000000 );
2229
    return z;
2230
 
2231
}
2232
 
2233
enum {
2234
    floatx80NumQInfWeightMasks = 14
2235
};
2236
 
2237
static const uint16 floatx80QInfWeightMasks[ floatx80NumQInfWeightMasks ] = {
2238
    0x7FFF,
2239
    0x7FFF,
2240
    0x3FFF,
2241
    0x1FFF,
2242
    0x07FF,
2243
    0x07FF,
2244
    0x03FF,
2245
    0x01FF,
2246
    0x00FF,
2247
    0x007F,
2248
    0x003F,
2249
    0x001F,
2250
    0x000F,
2251
    0x0007
2252
};
2253
 
2254
static const uint16 floatx80QInfWeightOffsets[ floatx80NumQInfWeightMasks ] = {
2255
    0x0000,
2256
    0x0000,
2257
    0x2000,
2258
    0x3000,
2259
    0x3800,
2260
    0x3C00,
2261
    0x3E00,
2262
    0x3F00,
2263
    0x3F80,
2264
    0x3FC0,
2265
    0x3FE0,
2266
    0x3FF0,
2267
    0x3FF8,
2268
    0x3FFC
2269
};
2270
 
2271
static floatx80 floatx80RandomQInfP3( void )
2272
{
2273
    int8 weightMaskNum;
2274
    floatx80 z;
2275
 
2276
    z.low =
2277
          (   floatx80P2[ randomUint8() % floatx80NumP2 ]
2278
            + floatx80P2[ randomUint8() % floatx80NumP2 ] )
2279
        & LIT64( 0x7FFFFFFFFFFFFFFF );
2280
    weightMaskNum = randomUint8() % floatx80NumQInfWeightMasks;
2281
    z.high =
2282
          randomUint16() & floatx80QInfWeightMasks[ weightMaskNum ]
2283
        + floatx80QInfWeightOffsets[ weightMaskNum ];
2284
    if ( z.high ) z.low |= LIT64( 0x8000000000000000 );
2285
    z.high |= ( (uint16) ( randomUint8() & 1 ) )<<15;
2286
    return z;
2287
 
2288
}
2289
 
2290
static floatx80 floatx80RandomQInfPInf( void )
2291
{
2292
    int8 weightMaskNum;
2293
    floatx80 z;
2294
 
2295
    z.low = randomUint64() & LIT64( 0x7FFFFFFFFFFFFFFF );
2296
    weightMaskNum = randomUint8() % floatx80NumQInfWeightMasks;
2297
    z.high =
2298
          randomUint16() & floatx80QInfWeightMasks[ weightMaskNum ]
2299
        + floatx80QInfWeightOffsets[ weightMaskNum ];
2300
    if ( z.high ) z.low |= LIT64( 0x8000000000000000 );
2301
    z.high |= ( (uint16) ( randomUint8() & 1 ) )<<15;
2302
    return z;
2303
 
2304
}
2305
 
2306
static floatx80 floatx80Random( void )
2307
{
2308
 
2309
    switch ( randomUint8() & 7 ) {
2310
     case 0:
2311
     case 1:
2312
     case 2:
2313
        return floatx80RandomQOutP3();
2314
     case 3:
2315
        return floatx80RandomQOutPInf();
2316
     case 4:
2317
     case 5:
2318
     case 6:
2319
        return floatx80RandomQInfP3();
2320
     case 7:
2321
        return floatx80RandomQInfPInf();
2322
    }
2323
 
2324
}
2325
 
2326
#endif
2327
 
2328
#ifdef FLOAT128
2329
 
2330
enum {
2331
    float128NumQIn  =  22,
2332
    float128NumQOut =  78,
2333
    float128NumP1   =   4,
2334
    float128NumP2   = 443
2335
};
2336
 
2337
static const uint64 float128QIn[ float128NumQIn ] = {
2338
    LIT64( 0x0000000000000000 ),        /* positive, subnormal          */
2339
    LIT64( 0x0001000000000000 ),        /* positive, -16382             */
2340
    LIT64( 0x3F8E000000000000 ),        /* positive,   -113             */
2341
    LIT64( 0x3FFD000000000000 ),        /* positive,     -2             */
2342
    LIT64( 0x3FFE000000000000 ),        /* positive,     -1             */
2343
    LIT64( 0x3FFF000000000000 ),        /* positive,      0             */
2344
    LIT64( 0x4000000000000000 ),        /* positive,      1             */
2345
    LIT64( 0x4001000000000000 ),        /* positive,      2             */
2346
    LIT64( 0x4070000000000000 ),        /* positive,    113             */
2347
    LIT64( 0x7FFE000000000000 ),        /* positive,  16383             */
2348
    LIT64( 0x7FFF000000000000 ),        /* positive, infinity or NaN    */
2349
    LIT64( 0x8000000000000000 ),        /* negative, subnormal          */
2350
    LIT64( 0x8001000000000000 ),        /* negative, -16382             */
2351
    LIT64( 0xBF8E000000000000 ),        /* negative,   -113             */
2352
    LIT64( 0xBFFD000000000000 ),        /* negative,     -2             */
2353
    LIT64( 0xBFFE000000000000 ),        /* negative,     -1             */
2354
    LIT64( 0xBFFF000000000000 ),        /* negative,      0             */
2355
    LIT64( 0xC000000000000000 ),        /* negative,      1             */
2356
    LIT64( 0xC001000000000000 ),        /* negative,      2             */
2357
    LIT64( 0xC070000000000000 ),        /* negative,    113             */
2358
    LIT64( 0xFFFE000000000000 ),        /* negative,  16383             */
2359
    LIT64( 0xFFFF000000000000 )         /* negative, infinity or NaN    */
2360
};
2361
 
2362
static const uint64 float128QOut[ float128NumQOut ] = {
2363
    LIT64( 0x0000000000000000 ),        /* positive, subnormal          */
2364
    LIT64( 0x0001000000000000 ),        /* positive, -16382             */
2365
    LIT64( 0x0002000000000000 ),        /* positive, -16381             */
2366
    LIT64( 0x3BFE000000000000 ),        /* positive,  -1025             */
2367
    LIT64( 0x3BFF000000000000 ),        /* positive,  -1024             */
2368
    LIT64( 0x3C00000000000000 ),        /* positive,  -1023             */
2369
    LIT64( 0x3C01000000000000 ),        /* positive,  -1022             */
2370
    LIT64( 0x3F7E000000000000 ),        /* positive,   -129             */
2371
    LIT64( 0x3F7F000000000000 ),        /* positive,   -128             */
2372
    LIT64( 0x3F80000000000000 ),        /* positive,   -127             */
2373
    LIT64( 0x3F81000000000000 ),        /* positive,   -126             */
2374
    LIT64( 0x3F8E000000000000 ),        /* positive,   -113             */
2375
    LIT64( 0x3FFB000000000000 ),        /* positive,     -4             */
2376
    LIT64( 0x3FFC000000000000 ),        /* positive,     -3             */
2377
    LIT64( 0x3FFD000000000000 ),        /* positive,     -2             */
2378
    LIT64( 0x3FFE000000000000 ),        /* positive,     -1             */
2379
    LIT64( 0x3FFF000000000000 ),        /* positive,      0             */
2380
    LIT64( 0x4000000000000000 ),        /* positive,      1             */
2381
    LIT64( 0x4001000000000000 ),        /* positive,      2             */
2382
    LIT64( 0x4002000000000000 ),        /* positive,      3             */
2383
    LIT64( 0x4003000000000000 ),        /* positive,      4             */
2384
    LIT64( 0x401C000000000000 ),        /* positive,     29             */
2385
    LIT64( 0x401D000000000000 ),        /* positive,     30             */
2386
    LIT64( 0x401E000000000000 ),        /* positive,     31             */
2387
    LIT64( 0x401F000000000000 ),        /* positive,     32             */
2388
    LIT64( 0x403C000000000000 ),        /* positive,     61             */
2389
    LIT64( 0x403D000000000000 ),        /* positive,     62             */
2390
    LIT64( 0x403E000000000000 ),        /* positive,     63             */
2391
    LIT64( 0x403F000000000000 ),        /* positive,     64             */
2392
    LIT64( 0x4070000000000000 ),        /* positive,    113             */
2393
    LIT64( 0x407E000000000000 ),        /* positive,    127             */
2394
    LIT64( 0x407F000000000000 ),        /* positive,    128             */
2395
    LIT64( 0x4080000000000000 ),        /* positive,    129             */
2396
    LIT64( 0x43FE000000000000 ),        /* positive,   1023             */
2397
    LIT64( 0x43FF000000000000 ),        /* positive,   1024             */
2398
    LIT64( 0x4400000000000000 ),        /* positive,   1025             */
2399
    LIT64( 0x7FFD000000000000 ),        /* positive,  16382             */
2400
    LIT64( 0x7FFE000000000000 ),        /* positive,  16383             */
2401
    LIT64( 0x7FFF000000000000 ),        /* positive, infinity or NaN    */
2402
    LIT64( 0x8000000000000000 ),        /* negative, subnormal          */
2403
    LIT64( 0x8001000000000000 ),        /* negative, -16382             */
2404
    LIT64( 0x8002000000000000 ),        /* negative, -16381             */
2405
    LIT64( 0xBBFE000000000000 ),        /* negative,  -1025             */
2406
    LIT64( 0xBBFF000000000000 ),        /* negative,  -1024             */
2407
    LIT64( 0xBC00000000000000 ),        /* negative,  -1023             */
2408
    LIT64( 0xBC01000000000000 ),        /* negative,  -1022             */
2409
    LIT64( 0xBF7E000000000000 ),        /* negative,   -129             */
2410
    LIT64( 0xBF7F000000000000 ),        /* negative,   -128             */
2411
    LIT64( 0xBF80000000000000 ),        /* negative,   -127             */
2412
    LIT64( 0xBF81000000000000 ),        /* negative,   -126             */
2413
    LIT64( 0xBF8E000000000000 ),        /* negative,   -113             */
2414
    LIT64( 0xBFFB000000000000 ),        /* negative,     -4             */
2415
    LIT64( 0xBFFC000000000000 ),        /* negative,     -3             */
2416
    LIT64( 0xBFFD000000000000 ),        /* negative,     -2             */
2417
    LIT64( 0xBFFE000000000000 ),        /* negative,     -1             */
2418
    LIT64( 0xBFFF000000000000 ),        /* negative,      0             */
2419
    LIT64( 0xC000000000000000 ),        /* negative,      1             */
2420
    LIT64( 0xC001000000000000 ),        /* negative,      2             */
2421
    LIT64( 0xC002000000000000 ),        /* negative,      3             */
2422
    LIT64( 0xC003000000000000 ),        /* negative,      4             */
2423
    LIT64( 0xC01C000000000000 ),        /* negative,     29             */
2424
    LIT64( 0xC01D000000000000 ),        /* negative,     30             */
2425
    LIT64( 0xC01E000000000000 ),        /* negative,     31             */
2426
    LIT64( 0xC01F000000000000 ),        /* negative,     32             */
2427
    LIT64( 0xC03C000000000000 ),        /* negative,     61             */
2428
    LIT64( 0xC03D000000000000 ),        /* negative,     62             */
2429
    LIT64( 0xC03E000000000000 ),        /* negative,     63             */
2430
    LIT64( 0xC03F000000000000 ),        /* negative,     64             */
2431
    LIT64( 0xC070000000000000 ),        /* negative,    113             */
2432
    LIT64( 0xC07E000000000000 ),        /* negative,    127             */
2433
    LIT64( 0xC07F000000000000 ),        /* negative,    128             */
2434
    LIT64( 0xC080000000000000 ),        /* negative,    129             */
2435
    LIT64( 0xC3FE000000000000 ),        /* negative,   1023             */
2436
    LIT64( 0xC3FF000000000000 ),        /* negative,   1024             */
2437
    LIT64( 0xC400000000000000 ),        /* negative,   1025             */
2438
    LIT64( 0xFFFD000000000000 ),        /* negative,  16382             */
2439
    LIT64( 0xFFFE000000000000 ),        /* negative,  16383             */
2440
    LIT64( 0xFFFF000000000000 )         /* negative, infinity or NaN    */
2441
};
2442
 
2443
static const struct { bits64 high, low; } float128P1[ float128NumP1 ] = {
2444
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000000 ) },
2445
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000001 ) },
2446
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2447
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFE ) }
2448
};
2449
 
2450
static const struct { bits64 high, low; } float128P2[ float128NumP2 ] = {
2451
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000000 ) },
2452
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000001 ) },
2453
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000002 ) },
2454
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000004 ) },
2455
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000008 ) },
2456
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000010 ) },
2457
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000020 ) },
2458
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000040 ) },
2459
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000080 ) },
2460
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000100 ) },
2461
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000200 ) },
2462
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000400 ) },
2463
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000800 ) },
2464
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000001000 ) },
2465
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000002000 ) },
2466
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000004000 ) },
2467
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000008000 ) },
2468
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000010000 ) },
2469
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000020000 ) },
2470
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000040000 ) },
2471
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000080000 ) },
2472
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000100000 ) },
2473
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000200000 ) },
2474
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000400000 ) },
2475
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000800000 ) },
2476
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000001000000 ) },
2477
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000002000000 ) },
2478
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000004000000 ) },
2479
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000008000000 ) },
2480
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000010000000 ) },
2481
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000020000000 ) },
2482
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000040000000 ) },
2483
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000080000000 ) },
2484
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000100000000 ) },
2485
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000200000000 ) },
2486
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000400000000 ) },
2487
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000800000000 ) },
2488
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000001000000000 ) },
2489
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000002000000000 ) },
2490
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000004000000000 ) },
2491
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000008000000000 ) },
2492
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000010000000000 ) },
2493
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000020000000000 ) },
2494
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000040000000000 ) },
2495
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000080000000000 ) },
2496
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000100000000000 ) },
2497
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000200000000000 ) },
2498
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000400000000000 ) },
2499
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000800000000000 ) },
2500
    { LIT64( 0x0000000000000000 ), LIT64( 0x0001000000000000 ) },
2501
    { LIT64( 0x0000000000000000 ), LIT64( 0x0002000000000000 ) },
2502
    { LIT64( 0x0000000000000000 ), LIT64( 0x0004000000000000 ) },
2503
    { LIT64( 0x0000000000000000 ), LIT64( 0x0008000000000000 ) },
2504
    { LIT64( 0x0000000000000000 ), LIT64( 0x0010000000000000 ) },
2505
    { LIT64( 0x0000000000000000 ), LIT64( 0x0020000000000000 ) },
2506
    { LIT64( 0x0000000000000000 ), LIT64( 0x0040000000000000 ) },
2507
    { LIT64( 0x0000000000000000 ), LIT64( 0x0080000000000000 ) },
2508
    { LIT64( 0x0000000000000000 ), LIT64( 0x0100000000000000 ) },
2509
    { LIT64( 0x0000000000000000 ), LIT64( 0x0200000000000000 ) },
2510
    { LIT64( 0x0000000000000000 ), LIT64( 0x0400000000000000 ) },
2511
    { LIT64( 0x0000000000000000 ), LIT64( 0x0800000000000000 ) },
2512
    { LIT64( 0x0000000000000000 ), LIT64( 0x1000000000000000 ) },
2513
    { LIT64( 0x0000000000000000 ), LIT64( 0x2000000000000000 ) },
2514
    { LIT64( 0x0000000000000000 ), LIT64( 0x4000000000000000 ) },
2515
    { LIT64( 0x0000000000000000 ), LIT64( 0x8000000000000000 ) },
2516
    { LIT64( 0x0000000000000001 ), LIT64( 0x0000000000000000 ) },
2517
    { LIT64( 0x0000000000000002 ), LIT64( 0x0000000000000000 ) },
2518
    { LIT64( 0x0000000000000004 ), LIT64( 0x0000000000000000 ) },
2519
    { LIT64( 0x0000000000000008 ), LIT64( 0x0000000000000000 ) },
2520
    { LIT64( 0x0000000000000010 ), LIT64( 0x0000000000000000 ) },
2521
    { LIT64( 0x0000000000000020 ), LIT64( 0x0000000000000000 ) },
2522
    { LIT64( 0x0000000000000040 ), LIT64( 0x0000000000000000 ) },
2523
    { LIT64( 0x0000000000000080 ), LIT64( 0x0000000000000000 ) },
2524
    { LIT64( 0x0000000000000100 ), LIT64( 0x0000000000000000 ) },
2525
    { LIT64( 0x0000000000000200 ), LIT64( 0x0000000000000000 ) },
2526
    { LIT64( 0x0000000000000400 ), LIT64( 0x0000000000000000 ) },
2527
    { LIT64( 0x0000000000000800 ), LIT64( 0x0000000000000000 ) },
2528
    { LIT64( 0x0000000000001000 ), LIT64( 0x0000000000000000 ) },
2529
    { LIT64( 0x0000000000002000 ), LIT64( 0x0000000000000000 ) },
2530
    { LIT64( 0x0000000000004000 ), LIT64( 0x0000000000000000 ) },
2531
    { LIT64( 0x0000000000008000 ), LIT64( 0x0000000000000000 ) },
2532
    { LIT64( 0x0000000000010000 ), LIT64( 0x0000000000000000 ) },
2533
    { LIT64( 0x0000000000020000 ), LIT64( 0x0000000000000000 ) },
2534
    { LIT64( 0x0000000000040000 ), LIT64( 0x0000000000000000 ) },
2535
    { LIT64( 0x0000000000080000 ), LIT64( 0x0000000000000000 ) },
2536
    { LIT64( 0x0000000000100000 ), LIT64( 0x0000000000000000 ) },
2537
    { LIT64( 0x0000000000200000 ), LIT64( 0x0000000000000000 ) },
2538
    { LIT64( 0x0000000000400000 ), LIT64( 0x0000000000000000 ) },
2539
    { LIT64( 0x0000000000800000 ), LIT64( 0x0000000000000000 ) },
2540
    { LIT64( 0x0000000001000000 ), LIT64( 0x0000000000000000 ) },
2541
    { LIT64( 0x0000000002000000 ), LIT64( 0x0000000000000000 ) },
2542
    { LIT64( 0x0000000004000000 ), LIT64( 0x0000000000000000 ) },
2543
    { LIT64( 0x0000000008000000 ), LIT64( 0x0000000000000000 ) },
2544
    { LIT64( 0x0000000010000000 ), LIT64( 0x0000000000000000 ) },
2545
    { LIT64( 0x0000000020000000 ), LIT64( 0x0000000000000000 ) },
2546
    { LIT64( 0x0000000040000000 ), LIT64( 0x0000000000000000 ) },
2547
    { LIT64( 0x0000000080000000 ), LIT64( 0x0000000000000000 ) },
2548
    { LIT64( 0x0000000100000000 ), LIT64( 0x0000000000000000 ) },
2549
    { LIT64( 0x0000000200000000 ), LIT64( 0x0000000000000000 ) },
2550
    { LIT64( 0x0000000400000000 ), LIT64( 0x0000000000000000 ) },
2551
    { LIT64( 0x0000000800000000 ), LIT64( 0x0000000000000000 ) },
2552
    { LIT64( 0x0000001000000000 ), LIT64( 0x0000000000000000 ) },
2553
    { LIT64( 0x0000002000000000 ), LIT64( 0x0000000000000000 ) },
2554
    { LIT64( 0x0000004000000000 ), LIT64( 0x0000000000000000 ) },
2555
    { LIT64( 0x0000008000000000 ), LIT64( 0x0000000000000000 ) },
2556
    { LIT64( 0x0000010000000000 ), LIT64( 0x0000000000000000 ) },
2557
    { LIT64( 0x0000020000000000 ), LIT64( 0x0000000000000000 ) },
2558
    { LIT64( 0x0000040000000000 ), LIT64( 0x0000000000000000 ) },
2559
    { LIT64( 0x0000080000000000 ), LIT64( 0x0000000000000000 ) },
2560
    { LIT64( 0x0000100000000000 ), LIT64( 0x0000000000000000 ) },
2561
    { LIT64( 0x0000200000000000 ), LIT64( 0x0000000000000000 ) },
2562
    { LIT64( 0x0000400000000000 ), LIT64( 0x0000000000000000 ) },
2563
    { LIT64( 0x0000800000000000 ), LIT64( 0x0000000000000000 ) },
2564
    { LIT64( 0x0000C00000000000 ), LIT64( 0x0000000000000000 ) },
2565
    { LIT64( 0x0000E00000000000 ), LIT64( 0x0000000000000000 ) },
2566
    { LIT64( 0x0000F00000000000 ), LIT64( 0x0000000000000000 ) },
2567
    { LIT64( 0x0000F80000000000 ), LIT64( 0x0000000000000000 ) },
2568
    { LIT64( 0x0000FC0000000000 ), LIT64( 0x0000000000000000 ) },
2569
    { LIT64( 0x0000FE0000000000 ), LIT64( 0x0000000000000000 ) },
2570
    { LIT64( 0x0000FF0000000000 ), LIT64( 0x0000000000000000 ) },
2571
    { LIT64( 0x0000FF8000000000 ), LIT64( 0x0000000000000000 ) },
2572
    { LIT64( 0x0000FFC000000000 ), LIT64( 0x0000000000000000 ) },
2573
    { LIT64( 0x0000FFE000000000 ), LIT64( 0x0000000000000000 ) },
2574
    { LIT64( 0x0000FFF000000000 ), LIT64( 0x0000000000000000 ) },
2575
    { LIT64( 0x0000FFF800000000 ), LIT64( 0x0000000000000000 ) },
2576
    { LIT64( 0x0000FFFC00000000 ), LIT64( 0x0000000000000000 ) },
2577
    { LIT64( 0x0000FFFE00000000 ), LIT64( 0x0000000000000000 ) },
2578
    { LIT64( 0x0000FFFF00000000 ), LIT64( 0x0000000000000000 ) },
2579
    { LIT64( 0x0000FFFF80000000 ), LIT64( 0x0000000000000000 ) },
2580
    { LIT64( 0x0000FFFFC0000000 ), LIT64( 0x0000000000000000 ) },
2581
    { LIT64( 0x0000FFFFE0000000 ), LIT64( 0x0000000000000000 ) },
2582
    { LIT64( 0x0000FFFFF0000000 ), LIT64( 0x0000000000000000 ) },
2583
    { LIT64( 0x0000FFFFF8000000 ), LIT64( 0x0000000000000000 ) },
2584
    { LIT64( 0x0000FFFFFC000000 ), LIT64( 0x0000000000000000 ) },
2585
    { LIT64( 0x0000FFFFFE000000 ), LIT64( 0x0000000000000000 ) },
2586
    { LIT64( 0x0000FFFFFF000000 ), LIT64( 0x0000000000000000 ) },
2587
    { LIT64( 0x0000FFFFFF800000 ), LIT64( 0x0000000000000000 ) },
2588
    { LIT64( 0x0000FFFFFFC00000 ), LIT64( 0x0000000000000000 ) },
2589
    { LIT64( 0x0000FFFFFFE00000 ), LIT64( 0x0000000000000000 ) },
2590
    { LIT64( 0x0000FFFFFFF00000 ), LIT64( 0x0000000000000000 ) },
2591
    { LIT64( 0x0000FFFFFFF80000 ), LIT64( 0x0000000000000000 ) },
2592
    { LIT64( 0x0000FFFFFFFC0000 ), LIT64( 0x0000000000000000 ) },
2593
    { LIT64( 0x0000FFFFFFFE0000 ), LIT64( 0x0000000000000000 ) },
2594
    { LIT64( 0x0000FFFFFFFF0000 ), LIT64( 0x0000000000000000 ) },
2595
    { LIT64( 0x0000FFFFFFFF8000 ), LIT64( 0x0000000000000000 ) },
2596
    { LIT64( 0x0000FFFFFFFFC000 ), LIT64( 0x0000000000000000 ) },
2597
    { LIT64( 0x0000FFFFFFFFE000 ), LIT64( 0x0000000000000000 ) },
2598
    { LIT64( 0x0000FFFFFFFFF000 ), LIT64( 0x0000000000000000 ) },
2599
    { LIT64( 0x0000FFFFFFFFF800 ), LIT64( 0x0000000000000000 ) },
2600
    { LIT64( 0x0000FFFFFFFFFC00 ), LIT64( 0x0000000000000000 ) },
2601
    { LIT64( 0x0000FFFFFFFFFE00 ), LIT64( 0x0000000000000000 ) },
2602
    { LIT64( 0x0000FFFFFFFFFF00 ), LIT64( 0x0000000000000000 ) },
2603
    { LIT64( 0x0000FFFFFFFFFF80 ), LIT64( 0x0000000000000000 ) },
2604
    { LIT64( 0x0000FFFFFFFFFFC0 ), LIT64( 0x0000000000000000 ) },
2605
    { LIT64( 0x0000FFFFFFFFFFE0 ), LIT64( 0x0000000000000000 ) },
2606
    { LIT64( 0x0000FFFFFFFFFFF0 ), LIT64( 0x0000000000000000 ) },
2607
    { LIT64( 0x0000FFFFFFFFFFF8 ), LIT64( 0x0000000000000000 ) },
2608
    { LIT64( 0x0000FFFFFFFFFFFC ), LIT64( 0x0000000000000000 ) },
2609
    { LIT64( 0x0000FFFFFFFFFFFE ), LIT64( 0x0000000000000000 ) },
2610
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0x0000000000000000 ) },
2611
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0x8000000000000000 ) },
2612
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xC000000000000000 ) },
2613
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xE000000000000000 ) },
2614
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xF000000000000000 ) },
2615
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xF800000000000000 ) },
2616
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFC00000000000000 ) },
2617
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFE00000000000000 ) },
2618
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFF00000000000000 ) },
2619
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFF80000000000000 ) },
2620
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFC0000000000000 ) },
2621
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFE0000000000000 ) },
2622
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFF0000000000000 ) },
2623
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFF8000000000000 ) },
2624
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFC000000000000 ) },
2625
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFE000000000000 ) },
2626
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFF000000000000 ) },
2627
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFF800000000000 ) },
2628
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFC00000000000 ) },
2629
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFE00000000000 ) },
2630
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFF00000000000 ) },
2631
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFF80000000000 ) },
2632
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFC0000000000 ) },
2633
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFE0000000000 ) },
2634
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFF0000000000 ) },
2635
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFF8000000000 ) },
2636
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFC000000000 ) },
2637
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFE000000000 ) },
2638
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFF000000000 ) },
2639
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFF800000000 ) },
2640
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFC00000000 ) },
2641
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFE00000000 ) },
2642
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFF00000000 ) },
2643
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFF80000000 ) },
2644
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFC0000000 ) },
2645
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFE0000000 ) },
2646
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFF0000000 ) },
2647
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFF8000000 ) },
2648
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFC000000 ) },
2649
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFE000000 ) },
2650
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFF000000 ) },
2651
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFF800000 ) },
2652
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFC00000 ) },
2653
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFE00000 ) },
2654
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFF00000 ) },
2655
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFF80000 ) },
2656
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFC0000 ) },
2657
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFE0000 ) },
2658
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFF0000 ) },
2659
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFF8000 ) },
2660
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFC000 ) },
2661
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFE000 ) },
2662
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFF000 ) },
2663
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFF800 ) },
2664
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFC00 ) },
2665
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFE00 ) },
2666
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFF00 ) },
2667
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFF80 ) },
2668
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFC0 ) },
2669
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFE0 ) },
2670
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFF0 ) },
2671
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFF8 ) },
2672
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFC ) },
2673
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFE ) },
2674
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2675
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFD ) },
2676
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFB ) },
2677
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFF7 ) },
2678
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFEF ) },
2679
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFDF ) },
2680
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFBF ) },
2681
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFF7F ) },
2682
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFEFF ) },
2683
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFDFF ) },
2684
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFBFF ) },
2685
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFF7FF ) },
2686
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFEFFF ) },
2687
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFDFFF ) },
2688
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFBFFF ) },
2689
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFF7FFF ) },
2690
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFEFFFF ) },
2691
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFDFFFF ) },
2692
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFBFFFF ) },
2693
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFF7FFFF ) },
2694
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFEFFFFF ) },
2695
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFDFFFFF ) },
2696
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFBFFFFF ) },
2697
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFF7FFFFF ) },
2698
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFEFFFFFF ) },
2699
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFDFFFFFF ) },
2700
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFBFFFFFF ) },
2701
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFF7FFFFFF ) },
2702
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFEFFFFFFF ) },
2703
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFDFFFFFFF ) },
2704
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFFBFFFFFFF ) },
2705
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFF7FFFFFFF ) },
2706
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFEFFFFFFFF ) },
2707
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFDFFFFFFFF ) },
2708
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFFBFFFFFFFF ) },
2709
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFF7FFFFFFFF ) },
2710
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFEFFFFFFFFF ) },
2711
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFDFFFFFFFFF ) },
2712
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFFBFFFFFFFFF ) },
2713
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFF7FFFFFFFFF ) },
2714
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFEFFFFFFFFFF ) },
2715
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFDFFFFFFFFFF ) },
2716
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFFBFFFFFFFFFF ) },
2717
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFF7FFFFFFFFFF ) },
2718
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFEFFFFFFFFFFF ) },
2719
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFDFFFFFFFFFFF ) },
2720
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFFBFFFFFFFFFFF ) },
2721
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFF7FFFFFFFFFFF ) },
2722
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFEFFFFFFFFFFFF ) },
2723
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFDFFFFFFFFFFFF ) },
2724
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFFBFFFFFFFFFFFF ) },
2725
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFF7FFFFFFFFFFFF ) },
2726
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFEFFFFFFFFFFFFF ) },
2727
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFDFFFFFFFFFFFFF ) },
2728
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFFBFFFFFFFFFFFFF ) },
2729
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFF7FFFFFFFFFFFFF ) },
2730
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFEFFFFFFFFFFFFFF ) },
2731
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFDFFFFFFFFFFFFFF ) },
2732
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xFBFFFFFFFFFFFFFF ) },
2733
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xF7FFFFFFFFFFFFFF ) },
2734
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xEFFFFFFFFFFFFFFF ) },
2735
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xDFFFFFFFFFFFFFFF ) },
2736
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0xBFFFFFFFFFFFFFFF ) },
2737
    { LIT64( 0x0000FFFFFFFFFFFF ), LIT64( 0x7FFFFFFFFFFFFFFF ) },
2738
    { LIT64( 0x0000FFFFFFFFFFFD ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2739
    { LIT64( 0x0000FFFFFFFFFFFB ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2740
    { LIT64( 0x0000FFFFFFFFFFF7 ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2741
    { LIT64( 0x0000FFFFFFFFFFEF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2742
    { LIT64( 0x0000FFFFFFFFFFDF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2743
    { LIT64( 0x0000FFFFFFFFFFBF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2744
    { LIT64( 0x0000FFFFFFFFFF7F ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2745
    { LIT64( 0x0000FFFFFFFFFEFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2746
    { LIT64( 0x0000FFFFFFFFFDFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2747
    { LIT64( 0x0000FFFFFFFFFBFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2748
    { LIT64( 0x0000FFFFFFFFF7FF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2749
    { LIT64( 0x0000FFFFFFFFEFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2750
    { LIT64( 0x0000FFFFFFFFDFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2751
    { LIT64( 0x0000FFFFFFFFBFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2752
    { LIT64( 0x0000FFFFFFFF7FFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2753
    { LIT64( 0x0000FFFFFFFEFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2754
    { LIT64( 0x0000FFFFFFFDFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2755
    { LIT64( 0x0000FFFFFFFBFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2756
    { LIT64( 0x0000FFFFFFF7FFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2757
    { LIT64( 0x0000FFFFFFEFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2758
    { LIT64( 0x0000FFFFFFDFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2759
    { LIT64( 0x0000FFFFFFBFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2760
    { LIT64( 0x0000FFFFFF7FFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2761
    { LIT64( 0x0000FFFFFEFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2762
    { LIT64( 0x0000FFFFFDFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2763
    { LIT64( 0x0000FFFFFBFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2764
    { LIT64( 0x0000FFFFF7FFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2765
    { LIT64( 0x0000FFFFEFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2766
    { LIT64( 0x0000FFFFDFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2767
    { LIT64( 0x0000FFFFBFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2768
    { LIT64( 0x0000FFFF7FFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2769
    { LIT64( 0x0000FFFEFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2770
    { LIT64( 0x0000FFFDFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2771
    { LIT64( 0x0000FFFBFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2772
    { LIT64( 0x0000FFF7FFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2773
    { LIT64( 0x0000FFEFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2774
    { LIT64( 0x0000FFDFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2775
    { LIT64( 0x0000FFBFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2776
    { LIT64( 0x0000FF7FFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2777
    { LIT64( 0x0000FEFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2778
    { LIT64( 0x0000FDFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2779
    { LIT64( 0x0000FBFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2780
    { LIT64( 0x0000F7FFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2781
    { LIT64( 0x0000EFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2782
    { LIT64( 0x0000DFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2783
    { LIT64( 0x0000BFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2784
    { LIT64( 0x00007FFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2785
    { LIT64( 0x00003FFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2786
    { LIT64( 0x00001FFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2787
    { LIT64( 0x00000FFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2788
    { LIT64( 0x000007FFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2789
    { LIT64( 0x000003FFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2790
    { LIT64( 0x000001FFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2791
    { LIT64( 0x000000FFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2792
    { LIT64( 0x0000007FFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2793
    { LIT64( 0x0000003FFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2794
    { LIT64( 0x0000001FFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2795
    { LIT64( 0x0000000FFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2796
    { LIT64( 0x00000007FFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2797
    { LIT64( 0x00000003FFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2798
    { LIT64( 0x00000001FFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2799
    { LIT64( 0x00000000FFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2800
    { LIT64( 0x000000007FFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2801
    { LIT64( 0x000000003FFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2802
    { LIT64( 0x000000001FFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2803
    { LIT64( 0x000000000FFFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2804
    { LIT64( 0x0000000007FFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2805
    { LIT64( 0x0000000003FFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2806
    { LIT64( 0x0000000001FFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2807
    { LIT64( 0x0000000000FFFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2808
    { LIT64( 0x00000000007FFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2809
    { LIT64( 0x00000000003FFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2810
    { LIT64( 0x00000000001FFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2811
    { LIT64( 0x00000000000FFFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2812
    { LIT64( 0x000000000007FFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2813
    { LIT64( 0x000000000003FFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2814
    { LIT64( 0x000000000001FFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2815
    { LIT64( 0x000000000000FFFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2816
    { LIT64( 0x0000000000007FFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2817
    { LIT64( 0x0000000000003FFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2818
    { LIT64( 0x0000000000001FFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2819
    { LIT64( 0x0000000000000FFF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2820
    { LIT64( 0x00000000000007FF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2821
    { LIT64( 0x00000000000003FF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2822
    { LIT64( 0x00000000000001FF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2823
    { LIT64( 0x00000000000000FF ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2824
    { LIT64( 0x000000000000007F ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2825
    { LIT64( 0x000000000000003F ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2826
    { LIT64( 0x000000000000001F ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2827
    { LIT64( 0x000000000000000F ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2828
    { LIT64( 0x0000000000000007 ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2829
    { LIT64( 0x0000000000000003 ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2830
    { LIT64( 0x0000000000000001 ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2831
    { LIT64( 0x0000000000000000 ), LIT64( 0xFFFFFFFFFFFFFFFF ) },
2832
    { LIT64( 0x0000000000000000 ), LIT64( 0x7FFFFFFFFFFFFFFF ) },
2833
    { LIT64( 0x0000000000000000 ), LIT64( 0x3FFFFFFFFFFFFFFF ) },
2834
    { LIT64( 0x0000000000000000 ), LIT64( 0x1FFFFFFFFFFFFFFF ) },
2835
    { LIT64( 0x0000000000000000 ), LIT64( 0x0FFFFFFFFFFFFFFF ) },
2836
    { LIT64( 0x0000000000000000 ), LIT64( 0x07FFFFFFFFFFFFFF ) },
2837
    { LIT64( 0x0000000000000000 ), LIT64( 0x03FFFFFFFFFFFFFF ) },
2838
    { LIT64( 0x0000000000000000 ), LIT64( 0x01FFFFFFFFFFFFFF ) },
2839
    { LIT64( 0x0000000000000000 ), LIT64( 0x00FFFFFFFFFFFFFF ) },
2840
    { LIT64( 0x0000000000000000 ), LIT64( 0x007FFFFFFFFFFFFF ) },
2841
    { LIT64( 0x0000000000000000 ), LIT64( 0x003FFFFFFFFFFFFF ) },
2842
    { LIT64( 0x0000000000000000 ), LIT64( 0x001FFFFFFFFFFFFF ) },
2843
    { LIT64( 0x0000000000000000 ), LIT64( 0x000FFFFFFFFFFFFF ) },
2844
    { LIT64( 0x0000000000000000 ), LIT64( 0x0007FFFFFFFFFFFF ) },
2845
    { LIT64( 0x0000000000000000 ), LIT64( 0x0003FFFFFFFFFFFF ) },
2846
    { LIT64( 0x0000000000000000 ), LIT64( 0x0001FFFFFFFFFFFF ) },
2847
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000FFFFFFFFFFFF ) },
2848
    { LIT64( 0x0000000000000000 ), LIT64( 0x00007FFFFFFFFFFF ) },
2849
    { LIT64( 0x0000000000000000 ), LIT64( 0x00003FFFFFFFFFFF ) },
2850
    { LIT64( 0x0000000000000000 ), LIT64( 0x00001FFFFFFFFFFF ) },
2851
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000FFFFFFFFFFF ) },
2852
    { LIT64( 0x0000000000000000 ), LIT64( 0x000007FFFFFFFFFF ) },
2853
    { LIT64( 0x0000000000000000 ), LIT64( 0x000003FFFFFFFFFF ) },
2854
    { LIT64( 0x0000000000000000 ), LIT64( 0x000001FFFFFFFFFF ) },
2855
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000FFFFFFFFFF ) },
2856
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000007FFFFFFFFF ) },
2857
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000003FFFFFFFFF ) },
2858
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000001FFFFFFFFF ) },
2859
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000FFFFFFFFF ) },
2860
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000007FFFFFFFF ) },
2861
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000003FFFFFFFF ) },
2862
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000001FFFFFFFF ) },
2863
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000FFFFFFFF ) },
2864
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000007FFFFFFF ) },
2865
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000003FFFFFFF ) },
2866
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000001FFFFFFF ) },
2867
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000FFFFFFF ) },
2868
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000007FFFFFF ) },
2869
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000003FFFFFF ) },
2870
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000001FFFFFF ) },
2871
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000FFFFFF ) },
2872
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000007FFFFF ) },
2873
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000003FFFFF ) },
2874
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000001FFFFF ) },
2875
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000000FFFFF ) },
2876
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000007FFFF ) },
2877
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000003FFFF ) },
2878
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000001FFFF ) },
2879
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000000FFFF ) },
2880
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000007FFF ) },
2881
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000003FFF ) },
2882
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000001FFF ) },
2883
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000FFF ) },
2884
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000000007FF ) },
2885
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000000003FF ) },
2886
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000000001FF ) },
2887
    { LIT64( 0x0000000000000000 ), LIT64( 0x00000000000000FF ) },
2888
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000000007F ) },
2889
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000000003F ) },
2890
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000000001F ) },
2891
    { LIT64( 0x0000000000000000 ), LIT64( 0x000000000000000F ) },
2892
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000007 ) },
2893
    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000003 ) }
2894
};
2895
 
2896
static const uint32 float128NumQInP1 = float128NumQIn * float128NumP1;
2897
static const uint32 float128NumQOutP1 = float128NumQOut * float128NumP1;
2898
 
2899
static float128 float128NextQInP1( sequenceT *sequencePtr )
2900
{
2901
    int16 expNum, sigNum;
2902
    float128 z;
2903
 
2904
    sigNum = sequencePtr->term1Num;
2905
    expNum = sequencePtr->expNum;
2906
    z.low = float128P1[ sigNum ].low;
2907
    z.high = float128QIn[ expNum ] | float128P1[ sigNum ].high;
2908
    ++sigNum;
2909
    if ( float128NumP1 <= sigNum ) {
2910
        sigNum = 0;
2911
        ++expNum;
2912
        if ( float128NumQIn <= expNum ) {
2913
            expNum = 0;
2914
            sequencePtr->done = TRUE;
2915
        }
2916
        sequencePtr->expNum = expNum;
2917
    }
2918
    sequencePtr->term1Num = sigNum;
2919
    return z;
2920
 
2921
}
2922
 
2923
static float128 float128NextQOutP1( sequenceT *sequencePtr )
2924
{
2925
    int16 expNum, sigNum;
2926
    float128 z;
2927
 
2928
    sigNum = sequencePtr->term1Num;
2929
    expNum = sequencePtr->expNum;
2930
    z.low = float128P1[ sigNum ].low;
2931
    z.high = float128QOut[ expNum ] | float128P1[ sigNum ].high;
2932
    ++sigNum;
2933
    if ( float128NumP1 <= sigNum ) {
2934
        sigNum = 0;
2935
        ++expNum;
2936
        if ( float128NumQOut <= expNum ) {
2937
            expNum = 0;
2938
            sequencePtr->done = TRUE;
2939
        }
2940
        sequencePtr->expNum = expNum;
2941
    }
2942
    sequencePtr->term1Num = sigNum;
2943
    return z;
2944
 
2945
}
2946
 
2947
static const uint32 float128NumQInP2 = float128NumQIn * float128NumP2;
2948
static const uint32 float128NumQOutP2 = float128NumQOut * float128NumP2;
2949
 
2950
static float128 float128NextQInP2( sequenceT *sequencePtr )
2951
{
2952
    int16 expNum, sigNum;
2953
    float128 z;
2954
 
2955
    sigNum = sequencePtr->term1Num;
2956
    expNum = sequencePtr->expNum;
2957
    z.low = float128P2[ sigNum ].low;
2958
    z.high = float128QIn[ expNum ] | float128P2[ sigNum ].high;
2959
    ++sigNum;
2960
    if ( float128NumP2 <= sigNum ) {
2961
        sigNum = 0;
2962
        ++expNum;
2963
        if ( float128NumQIn <= expNum ) {
2964
            expNum = 0;
2965
            sequencePtr->done = TRUE;
2966
        }
2967
        sequencePtr->expNum = expNum;
2968
    }
2969
    sequencePtr->term1Num = sigNum;
2970
    return z;
2971
 
2972
}
2973
 
2974
static float128 float128NextQOutP2( sequenceT *sequencePtr )
2975
{
2976
    int16 expNum, sigNum;
2977
    float128 z;
2978
 
2979
    sigNum = sequencePtr->term1Num;
2980
    expNum = sequencePtr->expNum;
2981
    z.low = float128P2[ sigNum ].low;
2982
    z.high = float128QOut[ expNum ] | float128P2[ sigNum ].high;
2983
    ++sigNum;
2984
    if ( float128NumP2 <= sigNum ) {
2985
        sigNum = 0;
2986
        ++expNum;
2987
        if ( float128NumQOut <= expNum ) {
2988
            expNum = 0;
2989
            sequencePtr->done = TRUE;
2990
        }
2991
        sequencePtr->expNum = expNum;
2992
    }
2993
    sequencePtr->term1Num = sigNum;
2994
    return z;
2995
 
2996
}
2997
 
2998
static float128 float128RandomQOutP3( void )
2999
{
3000
    int16 sigNum1, sigNum2;
3001
    uint64 sig1Low, sig2Low;
3002
    float128 z;
3003
 
3004
    sigNum1 = randomUint8() % float128NumP2;
3005
    sigNum2 = randomUint8() % float128NumP2;
3006
    sig1Low = float128P2[ sigNum1 ].low;
3007
    sig2Low = float128P2[ sigNum2 ].low;
3008
    z.low = sig1Low + sig2Low;
3009
    z.high =
3010
          float128QOut[ randomUint8() % float128NumQOut ]
3011
        | (   (   float128P2[ sigNum1 ].high
3012
                + float128P2[ sigNum2 ].high
3013
                + ( z.low < sig1Low )
3014
              )
3015
            & LIT64( 0x0000FFFFFFFFFFFF )
3016
          );
3017
    return z;
3018
 
3019
}
3020
 
3021
static float128 float128RandomQOutPInf( void )
3022
{
3023
    float128 z;
3024
 
3025
    z.low = randomUint64();
3026
    z.high =
3027
          float128QOut[ randomUint8() % float128NumQOut ]
3028
        | ( randomUint64() & LIT64( 0x0000FFFFFFFFFFFF ) );
3029
    return z;
3030
 
3031
}
3032
 
3033
enum {
3034
    float128NumQInfWeightMasks = 14
3035
};
3036
 
3037
static const uint64 float128QInfWeightMasks[ float128NumQInfWeightMasks ] = {
3038
    LIT64( 0x7FFF000000000000 ),
3039
    LIT64( 0x7FFF000000000000 ),
3040
    LIT64( 0x3FFF000000000000 ),
3041
    LIT64( 0x1FFF000000000000 ),
3042
    LIT64( 0x07FF000000000000 ),
3043
    LIT64( 0x07FF000000000000 ),
3044
    LIT64( 0x03FF000000000000 ),
3045
    LIT64( 0x01FF000000000000 ),
3046
    LIT64( 0x00FF000000000000 ),
3047
    LIT64( 0x007F000000000000 ),
3048
    LIT64( 0x003F000000000000 ),
3049
    LIT64( 0x001F000000000000 ),
3050
    LIT64( 0x000F000000000000 ),
3051
    LIT64( 0x0007000000000000 )
3052
};
3053
 
3054
static const uint64 float128QInfWeightOffsets[ float128NumQInfWeightMasks ] = {
3055
    LIT64( 0x0000000000000000 ),
3056
    LIT64( 0x0000000000000000 ),
3057
    LIT64( 0x2000000000000000 ),
3058
    LIT64( 0x3000000000000000 ),
3059
    LIT64( 0x3800000000000000 ),
3060
    LIT64( 0x3C00000000000000 ),
3061
    LIT64( 0x3E00000000000000 ),
3062
    LIT64( 0x3F00000000000000 ),
3063
    LIT64( 0x3F80000000000000 ),
3064
    LIT64( 0x3FC0000000000000 ),
3065
    LIT64( 0x3FE0000000000000 ),
3066
    LIT64( 0x3FF0000000000000 ),
3067
    LIT64( 0x3FF8000000000000 ),
3068
    LIT64( 0x3FFC000000000000 )
3069
};
3070
 
3071
static float128 float128RandomQInfP3( void )
3072
{
3073
    int16 sigNum1, sigNum2;
3074
    uint64 sig1Low, sig2Low;
3075
    int8 weightMaskNum;
3076
    float128 z;
3077
 
3078
    sigNum1 = randomUint8() % float128NumP2;
3079
    sigNum2 = randomUint8() % float128NumP2;
3080
    sig1Low = float128P2[ sigNum1 ].low;
3081
    sig2Low = float128P2[ sigNum2 ].low;
3082
    z.low = sig1Low + sig2Low;
3083
    weightMaskNum = randomUint8() % float128NumQInfWeightMasks;
3084
    z.high =
3085
          ( ( (uint64) ( randomUint8() & 1 ) )<<63 )
3086
        | (   (   ( ( (uint64) randomUint16() )<<48 )
3087
                & float128QInfWeightMasks[ weightMaskNum ] )
3088
            + float128QInfWeightOffsets[ weightMaskNum ]
3089
          )
3090
        | (   (   float128P2[ sigNum1 ].high
3091
                + float128P2[ sigNum2 ].high
3092
                + ( z.low < sig1Low )
3093
              )
3094
            & LIT64( 0x0000FFFFFFFFFFFF )
3095
          );
3096
    return z;
3097
 
3098
}
3099
 
3100
static float128 float128RandomQInfPInf( void )
3101
{
3102
    int8 weightMaskNum;
3103
    float128 z;
3104
 
3105
    weightMaskNum = randomUint8() % float128NumQInfWeightMasks;
3106
    z.low = randomUint64();
3107
    z.high =
3108
          ( ( (uint64) ( randomUint8() & 1 ) )<<63 )
3109
        | (   (   ( ( (uint64) randomUint16() )<<48 )
3110
                & float128QInfWeightMasks[ weightMaskNum ] )
3111
            + float128QInfWeightOffsets[ weightMaskNum ]
3112
          )
3113
        | ( randomUint64() & LIT64( 0x0000FFFFFFFFFFFF ) );
3114
    return z;
3115
 
3116
}
3117
 
3118
static float128 float128Random( void )
3119
{
3120
 
3121
    switch ( randomUint8() & 7 ) {
3122
     case 0:
3123
     case 1:
3124
     case 2:
3125
        return float128RandomQOutP3();
3126
     case 3:
3127
        return float128RandomQOutPInf();
3128
     case 4:
3129
     case 5:
3130
     case 6:
3131
        return float128RandomQInfP3();
3132
     case 7:
3133
        return float128RandomQInfPInf();
3134
    }
3135
 
3136
}
3137
 
3138
#endif
3139
 
3140
static int8 level = 0;
3141
 
3142
void testCases_setLevel( int8 levelIn )
3143
{
3144
 
3145
    if ( ( levelIn < 1 ) || ( 2 < levelIn ) ) {
3146
        fail( "Invalid testing level: %d", levelIn );
3147
    }
3148
    level = levelIn;
3149
 
3150
}
3151
 
3152
static int8 sequenceType;
3153
static sequenceT sequenceA, sequenceB;
3154
static int8 subcase;
3155
 
3156
uint32 testCases_total;
3157
flag testCases_done;
3158
 
3159
static float32 current_a_float32;
3160
static float32 current_b_float32;
3161
static float64 current_a_float64;
3162
static float64 current_b_float64;
3163
#ifdef FLOATX80
3164
static floatx80 current_a_floatx80;
3165
static floatx80 current_b_floatx80;
3166
#endif
3167
#ifdef FLOAT128
3168
static float128 current_a_float128;
3169
static float128 current_b_float128;
3170
#endif
3171
 
3172
void testCases_initSequence( int8 sequenceTypeIn )
3173
{
3174
 
3175
    sequenceType = sequenceTypeIn;
3176
    sequenceA.term2Num = 0;
3177
    sequenceA.term1Num = 0;
3178
    sequenceA.expNum = 0;
3179
    sequenceA.done = FALSE;
3180
    sequenceB.term2Num = 0;
3181
    sequenceB.term1Num = 0;
3182
    sequenceB.expNum = 0;
3183
    sequenceB.done = FALSE;
3184
    subcase = 0;
3185
 
3186
    switch ( level ) {
3187
     case 1:
3188
        switch ( sequenceTypeIn ) {
3189
         case testCases_sequence_a_int32:
3190
           testCases_total = 3 * int32NumP1;
3191
            break;
3192
#ifdef BITS64
3193
         case testCases_sequence_a_int64:
3194
            testCases_total = 3 * int64NumP1;
3195
            break;
3196
#endif
3197
         case testCases_sequence_a_float32:
3198
           testCases_total = 3 * float32NumQOutP1 ;
3199
            break;
3200
         case testCases_sequence_ab_float32:
3201
            testCases_total = 6 * float32NumQInP1 * float32NumQInP1;
3202
            current_a_float32 = float32NextQInP1( &sequenceA );
3203
            break;
3204
         case testCases_sequence_a_float64:
3205
            testCases_total = 3 * float64NumQOutP1;
3206
            break;
3207
         case testCases_sequence_ab_float64:
3208
            testCases_total = 6 * float64NumQInP1 * float64NumQInP1;
3209
            current_a_float64 = float64NextQInP1( &sequenceA );
3210
            break;
3211
#ifdef FLOATX80
3212
         case testCases_sequence_a_floatx80:
3213
            testCases_total = 3 * floatx80NumQOutP1;
3214
            break;
3215
         case testCases_sequence_ab_floatx80:
3216
            testCases_total = 6 * floatx80NumQInP1 * floatx80NumQInP1;
3217
            current_a_floatx80 = floatx80NextQInP1( &sequenceA );
3218
            break;
3219
#endif
3220
#ifdef FLOAT128
3221
         case testCases_sequence_a_float128:
3222
            testCases_total = 3 * float128NumQOutP1;
3223
            break;
3224
         case testCases_sequence_ab_float128:
3225
            testCases_total = 6 * float128NumQInP1 * float128NumQInP1;
3226
            current_a_float128 = float128NextQInP1( &sequenceA );
3227
            break;
3228
#endif
3229
        }
3230
        break;
3231
     case 2:
3232
        switch ( sequenceTypeIn ) {
3233
         case testCases_sequence_a_int32:
3234
            testCases_total = 2 * int32NumP2;
3235
            break;
3236
#ifdef BITS64
3237
         case testCases_sequence_a_int64:
3238
            testCases_total = 2 * int64NumP2;
3239
            break;
3240
#endif
3241
         case testCases_sequence_a_float32:
3242
            testCases_total = 2 * float32NumQOutP2;
3243
            break;
3244
         case testCases_sequence_ab_float32:
3245
            testCases_total = 2 * float32NumQInP2 * float32NumQInP2;
3246
            current_a_float32 = float32NextQInP2( &sequenceA );
3247
            break;
3248
         case testCases_sequence_a_float64:
3249
            testCases_total = 2 * float64NumQOutP2;
3250
            break;
3251
         case testCases_sequence_ab_float64:
3252
            testCases_total = 2 * float64NumQInP2 * float64NumQInP2;
3253
            current_a_float64 = float64NextQInP2( &sequenceA );
3254
            break;
3255
#ifdef FLOATX80
3256
         case testCases_sequence_a_floatx80:
3257
            testCases_total = 2 * floatx80NumQOutP2;
3258
            break;
3259
         case testCases_sequence_ab_floatx80:
3260
            testCases_total = 2 * floatx80NumQInP2 * floatx80NumQInP2;
3261
            current_a_floatx80 = floatx80NextQInP2( &sequenceA );
3262
            break;
3263
#endif
3264
#ifdef FLOAT128
3265
         case testCases_sequence_a_float128:
3266
            testCases_total = 2 * float128NumQOutP2;
3267
            break;
3268
         case testCases_sequence_ab_float128:
3269
            testCases_total = 2 * float128NumQInP2 * float128NumQInP2;
3270
            current_a_float128 = float128NextQInP2( &sequenceA );
3271
            break;
3272
#endif
3273
        }
3274
        break;
3275
    }
3276
    testCases_done = FALSE;
3277
 
3278
}
3279
 
3280
int32 testCases_a_int32;
3281
#ifdef BITS64
3282
int64 testCases_a_int64;
3283
#endif
3284
float32 testCases_a_float32;
3285
float32 testCases_b_float32;
3286
float64 testCases_a_float64;
3287
float64 testCases_b_float64;
3288
#ifdef FLOATX80
3289
floatx80 testCases_a_floatx80;
3290
floatx80 testCases_b_floatx80;
3291
#endif
3292
#ifdef FLOAT128
3293
float128 testCases_a_float128;
3294
float128 testCases_b_float128;
3295
#endif
3296
 
3297
void testCases_next( void )
3298
{
3299
 
3300
    switch ( level ) {
3301
     case 1:
3302
        switch ( sequenceType ) {
3303
         case testCases_sequence_a_int32:
3304
            switch ( subcase ) {
3305
             case 0:
3306
                testCases_a_int32 = int32RandomP3();
3307
                break;
3308
             case 1:
3309
                testCases_a_int32 = int32RandomPInf();
3310
                break;
3311
             case 2:
3312
                testCases_a_int32 = int32NextP1( &sequenceA );
3313
                testCases_done = sequenceA.done;
3314
                subcase = -1;
3315
                break;
3316
            }
3317
            ++subcase;
3318
            break;
3319
#ifdef BITS64
3320
         case testCases_sequence_a_int64:
3321
            switch ( subcase ) {
3322
             case 0:
3323
                testCases_a_int64 = int64RandomP3();
3324
                break;
3325
             case 1:
3326
                testCases_a_int64 = int64RandomPInf();
3327
                break;
3328
             case 2:
3329
                testCases_a_int64 = int64NextP1( &sequenceA );
3330
                testCases_done = sequenceA.done;
3331
                subcase = -1;
3332
                break;
3333
            }
3334
            ++subcase;
3335
            break;
3336
#endif
3337
         case testCases_sequence_a_float32:
3338
            switch ( subcase ) {
3339
             case 0:
3340
             case 1:
3341
                testCases_a_float32 = float32Random();
3342
                break;
3343
             case 2:
3344
                testCases_a_float32 = float32NextQOutP1( &sequenceA );
3345
                testCases_done = sequenceA.done;
3346
                subcase = -1;
3347
                break;
3348
            }
3349
            ++subcase;
3350
            break;
3351
         case testCases_sequence_ab_float32:
3352
            switch ( subcase ) {
3353
             case 0:
3354
                if ( sequenceB.done ) {
3355
                    sequenceB.done = FALSE;
3356
                    current_a_float32 = float32NextQInP1( &sequenceA );
3357
                }
3358
                current_b_float32 = float32NextQInP1( &sequenceB );
3359
             case 2:
3360
             case 4:
3361
                testCases_a_float32 = float32Random();
3362
                testCases_b_float32 = float32Random();
3363
                break;
3364
             case 1:
3365
                testCases_a_float32 = current_a_float32;
3366
                testCases_b_float32 = float32Random();
3367
                break;
3368
             case 3:
3369
                testCases_a_float32 = float32Random();
3370
                testCases_b_float32 = current_b_float32;
3371
                break;
3372
             case 5:
3373
                testCases_a_float32 = current_a_float32;
3374
                testCases_b_float32 = current_b_float32;
3375
                testCases_done = sequenceA.done & sequenceB.done;
3376
                subcase = -1;
3377
                break;
3378
            }
3379
            ++subcase;
3380
            break;
3381
         case testCases_sequence_a_float64:
3382
            switch ( subcase ) {
3383
             case 0:
3384
             case 1:
3385
                testCases_a_float64 = float64Random();
3386
                break;
3387
             case 2:
3388
                testCases_a_float64 = float64NextQOutP1( &sequenceA );
3389
                testCases_done = sequenceA.done;
3390
                subcase = -1;
3391
                break;
3392
            }
3393
            ++subcase;
3394
            break;
3395
         case testCases_sequence_ab_float64:
3396
            switch ( subcase ) {
3397
             case 0:
3398
                if ( sequenceB.done ) {
3399
                    sequenceB.done = FALSE;
3400
                    current_a_float64 = float64NextQInP1( &sequenceA );
3401
                }
3402
                current_b_float64 = float64NextQInP1( &sequenceB );
3403
             case 2:
3404
             case 4:
3405
                testCases_a_float64 = float64Random();
3406
                testCases_b_float64 = float64Random();
3407
                break;
3408
             case 1:
3409
                testCases_a_float64 = current_a_float64;
3410
                testCases_b_float64 = float64Random();
3411
                break;
3412
             case 3:
3413
                testCases_a_float64 = float64Random();
3414
                testCases_b_float64 = current_b_float64;
3415
                break;
3416
             case 5:
3417
                testCases_a_float64 = current_a_float64;
3418
                testCases_b_float64 = current_b_float64;
3419
                testCases_done = sequenceA.done & sequenceB.done;
3420
                subcase = -1;
3421
                break;
3422
            }
3423
            ++subcase;
3424
            break;
3425
#ifdef FLOATX80
3426
         case testCases_sequence_a_floatx80:
3427
            switch ( subcase ) {
3428
             case 0:
3429
             case 1:
3430
                testCases_a_floatx80 = floatx80Random();
3431
                break;
3432
             case 2:
3433
                testCases_a_floatx80 = floatx80NextQOutP1( &sequenceA );
3434
                testCases_done = sequenceA.done;
3435
                subcase = -1;
3436
                break;
3437
            }
3438
            ++subcase;
3439
            break;
3440
         case testCases_sequence_ab_floatx80:
3441
            switch ( subcase ) {
3442
             case 0:
3443
                if ( sequenceB.done ) {
3444
                    sequenceB.done = FALSE;
3445
                    current_a_floatx80 = floatx80NextQInP1( &sequenceA );
3446
                }
3447
                current_b_floatx80 = floatx80NextQInP1( &sequenceB );
3448
             case 2:
3449
             case 4:
3450
                testCases_a_floatx80 = floatx80Random();
3451
                testCases_b_floatx80 = floatx80Random();
3452
                break;
3453
             case 1:
3454
                testCases_a_floatx80 = current_a_floatx80;
3455
                testCases_b_floatx80 = floatx80Random();
3456
                break;
3457
             case 3:
3458
                testCases_a_floatx80 = floatx80Random();
3459
                testCases_b_floatx80 = current_b_floatx80;
3460
                break;
3461
             case 5:
3462
                testCases_a_floatx80 = current_a_floatx80;
3463
                testCases_b_floatx80 = current_b_floatx80;
3464
                testCases_done = sequenceA.done & sequenceB.done;
3465
                subcase = -1;
3466
                break;
3467
            }
3468
            ++subcase;
3469
            break;
3470
#endif
3471
#ifdef FLOAT128
3472
         case testCases_sequence_a_float128:
3473
            switch ( subcase ) {
3474
             case 0:
3475
             case 1:
3476
                testCases_a_float128 = float128Random();
3477
                break;
3478
             case 2:
3479
                testCases_a_float128 = float128NextQOutP1( &sequenceA );
3480
                testCases_done = sequenceA.done;
3481
                subcase = -1;
3482
                break;
3483
            }
3484
            ++subcase;
3485
            break;
3486
         case testCases_sequence_ab_float128:
3487
            switch ( subcase ) {
3488
             case 0:
3489
                if ( sequenceB.done ) {
3490
                    sequenceB.done = FALSE;
3491
                    current_a_float128 = float128NextQInP1( &sequenceA );
3492
                }
3493
                current_b_float128 = float128NextQInP1( &sequenceB );
3494
             case 2:
3495
             case 4:
3496
                testCases_a_float128 = float128Random();
3497
                testCases_b_float128 = float128Random();
3498
                break;
3499
             case 1:
3500
                testCases_a_float128 = current_a_float128;
3501
                testCases_b_float128 = float128Random();
3502
                break;
3503
             case 3:
3504
                testCases_a_float128 = float128Random();
3505
                testCases_b_float128 = current_b_float128;
3506
                break;
3507
             case 5:
3508
                testCases_a_float128 = current_a_float128;
3509
                testCases_b_float128 = current_b_float128;
3510
                testCases_done = sequenceA.done & sequenceB.done;
3511
                subcase = -1;
3512
                break;
3513
            }
3514
            ++subcase;
3515
            break;
3516
#endif
3517
        }
3518
        break;
3519
     case 2:
3520
        switch ( sequenceType ) {
3521
         case testCases_sequence_a_int32:
3522
            switch ( subcase ) {
3523
             case 0:
3524
                testCases_a_int32 = int32RandomP3();
3525
                break;
3526
             case 2:
3527
                testCases_a_int32 = int32RandomPInf();
3528
                break;
3529
             case 3:
3530
                subcase = -1;
3531
             case 1:
3532
                testCases_a_int32 = int32NextP2( &sequenceA );
3533
                testCases_done = sequenceA.done;
3534
                break;
3535
            }
3536
            ++subcase;
3537
            break;
3538
#ifdef BITS64
3539
         case testCases_sequence_a_int64:
3540
            switch ( subcase ) {
3541
             case 0:
3542
                testCases_a_int64 = int64RandomP3();
3543
                break;
3544
             case 2:
3545
                testCases_a_int64 = int64RandomPInf();
3546
                break;
3547
             case 3:
3548
                subcase = -1;
3549
             case 1:
3550
                testCases_a_int64 = int64NextP2( &sequenceA );
3551
                testCases_done = sequenceA.done;
3552
                break;
3553
            }
3554
            ++subcase;
3555
            break;
3556
#endif
3557
         case testCases_sequence_a_float32:
3558
            switch ( subcase ) {
3559
             case 0:
3560
                testCases_a_float32 = float32Random();
3561
                break;
3562
             case 1:
3563
                testCases_a_float32 = float32NextQOutP2( &sequenceA );
3564
                testCases_done = sequenceA.done;
3565
                subcase = -1;
3566
                break;
3567
            }
3568
            ++subcase;
3569
            break;
3570
         case testCases_sequence_ab_float32:
3571
            switch ( subcase ) {
3572
             case 0:
3573
                testCases_a_float32 = float32Random();
3574
                testCases_b_float32 = float32Random();
3575
                break;
3576
             case 1:
3577
                if ( sequenceB.done ) {
3578
                    sequenceB.done = FALSE;
3579
                    current_a_float32 = float32NextQInP2( &sequenceA );
3580
                }
3581
                testCases_a_float32 = current_a_float32;
3582
                testCases_b_float32 = float32NextQInP2( &sequenceB );
3583
                testCases_done = sequenceA.done & sequenceB.done;
3584
                subcase = -1;
3585
                break;
3586
            }
3587
            ++subcase;
3588
            break;
3589
         case testCases_sequence_a_float64:
3590
            switch ( subcase ) {
3591
             case 0:
3592
                testCases_a_float64 = float64Random();
3593
                break;
3594
             case 1:
3595
                testCases_a_float64 = float64NextQOutP2( &sequenceA );
3596
                testCases_done = sequenceA.done;
3597
                subcase = -1;
3598
                break;
3599
            }
3600
            ++subcase;
3601
            break;
3602
         case testCases_sequence_ab_float64:
3603
            switch ( subcase ) {
3604
             case 0:
3605
                testCases_a_float64 = float64Random();
3606
                testCases_b_float64 = float64Random();
3607
                break;
3608
             case 1:
3609
                if ( sequenceB.done ) {
3610
                    sequenceB.done = FALSE;
3611
                    current_a_float64 = float64NextQInP2( &sequenceA );
3612
                }
3613
                testCases_a_float64 = current_a_float64;
3614
                testCases_b_float64 = float64NextQInP2( &sequenceB );
3615
                testCases_done = sequenceA.done & sequenceB.done;
3616
                subcase = -1;
3617
                break;
3618
            }
3619
            ++subcase;
3620
            break;
3621
#ifdef FLOATX80
3622
         case testCases_sequence_a_floatx80:
3623
            switch ( subcase ) {
3624
             case 0:
3625
                testCases_a_floatx80 = floatx80Random();
3626
                break;
3627
             case 1:
3628
                testCases_a_floatx80 = floatx80NextQOutP2( &sequenceA );
3629
                testCases_done = sequenceA.done;
3630
                subcase = -1;
3631
                break;
3632
            }
3633
            ++subcase;
3634
            break;
3635
         case testCases_sequence_ab_floatx80:
3636
            switch ( subcase ) {
3637
             case 0:
3638
                testCases_a_floatx80 = floatx80Random();
3639
                testCases_b_floatx80 = floatx80Random();
3640
                break;
3641
             case 1:
3642
                if ( sequenceB.done ) {
3643
                    sequenceB.done = FALSE;
3644
                    current_a_floatx80 = floatx80NextQInP2( &sequenceA );
3645
                }
3646
                testCases_a_floatx80 = current_a_floatx80;
3647
                testCases_b_floatx80 = floatx80NextQInP2( &sequenceB );
3648
                testCases_done = sequenceA.done & sequenceB.done;
3649
                subcase = -1;
3650
                break;
3651
            }
3652
            ++subcase;
3653
            break;
3654
#endif
3655
#ifdef FLOAT128
3656
         case testCases_sequence_a_float128:
3657
            switch ( subcase ) {
3658
             case 0:
3659
                testCases_a_float128 = float128Random();
3660
                break;
3661
             case 1:
3662
                testCases_a_float128 = float128NextQOutP2( &sequenceA );
3663
                testCases_done = sequenceA.done;
3664
                subcase = -1;
3665
                break;
3666
            }
3667
            ++subcase;
3668
            break;
3669
         case testCases_sequence_ab_float128:
3670
            switch ( subcase ) {
3671
             case 0:
3672
                testCases_a_float128 = float128Random();
3673
                testCases_b_float128 = float128Random();
3674
                break;
3675
             case 1:
3676
                if ( sequenceB.done ) {
3677
                    sequenceB.done = FALSE;
3678
                    current_a_float128 = float128NextQInP2( &sequenceA );
3679
                }
3680
                testCases_a_float128 = current_a_float128;
3681
                testCases_b_float128 = float128NextQInP2( &sequenceB );
3682
                testCases_done = sequenceA.done & sequenceB.done;
3683
                subcase = -1;
3684
                break;
3685
            }
3686
            ++subcase;
3687
            break;
3688
#endif
3689
        }
3690
        break;
3691
    }
3692
 
3693
}
3694
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.