VirtualBox

source: vbox/trunk/src/libs/softfloat-3e/testfloat/source/verLoops.c@ 107044

Last change on this file since 107044 was 94551, checked in by vboxsync, 3 years ago

libs/softfloat: Copied TestFloat-3e from vendor branch and to testfloat subdir. bugref:9898

  • Property svn:eol-style set to native
File size: 157.8 KB
Line 
1
2/*============================================================================
3
4This C source file is part of TestFloat, Release 3e, a package of programs for
5testing the correctness of floating-point arithmetic complying with the IEEE
6Standard for Floating-Point, by John R. Hauser.
7
8Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
9University of California. All rights reserved.
10
11Redistribution and use in source and binary forms, with or without
12modification, are permitted provided that the following conditions are met:
13
14 1. Redistributions of source code must retain the above copyright notice,
15 this list of conditions, and the following disclaimer.
16
17 2. Redistributions in binary form must reproduce the above copyright notice,
18 this list of conditions, and the following disclaimer in the documentation
19 and/or other materials provided with the distribution.
20
21 3. Neither the name of the University nor the names of its contributors may
22 be used to endorse or promote products derived from this software without
23 specific prior written permission.
24
25THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
26EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
28DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
29DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
36=============================================================================*/
37
38#include <stdbool.h>
39#include <stdint.h>
40#include <stdlib.h>
41#include <stdio.h>
42#include "platform.h"
43#include "uint128.h"
44#include "fail.h"
45#include "softfloat.h"
46#include "readHex.h"
47#include "verCases.h"
48#include "writeCase.h"
49#include "verLoops.h"
50
51uint_fast8_t *verLoops_trueFlagsPtr;
52
53static bool atEndOfInput( void )
54{
55 int i;
56
57 i = fgetc( stdin );
58 if ( i == EOF ) {
59 if ( ! ferror( stdin ) && feof( stdin ) ) return true;
60 fail( "Error reading input" );
61 }
62 ungetc( i, stdin );
63 return false;
64
65}
66
67static void failFromBadInput( void )
68{
69
70 fail( "Invalid input format" );
71
72}
73
74static void readVerInput_bool( bool *aPtr )
75{
76
77 if ( ! readHex_bool( aPtr, ' ' ) ) failFromBadInput();
78
79}
80
81static void readVerInput_ui32( uint_fast32_t *aPtr )
82{
83 uint32_t a;
84
85 if ( ! readHex_ui32( &a, ' ' ) ) failFromBadInput();
86 *aPtr = a;
87
88}
89
90static void readVerInput_ui64( uint_fast64_t *aPtr )
91{
92 uint64_t a;
93
94 if ( ! readHex_ui64( &a, ' ' ) ) failFromBadInput();
95 *aPtr = a;
96
97}
98
99static void readVerInput_i32( int_fast32_t *aPtr )
100{
101 union { uint32_t ui; int32_t i; } uA;
102
103 if ( ! readHex_ui32( &uA.ui, ' ' ) ) failFromBadInput();
104 *aPtr = uA.i;
105
106}
107
108static void readVerInput_i64( int_fast64_t *aPtr )
109{
110 union { uint64_t ui; int64_t i; } uA;
111
112 if ( ! readHex_ui64( &uA.ui, ' ' ) ) failFromBadInput();
113 *aPtr = uA.i;
114
115}
116
117#ifdef FLOAT16
118
119static void readVerInput_f16( float16_t *aPtr )
120{
121 union { uint16_t ui; float16_t f; } uA;
122
123 if ( ! readHex_ui16( &uA.ui, ' ' ) ) failFromBadInput();
124 *aPtr = uA.f;
125
126}
127
128#endif
129
130static void readVerInput_f32( float32_t *aPtr )
131{
132 union { uint32_t ui; float32_t f; } uA;
133
134 if ( ! readHex_ui32( &uA.ui, ' ' ) ) failFromBadInput();
135 *aPtr = uA.f;
136
137}
138
139#ifdef FLOAT64
140
141static void readVerInput_f64( float64_t *aPtr )
142{
143 union { uint64_t ui; float64_t f; } uA;
144
145 if ( ! readHex_ui64( &uA.ui, ' ' ) ) failFromBadInput();
146 *aPtr = uA.f;
147
148}
149
150#endif
151
152#ifdef EXTFLOAT80
153
154static void readVerInput_extF80( extFloat80_t *aPtr )
155{
156 struct extFloat80M *aSPtr;
157
158 aSPtr = (struct extFloat80M *) aPtr;
159 if (
160 ! readHex_ui16( &aSPtr->signExp, 0 )
161 || ! readHex_ui64( &aSPtr->signif, ' ' )
162 ) {
163 failFromBadInput();
164 }
165
166}
167
168#endif
169
170#ifdef FLOAT128
171
172static void readVerInput_f128( float128_t *aPtr )
173{
174 struct uint128 *uiAPtr;
175
176 uiAPtr = (struct uint128 *) aPtr;
177 if (
178 ! readHex_ui64( &uiAPtr->v64, 0 ) || ! readHex_ui64( &uiAPtr->v0, ' ' )
179 ) {
180 failFromBadInput();
181 }
182
183}
184
185#endif
186
187static void readVerInput_flags( uint_fast8_t *flagsPtr )
188{
189 uint_least8_t commonFlags;
190 uint_fast8_t flags;
191
192 if ( ! readHex_ui8( &commonFlags, '\n' ) || (0x20 <= commonFlags) ) {
193 failFromBadInput();
194 }
195 flags = 0;
196 if ( commonFlags & 0x10 ) flags |= softfloat_flag_invalid;
197 if ( commonFlags & 0x08 ) flags |= softfloat_flag_infinite;
198 if ( commonFlags & 0x04 ) flags |= softfloat_flag_overflow;
199 if ( commonFlags & 0x02 ) flags |= softfloat_flag_underflow;
200 if ( commonFlags & 0x01 ) flags |= softfloat_flag_inexact;
201 *flagsPtr = flags;
202
203}
204
205/*----------------------------------------------------------------------------
206*----------------------------------------------------------------------------*/
207
208#ifdef FLOAT16
209
210void ver_a_ui32_z_f16( float16_t trueFunction( uint32_t ) )
211{
212 int count;
213 uint_fast32_t a;
214 float16_t subjZ;
215 uint_fast8_t subjFlags;
216 float16_t trueZ;
217 uint_fast8_t trueFlags;
218
219 verCases_errorCount = 0;
220 verCases_tenThousandsCount = 0;
221 count = 10000;
222 while ( ! atEndOfInput() ) {
223 readVerInput_ui32( &a );
224 readVerInput_f16( &subjZ );
225 readVerInput_flags( &subjFlags );
226 *verLoops_trueFlagsPtr = 0;
227 trueZ = trueFunction( a );
228 trueFlags = *verLoops_trueFlagsPtr;
229 --count;
230 if ( ! count ) {
231 verCases_perTenThousand();
232 count = 10000;
233 }
234 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
235 if (
236 verCases_checkNaNs
237 || ! f16_isNaN( trueZ )
238 || ! f16_isNaN( subjZ )
239 || f16_isSignalingNaN( subjZ )
240 || (trueFlags != subjFlags)
241 ) {
242 ++verCases_errorCount;
243 verCases_writeErrorFound( 10000 - count );
244 writeCase_a_ui32( a, " " );
245 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
246 if ( verCases_errorCount == verCases_maxErrorCount ) break;
247 }
248 }
249 }
250 verCases_writeTestsPerformed( 10000 - count );
251
252}
253
254#endif
255
256void ver_a_ui32_z_f32( float32_t trueFunction( uint32_t ) )
257{
258 int count;
259 uint_fast32_t a;
260 float32_t subjZ;
261 uint_fast8_t subjFlags;
262 float32_t trueZ;
263 uint_fast8_t trueFlags;
264
265 verCases_errorCount = 0;
266 verCases_tenThousandsCount = 0;
267 count = 10000;
268 while ( ! atEndOfInput() ) {
269 readVerInput_ui32( &a );
270 readVerInput_f32( &subjZ );
271 readVerInput_flags( &subjFlags );
272 *verLoops_trueFlagsPtr = 0;
273 trueZ = trueFunction( a );
274 trueFlags = *verLoops_trueFlagsPtr;
275 --count;
276 if ( ! count ) {
277 verCases_perTenThousand();
278 count = 10000;
279 }
280 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
281 if (
282 verCases_checkNaNs
283 || ! f32_isNaN( trueZ )
284 || ! f32_isNaN( subjZ )
285 || f32_isSignalingNaN( subjZ )
286 || (trueFlags != subjFlags)
287 ) {
288 ++verCases_errorCount;
289 verCases_writeErrorFound( 10000 - count );
290 writeCase_a_ui32( a, " " );
291 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
292 if ( verCases_errorCount == verCases_maxErrorCount ) break;
293 }
294 }
295 }
296 verCases_writeTestsPerformed( 10000 - count );
297
298}
299
300#ifdef FLOAT64
301
302void ver_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
303{
304 int count;
305 uint_fast32_t a;
306 float64_t subjZ;
307 uint_fast8_t subjFlags;
308 float64_t trueZ;
309 uint_fast8_t trueFlags;
310
311 verCases_errorCount = 0;
312 verCases_tenThousandsCount = 0;
313 count = 10000;
314 while ( ! atEndOfInput() ) {
315 readVerInput_ui32( &a );
316 readVerInput_f64( &subjZ );
317 readVerInput_flags( &subjFlags );
318 *verLoops_trueFlagsPtr = 0;
319 trueZ = trueFunction( a );
320 trueFlags = *verLoops_trueFlagsPtr;
321 --count;
322 if ( ! count ) {
323 verCases_perTenThousand();
324 count = 10000;
325 }
326 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
327 if (
328 verCases_checkNaNs
329 || ! f64_isNaN( trueZ )
330 || ! f64_isNaN( subjZ )
331 || f64_isSignalingNaN( subjZ )
332 || (trueFlags != subjFlags)
333 ) {
334 ++verCases_errorCount;
335 verCases_writeErrorFound( 10000 - count );
336 writeCase_a_ui32( a, " " );
337 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
338 if ( verCases_errorCount == verCases_maxErrorCount ) break;
339 }
340 }
341 }
342 verCases_writeTestsPerformed( 10000 - count );
343
344}
345
346#endif
347
348#ifdef EXTFLOAT80
349
350void ver_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
351{
352 int count;
353 uint_fast32_t a;
354 extFloat80_t subjZ;
355 uint_fast8_t subjFlags;
356 extFloat80_t trueZ;
357 uint_fast8_t trueFlags;
358
359 verCases_errorCount = 0;
360 verCases_tenThousandsCount = 0;
361 count = 10000;
362 while ( ! atEndOfInput() ) {
363 readVerInput_ui32( &a );
364 readVerInput_extF80( &subjZ );
365 readVerInput_flags( &subjFlags );
366 *verLoops_trueFlagsPtr = 0;
367 trueFunction( a, &trueZ );
368 trueFlags = *verLoops_trueFlagsPtr;
369 --count;
370 if ( ! count ) {
371 verCases_perTenThousand();
372 count = 10000;
373 }
374 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
375 if (
376 verCases_checkNaNs
377 || ! extF80M_isNaN( &trueZ )
378 || ! extF80M_isNaN( &subjZ )
379 || extF80M_isSignalingNaN( &subjZ )
380 || (trueFlags != subjFlags)
381 ) {
382 ++verCases_errorCount;
383 verCases_writeErrorFound( 10000 - count );
384 writeCase_a_ui32( a, "\n\t" );
385 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
386 if ( verCases_errorCount == verCases_maxErrorCount ) break;
387 }
388 }
389 }
390 verCases_writeTestsPerformed( 10000 - count );
391
392}
393
394#endif
395
396#ifdef FLOAT128
397
398void ver_a_ui32_z_f128( void trueFunction( uint32_t, float128_t * ) )
399{
400 int count;
401 uint_fast32_t a;
402 float128_t subjZ;
403 uint_fast8_t subjFlags;
404 float128_t trueZ;
405 uint_fast8_t trueFlags;
406
407 verCases_errorCount = 0;
408 verCases_tenThousandsCount = 0;
409 count = 10000;
410 while ( ! atEndOfInput() ) {
411 readVerInput_ui32( &a );
412 readVerInput_f128( &subjZ );
413 readVerInput_flags( &subjFlags );
414 *verLoops_trueFlagsPtr = 0;
415 trueFunction( a, &trueZ );
416 trueFlags = *verLoops_trueFlagsPtr;
417 --count;
418 if ( ! count ) {
419 verCases_perTenThousand();
420 count = 10000;
421 }
422 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
423 if (
424 verCases_checkNaNs
425 || ! f128M_isNaN( &trueZ )
426 || ! f128M_isNaN( &subjZ )
427 || f128M_isSignalingNaN( &subjZ )
428 || (trueFlags != subjFlags)
429 ) {
430 ++verCases_errorCount;
431 verCases_writeErrorFound( 10000 - count );
432 writeCase_a_ui32( a, " " );
433 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
434 if ( verCases_errorCount == verCases_maxErrorCount ) break;
435 }
436 }
437 }
438 verCases_writeTestsPerformed( 10000 - count );
439
440}
441
442#endif
443
444/*----------------------------------------------------------------------------
445*----------------------------------------------------------------------------*/
446
447#ifdef FLOAT16
448
449void ver_a_ui64_z_f16( float16_t trueFunction( uint64_t ) )
450{
451 int count;
452 uint_fast64_t a;
453 float16_t subjZ;
454 uint_fast8_t subjFlags;
455 float16_t trueZ;
456 uint_fast8_t trueFlags;
457
458 verCases_errorCount = 0;
459 verCases_tenThousandsCount = 0;
460 count = 10000;
461 while ( ! atEndOfInput() ) {
462 readVerInput_ui64( &a );
463 readVerInput_f16( &subjZ );
464 readVerInput_flags( &subjFlags );
465 *verLoops_trueFlagsPtr = 0;
466 trueZ = trueFunction( a );
467 trueFlags = *verLoops_trueFlagsPtr;
468 --count;
469 if ( ! count ) {
470 verCases_perTenThousand();
471 count = 10000;
472 }
473 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
474 if (
475 verCases_checkNaNs
476 || ! f16_isNaN( trueZ )
477 || ! f16_isNaN( subjZ )
478 || f16_isSignalingNaN( subjZ )
479 || (trueFlags != subjFlags)
480 ) {
481 ++verCases_errorCount;
482 verCases_writeErrorFound( 10000 - count );
483 writeCase_a_ui64( a, " " );
484 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
485 if ( verCases_errorCount == verCases_maxErrorCount ) break;
486 }
487 }
488 }
489 verCases_writeTestsPerformed( 10000 - count );
490
491}
492
493#endif
494
495void ver_a_ui64_z_f32( float32_t trueFunction( uint64_t ) )
496{
497 int count;
498 uint_fast64_t a;
499 float32_t subjZ;
500 uint_fast8_t subjFlags;
501 float32_t trueZ;
502 uint_fast8_t trueFlags;
503
504 verCases_errorCount = 0;
505 verCases_tenThousandsCount = 0;
506 count = 10000;
507 while ( ! atEndOfInput() ) {
508 readVerInput_ui64( &a );
509 readVerInput_f32( &subjZ );
510 readVerInput_flags( &subjFlags );
511 *verLoops_trueFlagsPtr = 0;
512 trueZ = trueFunction( a );
513 trueFlags = *verLoops_trueFlagsPtr;
514 --count;
515 if ( ! count ) {
516 verCases_perTenThousand();
517 count = 10000;
518 }
519 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
520 if (
521 verCases_checkNaNs
522 || ! f32_isNaN( trueZ )
523 || ! f32_isNaN( subjZ )
524 || f32_isSignalingNaN( subjZ )
525 || (trueFlags != subjFlags)
526 ) {
527 ++verCases_errorCount;
528 verCases_writeErrorFound( 10000 - count );
529 writeCase_a_ui64( a, " " );
530 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
531 if ( verCases_errorCount == verCases_maxErrorCount ) break;
532 }
533 }
534 }
535 verCases_writeTestsPerformed( 10000 - count );
536
537}
538
539#ifdef FLOAT64
540
541void ver_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
542{
543 int count;
544 uint_fast64_t a;
545 float64_t subjZ;
546 uint_fast8_t subjFlags;
547 float64_t trueZ;
548 uint_fast8_t trueFlags;
549
550 verCases_errorCount = 0;
551 verCases_tenThousandsCount = 0;
552 count = 10000;
553 while ( ! atEndOfInput() ) {
554 readVerInput_ui64( &a );
555 readVerInput_f64( &subjZ );
556 readVerInput_flags( &subjFlags );
557 *verLoops_trueFlagsPtr = 0;
558 trueZ = trueFunction( a );
559 trueFlags = *verLoops_trueFlagsPtr;
560 --count;
561 if ( ! count ) {
562 verCases_perTenThousand();
563 count = 10000;
564 }
565 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
566 if (
567 verCases_checkNaNs
568 || ! f64_isNaN( trueZ )
569 || ! f64_isNaN( subjZ )
570 || f64_isSignalingNaN( subjZ )
571 || (trueFlags != subjFlags)
572 ) {
573 ++verCases_errorCount;
574 verCases_writeErrorFound( 10000 - count );
575 writeCase_a_ui64( a, "\n\t" );
576 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
577 if ( verCases_errorCount == verCases_maxErrorCount ) break;
578 }
579 }
580 }
581 verCases_writeTestsPerformed( 10000 - count );
582
583}
584
585#endif
586
587#ifdef EXTFLOAT80
588
589void ver_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
590{
591 int count;
592 uint_fast64_t a;
593 extFloat80_t subjZ;
594 uint_fast8_t subjFlags;
595 extFloat80_t trueZ;
596 uint_fast8_t trueFlags;
597
598 verCases_errorCount = 0;
599 verCases_tenThousandsCount = 0;
600 count = 10000;
601 while ( ! atEndOfInput() ) {
602 readVerInput_ui64( &a );
603 readVerInput_extF80( &subjZ );
604 readVerInput_flags( &subjFlags );
605 *verLoops_trueFlagsPtr = 0;
606 trueFunction( a, &trueZ );
607 trueFlags = *verLoops_trueFlagsPtr;
608 --count;
609 if ( ! count ) {
610 verCases_perTenThousand();
611 count = 10000;
612 }
613 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
614 if (
615 verCases_checkNaNs
616 || ! extF80M_isNaN( &trueZ )
617 || ! extF80M_isNaN( &subjZ )
618 || extF80M_isSignalingNaN( &subjZ )
619 || (trueFlags != subjFlags)
620 ) {
621 ++verCases_errorCount;
622 verCases_writeErrorFound( 10000 - count );
623 writeCase_a_ui64( a, "\n\t" );
624 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
625 if ( verCases_errorCount == verCases_maxErrorCount ) break;
626 }
627 }
628 }
629 verCases_writeTestsPerformed( 10000 - count );
630
631}
632
633#endif
634
635#ifdef FLOAT128
636
637void ver_a_ui64_z_f128( void trueFunction( uint64_t, float128_t * ) )
638{
639 int count;
640 uint_fast64_t a;
641 float128_t subjZ;
642 uint_fast8_t subjFlags;
643 float128_t trueZ;
644 uint_fast8_t trueFlags;
645
646 verCases_errorCount = 0;
647 verCases_tenThousandsCount = 0;
648 count = 10000;
649 while ( ! atEndOfInput() ) {
650 readVerInput_ui64( &a );
651 readVerInput_f128( &subjZ );
652 readVerInput_flags( &subjFlags );
653 *verLoops_trueFlagsPtr = 0;
654 trueFunction( a, &trueZ );
655 trueFlags = *verLoops_trueFlagsPtr;
656 --count;
657 if ( ! count ) {
658 verCases_perTenThousand();
659 count = 10000;
660 }
661 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
662 if (
663 verCases_checkNaNs
664 || ! f128M_isNaN( &trueZ )
665 || ! f128M_isNaN( &subjZ )
666 || f128M_isSignalingNaN( &subjZ )
667 || (trueFlags != subjFlags)
668 ) {
669 ++verCases_errorCount;
670 verCases_writeErrorFound( 10000 - count );
671 writeCase_a_ui64( a, " " );
672 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
673 if ( verCases_errorCount == verCases_maxErrorCount ) break;
674 }
675 }
676 }
677 verCases_writeTestsPerformed( 10000 - count );
678
679}
680
681#endif
682
683/*----------------------------------------------------------------------------
684*----------------------------------------------------------------------------*/
685
686#ifdef FLOAT16
687
688void ver_a_i32_z_f16( float16_t trueFunction( int32_t ) )
689{
690 int count;
691 int_fast32_t a;
692 float16_t subjZ;
693 uint_fast8_t subjFlags;
694 float16_t trueZ;
695 uint_fast8_t trueFlags;
696
697 verCases_errorCount = 0;
698 verCases_tenThousandsCount = 0;
699 count = 10000;
700 while ( ! atEndOfInput() ) {
701 readVerInput_i32( &a );
702 readVerInput_f16( &subjZ );
703 readVerInput_flags( &subjFlags );
704 *verLoops_trueFlagsPtr = 0;
705 trueZ = trueFunction( a );
706 trueFlags = *verLoops_trueFlagsPtr;
707 --count;
708 if ( ! count ) {
709 verCases_perTenThousand();
710 count = 10000;
711 }
712 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
713 if (
714 verCases_checkNaNs
715 || ! f16_isNaN( trueZ )
716 || ! f16_isNaN( subjZ )
717 || f16_isSignalingNaN( subjZ )
718 || (trueFlags != subjFlags)
719 ) {
720 ++verCases_errorCount;
721 verCases_writeErrorFound( 10000 - count );
722 writeCase_a_i32( a, " " );
723 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
724 if ( verCases_errorCount == verCases_maxErrorCount ) break;
725 }
726 }
727 }
728 verCases_writeTestsPerformed( 10000 - count );
729
730}
731
732#endif
733
734void ver_a_i32_z_f32( float32_t trueFunction( int32_t ) )
735{
736 int count;
737 int_fast32_t a;
738 float32_t subjZ;
739 uint_fast8_t subjFlags;
740 float32_t trueZ;
741 uint_fast8_t trueFlags;
742
743 verCases_errorCount = 0;
744 verCases_tenThousandsCount = 0;
745 count = 10000;
746 while ( ! atEndOfInput() ) {
747 readVerInput_i32( &a );
748 readVerInput_f32( &subjZ );
749 readVerInput_flags( &subjFlags );
750 *verLoops_trueFlagsPtr = 0;
751 trueZ = trueFunction( a );
752 trueFlags = *verLoops_trueFlagsPtr;
753 --count;
754 if ( ! count ) {
755 verCases_perTenThousand();
756 count = 10000;
757 }
758 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
759 if (
760 verCases_checkNaNs
761 || ! f32_isNaN( trueZ )
762 || ! f32_isNaN( subjZ )
763 || f32_isSignalingNaN( subjZ )
764 || (trueFlags != subjFlags)
765 ) {
766 ++verCases_errorCount;
767 verCases_writeErrorFound( 10000 - count );
768 writeCase_a_i32( a, " " );
769 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
770 if ( verCases_errorCount == verCases_maxErrorCount ) break;
771 }
772 }
773 }
774 verCases_writeTestsPerformed( 10000 - count );
775
776}
777
778#ifdef FLOAT64
779
780void ver_a_i32_z_f64( float64_t trueFunction( int32_t ) )
781{
782 int count;
783 int_fast32_t a;
784 float64_t subjZ;
785 uint_fast8_t subjFlags;
786 float64_t trueZ;
787 uint_fast8_t trueFlags;
788
789 verCases_errorCount = 0;
790 verCases_tenThousandsCount = 0;
791 count = 10000;
792 while ( ! atEndOfInput() ) {
793 readVerInput_i32( &a );
794 readVerInput_f64( &subjZ );
795 readVerInput_flags( &subjFlags );
796 *verLoops_trueFlagsPtr = 0;
797 trueZ = trueFunction( a );
798 trueFlags = *verLoops_trueFlagsPtr;
799 --count;
800 if ( ! count ) {
801 verCases_perTenThousand();
802 count = 10000;
803 }
804 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
805 if (
806 verCases_checkNaNs
807 || ! f64_isNaN( trueZ )
808 || ! f64_isNaN( subjZ )
809 || f64_isSignalingNaN( subjZ )
810 || (trueFlags != subjFlags)
811 ) {
812 ++verCases_errorCount;
813 verCases_writeErrorFound( 10000 - count );
814 writeCase_a_i32( a, " " );
815 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
816 if ( verCases_errorCount == verCases_maxErrorCount ) break;
817 }
818 }
819 }
820 verCases_writeTestsPerformed( 10000 - count );
821
822}
823
824#endif
825
826#ifdef EXTFLOAT80
827
828void ver_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
829{
830 int count;
831 int_fast32_t a;
832 extFloat80_t subjZ;
833 uint_fast8_t subjFlags;
834 extFloat80_t trueZ;
835 uint_fast8_t trueFlags;
836
837 verCases_errorCount = 0;
838 verCases_tenThousandsCount = 0;
839 count = 10000;
840 while ( ! atEndOfInput() ) {
841 readVerInput_i32( &a );
842 readVerInput_extF80( &subjZ );
843 readVerInput_flags( &subjFlags );
844 *verLoops_trueFlagsPtr = 0;
845 trueFunction( a, &trueZ );
846 trueFlags = *verLoops_trueFlagsPtr;
847 --count;
848 if ( ! count ) {
849 verCases_perTenThousand();
850 count = 10000;
851 }
852 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
853 if (
854 verCases_checkNaNs
855 || ! extF80M_isNaN( &trueZ )
856 || ! extF80M_isNaN( &subjZ )
857 || extF80M_isSignalingNaN( &subjZ )
858 || (trueFlags != subjFlags)
859 ) {
860 ++verCases_errorCount;
861 verCases_writeErrorFound( 10000 - count );
862 writeCase_a_i32( a, "\n\t" );
863 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
864 if ( verCases_errorCount == verCases_maxErrorCount ) break;
865 }
866 }
867 }
868 verCases_writeTestsPerformed( 10000 - count );
869
870}
871
872#endif
873
874#ifdef FLOAT128
875
876void ver_a_i32_z_f128( void trueFunction( int32_t, float128_t * ) )
877{
878 int count;
879 int_fast32_t a;
880 float128_t subjZ;
881 uint_fast8_t subjFlags;
882 float128_t trueZ;
883 uint_fast8_t trueFlags;
884
885 verCases_errorCount = 0;
886 verCases_tenThousandsCount = 0;
887 count = 10000;
888 while ( ! atEndOfInput() ) {
889 readVerInput_i32( &a );
890 readVerInput_f128( &subjZ );
891 readVerInput_flags( &subjFlags );
892 *verLoops_trueFlagsPtr = 0;
893 trueFunction( a, &trueZ );
894 trueFlags = *verLoops_trueFlagsPtr;
895 --count;
896 if ( ! count ) {
897 verCases_perTenThousand();
898 count = 10000;
899 }
900 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
901 if (
902 verCases_checkNaNs
903 || ! f128M_isNaN( &trueZ )
904 || ! f128M_isNaN( &subjZ )
905 || f128M_isSignalingNaN( &subjZ )
906 || (trueFlags != subjFlags)
907 ) {
908 ++verCases_errorCount;
909 verCases_writeErrorFound( 10000 - count );
910 writeCase_a_i32( a, " " );
911 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
912 if ( verCases_errorCount == verCases_maxErrorCount ) break;
913 }
914 }
915 }
916 verCases_writeTestsPerformed( 10000 - count );
917
918}
919
920#endif
921
922/*----------------------------------------------------------------------------
923*----------------------------------------------------------------------------*/
924
925#ifdef FLOAT16
926
927void ver_a_i64_z_f16( float16_t trueFunction( int64_t ) )
928{
929 int count;
930 int_fast64_t a;
931 float16_t subjZ;
932 uint_fast8_t subjFlags;
933 float16_t trueZ;
934 uint_fast8_t trueFlags;
935
936 verCases_errorCount = 0;
937 verCases_tenThousandsCount = 0;
938 count = 10000;
939 while ( ! atEndOfInput() ) {
940 readVerInput_i64( &a );
941 readVerInput_f16( &subjZ );
942 readVerInput_flags( &subjFlags );
943 *verLoops_trueFlagsPtr = 0;
944 trueZ = trueFunction( a );
945 trueFlags = *verLoops_trueFlagsPtr;
946 --count;
947 if ( ! count ) {
948 verCases_perTenThousand();
949 count = 10000;
950 }
951 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
952 if (
953 verCases_checkNaNs
954 || ! f16_isNaN( trueZ )
955 || ! f16_isNaN( subjZ )
956 || f16_isSignalingNaN( subjZ )
957 || (trueFlags != subjFlags)
958 ) {
959 ++verCases_errorCount;
960 verCases_writeErrorFound( 10000 - count );
961 writeCase_a_i64( a, " " );
962 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
963 if ( verCases_errorCount == verCases_maxErrorCount ) break;
964 }
965 }
966 }
967 verCases_writeTestsPerformed( 10000 - count );
968
969}
970
971#endif
972
973void ver_a_i64_z_f32( float32_t trueFunction( int64_t ) )
974{
975 int count;
976 int_fast64_t a;
977 float32_t subjZ;
978 uint_fast8_t subjFlags;
979 float32_t trueZ;
980 uint_fast8_t trueFlags;
981
982 verCases_errorCount = 0;
983 verCases_tenThousandsCount = 0;
984 count = 10000;
985 while ( ! atEndOfInput() ) {
986 readVerInput_i64( &a );
987 readVerInput_f32( &subjZ );
988 readVerInput_flags( &subjFlags );
989 *verLoops_trueFlagsPtr = 0;
990 trueZ = trueFunction( a );
991 trueFlags = *verLoops_trueFlagsPtr;
992 --count;
993 if ( ! count ) {
994 verCases_perTenThousand();
995 count = 10000;
996 }
997 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
998 if (
999 verCases_checkNaNs
1000 || ! f32_isNaN( trueZ )
1001 || ! f32_isNaN( subjZ )
1002 || f32_isSignalingNaN( subjZ )
1003 || (trueFlags != subjFlags)
1004 ) {
1005 ++verCases_errorCount;
1006 verCases_writeErrorFound( 10000 - count );
1007 writeCase_a_i64( a, " " );
1008 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
1009 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1010 }
1011 }
1012 }
1013 verCases_writeTestsPerformed( 10000 - count );
1014
1015}
1016
1017#ifdef FLOAT64
1018
1019void ver_a_i64_z_f64( float64_t trueFunction( int64_t ) )
1020{
1021 int count;
1022 int_fast64_t a;
1023 float64_t subjZ;
1024 uint_fast8_t subjFlags;
1025 float64_t trueZ;
1026 uint_fast8_t trueFlags;
1027
1028 verCases_errorCount = 0;
1029 verCases_tenThousandsCount = 0;
1030 count = 10000;
1031 while ( ! atEndOfInput() ) {
1032 readVerInput_i64( &a );
1033 readVerInput_f64( &subjZ );
1034 readVerInput_flags( &subjFlags );
1035 *verLoops_trueFlagsPtr = 0;
1036 trueZ = trueFunction( a );
1037 trueFlags = *verLoops_trueFlagsPtr;
1038 --count;
1039 if ( ! count ) {
1040 verCases_perTenThousand();
1041 count = 10000;
1042 }
1043 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1044 if (
1045 verCases_checkNaNs
1046 || ! f64_isNaN( trueZ )
1047 || ! f64_isNaN( subjZ )
1048 || f64_isSignalingNaN( subjZ )
1049 || (trueFlags != subjFlags)
1050 ) {
1051 ++verCases_errorCount;
1052 verCases_writeErrorFound( 10000 - count );
1053 writeCase_a_i64( a, "\n\t" );
1054 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
1055 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1056 }
1057 }
1058 }
1059 verCases_writeTestsPerformed( 10000 - count );
1060
1061}
1062
1063#endif
1064
1065#ifdef EXTFLOAT80
1066
1067void ver_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
1068{
1069 int count;
1070 int_fast64_t a;
1071 extFloat80_t subjZ;
1072 uint_fast8_t subjFlags;
1073 extFloat80_t trueZ;
1074 uint_fast8_t trueFlags;
1075
1076 verCases_errorCount = 0;
1077 verCases_tenThousandsCount = 0;
1078 count = 10000;
1079 while ( ! atEndOfInput() ) {
1080 readVerInput_i64( &a );
1081 readVerInput_extF80( &subjZ );
1082 readVerInput_flags( &subjFlags );
1083 *verLoops_trueFlagsPtr = 0;
1084 trueFunction( a, &trueZ );
1085 trueFlags = *verLoops_trueFlagsPtr;
1086 --count;
1087 if ( ! count ) {
1088 verCases_perTenThousand();
1089 count = 10000;
1090 }
1091 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
1092 if (
1093 verCases_checkNaNs
1094 || ! extF80M_isNaN( &trueZ )
1095 || ! extF80M_isNaN( &subjZ )
1096 || extF80M_isSignalingNaN( &subjZ )
1097 || (trueFlags != subjFlags)
1098 ) {
1099 ++verCases_errorCount;
1100 verCases_writeErrorFound( 10000 - count );
1101 writeCase_a_i64( a, "\n\t" );
1102 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
1103 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1104 }
1105 }
1106 }
1107 verCases_writeTestsPerformed( 10000 - count );
1108
1109}
1110
1111#endif
1112
1113#ifdef FLOAT128
1114
1115void ver_a_i64_z_f128( void trueFunction( int64_t, float128_t * ) )
1116{
1117 int count;
1118 int_fast64_t a;
1119 float128_t subjZ;
1120 uint_fast8_t subjFlags;
1121 float128_t trueZ;
1122 uint_fast8_t trueFlags;
1123
1124 verCases_errorCount = 0;
1125 verCases_tenThousandsCount = 0;
1126 count = 10000;
1127 while ( ! atEndOfInput() ) {
1128 readVerInput_i64( &a );
1129 readVerInput_f128( &subjZ );
1130 readVerInput_flags( &subjFlags );
1131 *verLoops_trueFlagsPtr = 0;
1132 trueFunction( a, &trueZ );
1133 trueFlags = *verLoops_trueFlagsPtr;
1134 --count;
1135 if ( ! count ) {
1136 verCases_perTenThousand();
1137 count = 10000;
1138 }
1139 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
1140 if (
1141 verCases_checkNaNs
1142 || ! f128M_isNaN( &trueZ )
1143 || ! f128M_isNaN( &subjZ )
1144 || f128M_isSignalingNaN( &subjZ )
1145 || (trueFlags != subjFlags)
1146 ) {
1147 ++verCases_errorCount;
1148 verCases_writeErrorFound( 10000 - count );
1149 writeCase_a_i64( a, " " );
1150 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
1151 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1152 }
1153 }
1154 }
1155 verCases_writeTestsPerformed( 10000 - count );
1156
1157}
1158
1159#endif
1160
1161/*----------------------------------------------------------------------------
1162*----------------------------------------------------------------------------*/
1163
1164#ifdef FLOAT16
1165
1166void
1167 ver_a_f16_z_ui32_rx(
1168 uint_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
1169 uint_fast8_t roundingMode,
1170 bool exact
1171 )
1172{
1173 int count;
1174 float16_t a;
1175 uint_fast32_t subjZ;
1176 uint_fast8_t subjFlags;
1177 uint_fast32_t trueZ;
1178 uint_fast8_t trueFlags;
1179
1180 verCases_errorCount = 0;
1181 verCases_tenThousandsCount = 0;
1182 count = 10000;
1183 while ( ! atEndOfInput() ) {
1184 readVerInput_f16( &a );
1185 readVerInput_ui32( &subjZ );
1186 readVerInput_flags( &subjFlags );
1187 *verLoops_trueFlagsPtr = 0;
1188 trueZ = trueFunction( a, roundingMode, exact );
1189 trueFlags = *verLoops_trueFlagsPtr;
1190 --count;
1191 if ( ! count ) {
1192 verCases_perTenThousand();
1193 count = 10000;
1194 }
1195 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1196 if (
1197 verCases_checkInvInts
1198 || (trueFlags != softfloat_flag_invalid)
1199 || (subjFlags != softfloat_flag_invalid)
1200 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
1201 ) {
1202 ++verCases_errorCount;
1203 verCases_writeErrorFound( 10000 - count );
1204 writeCase_a_f16( a );
1205 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
1206 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1207 }
1208 }
1209 }
1210 verCases_writeTestsPerformed( 10000 - count );
1211
1212}
1213
1214void
1215 ver_a_f16_z_ui64_rx(
1216 uint_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
1217 uint_fast8_t roundingMode,
1218 bool exact
1219 )
1220{
1221 int count;
1222 float16_t a;
1223 uint_fast64_t subjZ;
1224 uint_fast8_t subjFlags;
1225 uint_fast64_t trueZ;
1226 uint_fast8_t trueFlags;
1227
1228 verCases_errorCount = 0;
1229 verCases_tenThousandsCount = 0;
1230 count = 10000;
1231 while ( ! atEndOfInput() ) {
1232 readVerInput_f16( &a );
1233 readVerInput_ui64( &subjZ );
1234 readVerInput_flags( &subjFlags );
1235 *verLoops_trueFlagsPtr = 0;
1236 trueZ = trueFunction( a, roundingMode, exact );
1237 trueFlags = *verLoops_trueFlagsPtr;
1238 --count;
1239 if ( ! count ) {
1240 verCases_perTenThousand();
1241 count = 10000;
1242 }
1243 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1244 if (
1245 verCases_checkInvInts
1246 || (trueFlags != softfloat_flag_invalid)
1247 || (subjFlags != softfloat_flag_invalid)
1248 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
1249 ) {
1250 ++verCases_errorCount;
1251 verCases_writeErrorFound( 10000 - count );
1252 writeCase_a_f16( a );
1253 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
1254 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1255 }
1256 }
1257 }
1258 verCases_writeTestsPerformed( 10000 - count );
1259
1260}
1261
1262void
1263 ver_a_f16_z_i32_rx(
1264 int_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
1265 uint_fast8_t roundingMode,
1266 bool exact
1267 )
1268{
1269 int count;
1270 float16_t a;
1271 int_fast32_t subjZ;
1272 uint_fast8_t subjFlags;
1273 int_fast32_t trueZ;
1274 uint_fast8_t trueFlags;
1275
1276 verCases_errorCount = 0;
1277 verCases_tenThousandsCount = 0;
1278 count = 10000;
1279 while ( ! atEndOfInput() ) {
1280 readVerInput_f16( &a );
1281 readVerInput_i32( &subjZ );
1282 readVerInput_flags( &subjFlags );
1283 *verLoops_trueFlagsPtr = 0;
1284 trueZ = trueFunction( a, roundingMode, exact );
1285 trueFlags = *verLoops_trueFlagsPtr;
1286 --count;
1287 if ( ! count ) {
1288 verCases_perTenThousand();
1289 count = 10000;
1290 }
1291 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1292 if (
1293 verCases_checkInvInts
1294 || (trueFlags != softfloat_flag_invalid)
1295 || (subjFlags != softfloat_flag_invalid)
1296 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
1297 && (! f16_isNaN( a ) || (subjZ != 0)))
1298 ) {
1299 ++verCases_errorCount;
1300 verCases_writeErrorFound( 10000 - count );
1301 writeCase_a_f16( a );
1302 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
1303 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1304 }
1305 }
1306 }
1307 verCases_writeTestsPerformed( 10000 - count );
1308
1309}
1310
1311void
1312 ver_a_f16_z_i64_rx(
1313 int_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
1314 uint_fast8_t roundingMode,
1315 bool exact
1316 )
1317{
1318 int count;
1319 float16_t a;
1320 int_fast64_t subjZ;
1321 uint_fast8_t subjFlags;
1322 int_fast64_t trueZ;
1323 uint_fast8_t trueFlags;
1324
1325 verCases_errorCount = 0;
1326 verCases_tenThousandsCount = 0;
1327 count = 10000;
1328 while ( ! atEndOfInput() ) {
1329 readVerInput_f16( &a );
1330 readVerInput_i64( &subjZ );
1331 readVerInput_flags( &subjFlags );
1332 *verLoops_trueFlagsPtr = 0;
1333 trueZ = trueFunction( a, roundingMode, exact );
1334 trueFlags = *verLoops_trueFlagsPtr;
1335 --count;
1336 if ( ! count ) {
1337 verCases_perTenThousand();
1338 count = 10000;
1339 }
1340 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1341 if (
1342 verCases_checkInvInts
1343 || (trueFlags != softfloat_flag_invalid)
1344 || (subjFlags != softfloat_flag_invalid)
1345 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
1346 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
1347 && (! f16_isNaN( a ) || (subjZ != 0)))
1348 ) {
1349 ++verCases_errorCount;
1350 verCases_writeErrorFound( 10000 - count );
1351 writeCase_a_f16( a );
1352 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
1353 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1354 }
1355 }
1356 }
1357 verCases_writeTestsPerformed( 10000 - count );
1358
1359}
1360
1361void
1362 ver_a_f16_z_ui32_x(
1363 uint_fast32_t trueFunction( float16_t, bool ), bool exact )
1364{
1365 int count;
1366 float16_t a;
1367 uint_fast32_t subjZ;
1368 uint_fast8_t subjFlags;
1369 uint_fast32_t trueZ;
1370 uint_fast8_t trueFlags;
1371
1372 verCases_errorCount = 0;
1373 verCases_tenThousandsCount = 0;
1374 count = 10000;
1375 while ( ! atEndOfInput() ) {
1376 readVerInput_f16( &a );
1377 readVerInput_ui32( &subjZ );
1378 readVerInput_flags( &subjFlags );
1379 *verLoops_trueFlagsPtr = 0;
1380 trueZ = trueFunction( a, exact );
1381 trueFlags = *verLoops_trueFlagsPtr;
1382 --count;
1383 if ( ! count ) {
1384 verCases_perTenThousand();
1385 count = 10000;
1386 }
1387 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1388 if (
1389 verCases_checkInvInts
1390 || (trueFlags != softfloat_flag_invalid)
1391 || (subjFlags != softfloat_flag_invalid)
1392 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
1393 ) {
1394 ++verCases_errorCount;
1395 verCases_writeErrorFound( 10000 - count );
1396 writeCase_a_f16( a );
1397 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
1398 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1399 }
1400 }
1401 }
1402 verCases_writeTestsPerformed( 10000 - count );
1403
1404}
1405
1406void
1407 ver_a_f16_z_ui64_x(
1408 uint_fast64_t trueFunction( float16_t, bool ), bool exact )
1409{
1410 int count;
1411 float16_t a;
1412 uint_fast64_t subjZ;
1413 uint_fast8_t subjFlags;
1414 uint_fast64_t trueZ;
1415 uint_fast8_t trueFlags;
1416
1417 verCases_errorCount = 0;
1418 verCases_tenThousandsCount = 0;
1419 count = 10000;
1420 while ( ! atEndOfInput() ) {
1421 readVerInput_f16( &a );
1422 readVerInput_ui64( &subjZ );
1423 readVerInput_flags( &subjFlags );
1424 *verLoops_trueFlagsPtr = 0;
1425 trueZ = trueFunction( a, exact );
1426 trueFlags = *verLoops_trueFlagsPtr;
1427 --count;
1428 if ( ! count ) {
1429 verCases_perTenThousand();
1430 count = 10000;
1431 }
1432 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1433 if (
1434 verCases_checkInvInts
1435 || (trueFlags != softfloat_flag_invalid)
1436 || (subjFlags != softfloat_flag_invalid)
1437 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
1438 ) {
1439 ++verCases_errorCount;
1440 verCases_writeErrorFound( 10000 - count );
1441 writeCase_a_f16( a );
1442 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
1443 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1444 }
1445 }
1446 }
1447 verCases_writeTestsPerformed( 10000 - count );
1448
1449}
1450
1451void
1452 ver_a_f16_z_i32_x(
1453 int_fast32_t trueFunction( float16_t, bool ), bool exact )
1454{
1455 int count;
1456 float16_t a;
1457 int_fast32_t subjZ;
1458 uint_fast8_t subjFlags;
1459 int_fast32_t trueZ;
1460 uint_fast8_t trueFlags;
1461
1462 verCases_errorCount = 0;
1463 verCases_tenThousandsCount = 0;
1464 count = 10000;
1465 while ( ! atEndOfInput() ) {
1466 readVerInput_f16( &a );
1467 readVerInput_i32( &subjZ );
1468 readVerInput_flags( &subjFlags );
1469 *verLoops_trueFlagsPtr = 0;
1470 trueZ = trueFunction( a, exact );
1471 trueFlags = *verLoops_trueFlagsPtr;
1472 --count;
1473 if ( ! count ) {
1474 verCases_perTenThousand();
1475 count = 10000;
1476 }
1477 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1478 if (
1479 verCases_checkInvInts
1480 || (trueFlags != softfloat_flag_invalid)
1481 || (subjFlags != softfloat_flag_invalid)
1482 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
1483 && (! f16_isNaN( a ) || (subjZ != 0)))
1484 ) {
1485 ++verCases_errorCount;
1486 verCases_writeErrorFound( 10000 - count );
1487 writeCase_a_f16( a );
1488 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
1489 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1490 }
1491 }
1492 }
1493 verCases_writeTestsPerformed( 10000 - count );
1494
1495}
1496
1497void
1498 ver_a_f16_z_i64_x(
1499 int_fast64_t trueFunction( float16_t, bool ), bool exact )
1500{
1501 int count;
1502 float16_t a;
1503 int_fast64_t subjZ;
1504 uint_fast8_t subjFlags;
1505 int_fast64_t trueZ;
1506 uint_fast8_t trueFlags;
1507
1508 verCases_errorCount = 0;
1509 verCases_tenThousandsCount = 0;
1510 count = 10000;
1511 while ( ! atEndOfInput() ) {
1512 readVerInput_f16( &a );
1513 readVerInput_i64( &subjZ );
1514 readVerInput_flags( &subjFlags );
1515 *verLoops_trueFlagsPtr = 0;
1516 trueZ = trueFunction( a, exact );
1517 trueFlags = *verLoops_trueFlagsPtr;
1518 --count;
1519 if ( ! count ) {
1520 verCases_perTenThousand();
1521 count = 10000;
1522 }
1523 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1524 if (
1525 verCases_checkInvInts
1526 || (trueFlags != softfloat_flag_invalid)
1527 || (subjFlags != softfloat_flag_invalid)
1528 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
1529 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
1530 && (! f16_isNaN( a ) || (subjZ != 0)))
1531 ) {
1532 ++verCases_errorCount;
1533 verCases_writeErrorFound( 10000 - count );
1534 writeCase_a_f16( a );
1535 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
1536 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1537 }
1538 }
1539 }
1540 verCases_writeTestsPerformed( 10000 - count );
1541
1542}
1543
1544void ver_a_f16_z_f32( float32_t trueFunction( float16_t ) )
1545{
1546 int count;
1547 float16_t a;
1548 float32_t subjZ;
1549 uint_fast8_t subjFlags;
1550 float32_t trueZ;
1551 uint_fast8_t trueFlags;
1552
1553 verCases_errorCount = 0;
1554 verCases_tenThousandsCount = 0;
1555 count = 10000;
1556 while ( ! atEndOfInput() ) {
1557 readVerInput_f16( &a );
1558 readVerInput_f32( &subjZ );
1559 readVerInput_flags( &subjFlags );
1560 *verLoops_trueFlagsPtr = 0;
1561 trueZ = trueFunction( a );
1562 trueFlags = *verLoops_trueFlagsPtr;
1563 --count;
1564 if ( ! count ) {
1565 verCases_perTenThousand();
1566 count = 10000;
1567 }
1568 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1569 if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
1570 trueFlags |= softfloat_flag_invalid;
1571 }
1572 if (
1573 verCases_checkNaNs
1574 || ! f32_isNaN( trueZ )
1575 || ! f32_isNaN( subjZ )
1576 || f32_isSignalingNaN( subjZ )
1577 || (trueFlags != subjFlags)
1578 ) {
1579 ++verCases_errorCount;
1580 verCases_writeErrorFound( 10000 - count );
1581 writeCase_a_f16( a );
1582 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
1583 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1584 }
1585 }
1586 }
1587 verCases_writeTestsPerformed( 10000 - count );
1588
1589}
1590
1591#ifdef FLOAT64
1592
1593void ver_a_f16_z_f64( float64_t trueFunction( float16_t ) )
1594{
1595 int count;
1596 float16_t a;
1597 float64_t subjZ;
1598 uint_fast8_t subjFlags;
1599 float64_t trueZ;
1600 uint_fast8_t trueFlags;
1601
1602 verCases_errorCount = 0;
1603 verCases_tenThousandsCount = 0;
1604 count = 10000;
1605 while ( ! atEndOfInput() ) {
1606 readVerInput_f16( &a );
1607 readVerInput_f64( &subjZ );
1608 readVerInput_flags( &subjFlags );
1609 *verLoops_trueFlagsPtr = 0;
1610 trueZ = trueFunction( a );
1611 trueFlags = *verLoops_trueFlagsPtr;
1612 --count;
1613 if ( ! count ) {
1614 verCases_perTenThousand();
1615 count = 10000;
1616 }
1617 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1618 if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
1619 trueFlags |= softfloat_flag_invalid;
1620 }
1621 if (
1622 verCases_checkNaNs
1623 || ! f64_isNaN( trueZ )
1624 || ! f64_isNaN( subjZ )
1625 || f64_isSignalingNaN( subjZ )
1626 || (trueFlags != subjFlags)
1627 ) {
1628 ++verCases_errorCount;
1629 verCases_writeErrorFound( 10000 - count );
1630 writeCase_a_f16( a );
1631 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
1632 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1633 }
1634 }
1635 }
1636 verCases_writeTestsPerformed( 10000 - count );
1637
1638}
1639
1640#endif
1641
1642#ifdef EXTFLOAT80
1643
1644void ver_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
1645{
1646 int count;
1647 float16_t a;
1648 extFloat80_t subjZ;
1649 uint_fast8_t subjFlags;
1650 extFloat80_t trueZ;
1651 uint_fast8_t trueFlags;
1652
1653 verCases_errorCount = 0;
1654 verCases_tenThousandsCount = 0;
1655 count = 10000;
1656 while ( ! atEndOfInput() ) {
1657 readVerInput_f16( &a );
1658 readVerInput_extF80( &subjZ );
1659 readVerInput_flags( &subjFlags );
1660 *verLoops_trueFlagsPtr = 0;
1661 trueFunction( a, &trueZ );
1662 trueFlags = *verLoops_trueFlagsPtr;
1663 --count;
1664 if ( ! count ) {
1665 verCases_perTenThousand();
1666 count = 10000;
1667 }
1668 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
1669 if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
1670 trueFlags |= softfloat_flag_invalid;
1671 }
1672 if (
1673 verCases_checkNaNs
1674 || ! extF80M_isNaN( &trueZ )
1675 || ! extF80M_isNaN( &subjZ )
1676 || extF80M_isSignalingNaN( &subjZ )
1677 || (trueFlags != subjFlags)
1678 ) {
1679 ++verCases_errorCount;
1680 verCases_writeErrorFound( 10000 - count );
1681 writeCase_a_f16( a );
1682 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
1683 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1684 }
1685 }
1686 }
1687 verCases_writeTestsPerformed( 10000 - count );
1688
1689}
1690
1691#endif
1692
1693#ifdef FLOAT128
1694
1695void ver_a_f16_z_f128( void trueFunction( float16_t, float128_t * ) )
1696{
1697 int count;
1698 float16_t a;
1699 float128_t subjZ;
1700 uint_fast8_t subjFlags;
1701 float128_t trueZ;
1702 uint_fast8_t trueFlags;
1703
1704 verCases_errorCount = 0;
1705 verCases_tenThousandsCount = 0;
1706 count = 10000;
1707 while ( ! atEndOfInput() ) {
1708 readVerInput_f16( &a );
1709 readVerInput_f128( &subjZ );
1710 readVerInput_flags( &subjFlags );
1711 *verLoops_trueFlagsPtr = 0;
1712 trueFunction( a, &trueZ );
1713 trueFlags = *verLoops_trueFlagsPtr;
1714 --count;
1715 if ( ! count ) {
1716 verCases_perTenThousand();
1717 count = 10000;
1718 }
1719 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
1720 if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
1721 trueFlags |= softfloat_flag_invalid;
1722 }
1723 if (
1724 verCases_checkNaNs
1725 || ! f128M_isNaN( &trueZ )
1726 || ! f128M_isNaN( &subjZ )
1727 || f128M_isSignalingNaN( &subjZ )
1728 || (trueFlags != subjFlags)
1729 ) {
1730 ++verCases_errorCount;
1731 verCases_writeErrorFound( 10000 - count );
1732 writeCase_a_f16( a );
1733 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
1734 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1735 }
1736 }
1737 }
1738 verCases_writeTestsPerformed( 10000 - count );
1739
1740}
1741
1742#endif
1743
1744void ver_az_f16( float16_t trueFunction( float16_t ) )
1745{
1746 int count;
1747 float16_t a, subjZ;
1748 uint_fast8_t subjFlags;
1749 float16_t trueZ;
1750 uint_fast8_t trueFlags;
1751
1752 verCases_errorCount = 0;
1753 verCases_tenThousandsCount = 0;
1754 count = 10000;
1755 while ( ! atEndOfInput() ) {
1756 readVerInput_f16( &a );
1757 readVerInput_f16( &subjZ );
1758 readVerInput_flags( &subjFlags );
1759 *verLoops_trueFlagsPtr = 0;
1760 trueZ = trueFunction( a );
1761 trueFlags = *verLoops_trueFlagsPtr;
1762 --count;
1763 if ( ! count ) {
1764 verCases_perTenThousand();
1765 count = 10000;
1766 }
1767 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1768 if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
1769 trueFlags |= softfloat_flag_invalid;
1770 }
1771 if (
1772 verCases_checkNaNs
1773 || ! f16_isNaN( trueZ )
1774 || ! f16_isNaN( subjZ )
1775 || f16_isSignalingNaN( subjZ )
1776 || (trueFlags != subjFlags)
1777 ) {
1778 ++verCases_errorCount;
1779 verCases_writeErrorFound( 10000 - count );
1780 writeCase_a_f16( a );
1781 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
1782 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1783 }
1784 }
1785 }
1786 verCases_writeTestsPerformed( 10000 - count );
1787
1788}
1789
1790void
1791 ver_az_f16_rx(
1792 float16_t trueFunction( float16_t, uint_fast8_t, bool ),
1793 uint_fast8_t roundingMode,
1794 bool exact
1795 )
1796{
1797 int count;
1798 float16_t a, subjZ;
1799 uint_fast8_t subjFlags;
1800 float16_t trueZ;
1801 uint_fast8_t trueFlags;
1802
1803 verCases_errorCount = 0;
1804 verCases_tenThousandsCount = 0;
1805 count = 10000;
1806 while ( ! atEndOfInput() ) {
1807 readVerInput_f16( &a );
1808 readVerInput_f16( &subjZ );
1809 readVerInput_flags( &subjFlags );
1810 *verLoops_trueFlagsPtr = 0;
1811 trueZ = trueFunction( a, roundingMode, exact );
1812 trueFlags = *verLoops_trueFlagsPtr;
1813 --count;
1814 if ( ! count ) {
1815 verCases_perTenThousand();
1816 count = 10000;
1817 }
1818 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1819 if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
1820 trueFlags |= softfloat_flag_invalid;
1821 }
1822 if (
1823 verCases_checkNaNs
1824 || ! f16_isNaN( trueZ )
1825 || ! f16_isNaN( subjZ )
1826 || f16_isSignalingNaN( subjZ )
1827 || (trueFlags != subjFlags)
1828 ) {
1829 ++verCases_errorCount;
1830 verCases_writeErrorFound( 10000 - count );
1831 writeCase_a_f16( a );
1832 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
1833 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1834 }
1835 }
1836 }
1837 verCases_writeTestsPerformed( 10000 - count );
1838
1839}
1840
1841void ver_abz_f16( float16_t trueFunction( float16_t, float16_t ) )
1842{
1843 int count;
1844 float16_t a, b, subjZ;
1845 uint_fast8_t subjFlags;
1846 float16_t trueZ;
1847 uint_fast8_t trueFlags;
1848
1849 verCases_errorCount = 0;
1850 verCases_tenThousandsCount = 0;
1851 count = 10000;
1852 while ( ! atEndOfInput() ) {
1853 readVerInput_f16( &a );
1854 readVerInput_f16( &b );
1855 readVerInput_f16( &subjZ );
1856 readVerInput_flags( &subjFlags );
1857 *verLoops_trueFlagsPtr = 0;
1858 trueZ = trueFunction( a, b );
1859 trueFlags = *verLoops_trueFlagsPtr;
1860 --count;
1861 if ( ! count ) {
1862 verCases_perTenThousand();
1863 count = 10000;
1864 }
1865 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1866 if (
1867 ! verCases_checkNaNs
1868 && (f16_isSignalingNaN( a ) || f16_isSignalingNaN( b ))
1869 ) {
1870 trueFlags |= softfloat_flag_invalid;
1871 }
1872 if (
1873 verCases_checkNaNs
1874 || ! f16_isNaN( trueZ )
1875 || ! f16_isNaN( subjZ )
1876 || f16_isSignalingNaN( subjZ )
1877 || (trueFlags != subjFlags)
1878 ) {
1879 ++verCases_errorCount;
1880 verCases_writeErrorFound( 10000 - count );
1881 writeCase_ab_f16( a, b );
1882 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
1883 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1884 }
1885 }
1886 }
1887 verCases_writeTestsPerformed( 10000 - count );
1888
1889}
1890
1891void ver_abcz_f16( float16_t trueFunction( float16_t, float16_t, float16_t ) )
1892{
1893 int count;
1894 float16_t a, b, c, subjZ;
1895 uint_fast8_t subjFlags;
1896 float16_t trueZ;
1897 uint_fast8_t trueFlags;
1898
1899 verCases_errorCount = 0;
1900 verCases_tenThousandsCount = 0;
1901 count = 10000;
1902 while ( ! atEndOfInput() ) {
1903 readVerInput_f16( &a );
1904 readVerInput_f16( &b );
1905 readVerInput_f16( &c );
1906 readVerInput_f16( &subjZ );
1907 readVerInput_flags( &subjFlags );
1908 *verLoops_trueFlagsPtr = 0;
1909 trueZ = trueFunction( a, b, c );
1910 trueFlags = *verLoops_trueFlagsPtr;
1911 --count;
1912 if ( ! count ) {
1913 verCases_perTenThousand();
1914 count = 10000;
1915 }
1916 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
1917 if (
1918 ! verCases_checkNaNs
1919 && (f16_isSignalingNaN( a ) || f16_isSignalingNaN( b )
1920 || f16_isSignalingNaN( c ))
1921 ) {
1922 trueFlags |= softfloat_flag_invalid;
1923 }
1924 if (
1925 verCases_checkNaNs
1926 || ! f16_isNaN( trueZ )
1927 || ! f16_isNaN( subjZ )
1928 || f16_isSignalingNaN( subjZ )
1929 || (trueFlags != subjFlags)
1930 ) {
1931 ++verCases_errorCount;
1932 verCases_writeErrorFound( 10000 - count );
1933 writeCase_abc_f16( a, b, c );
1934 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
1935 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1936 }
1937 }
1938 }
1939 verCases_writeTestsPerformed( 10000 - count );
1940
1941}
1942
1943void ver_ab_f16_z_bool( bool trueFunction( float16_t, float16_t ) )
1944{
1945 int count;
1946 float16_t a, b;
1947 bool subjZ;
1948 uint_fast8_t subjFlags;
1949 bool trueZ;
1950 uint_fast8_t trueFlags;
1951
1952 verCases_errorCount = 0;
1953 verCases_tenThousandsCount = 0;
1954 count = 10000;
1955 while ( ! atEndOfInput() ) {
1956 readVerInput_f16( &a );
1957 readVerInput_f16( &b );
1958 readVerInput_bool( &subjZ );
1959 readVerInput_flags( &subjFlags );
1960 *verLoops_trueFlagsPtr = 0;
1961 trueZ = trueFunction( a, b );
1962 trueFlags = *verLoops_trueFlagsPtr;
1963 --count;
1964 if ( ! count ) {
1965 verCases_perTenThousand();
1966 count = 10000;
1967 }
1968 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1969 if (
1970 ! verCases_checkNaNs
1971 && (f16_isSignalingNaN( a ) || f16_isSignalingNaN( b ))
1972 ) {
1973 trueFlags |= softfloat_flag_invalid;
1974 }
1975 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
1976 ++verCases_errorCount;
1977 verCases_writeErrorFound( 10000 - count );
1978 writeCase_ab_f16( a, b );
1979 writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
1980 if ( verCases_errorCount == verCases_maxErrorCount ) break;
1981 }
1982 }
1983 }
1984 verCases_writeTestsPerformed( 10000 - count );
1985
1986}
1987
1988#endif
1989
1990/*----------------------------------------------------------------------------
1991*----------------------------------------------------------------------------*/
1992
1993void
1994 ver_a_f32_z_ui32_rx(
1995 uint_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
1996 uint_fast8_t roundingMode,
1997 bool exact
1998 )
1999{
2000 int count;
2001 float32_t a;
2002 uint_fast32_t subjZ;
2003 uint_fast8_t subjFlags;
2004 uint_fast32_t trueZ;
2005 uint_fast8_t trueFlags;
2006
2007 verCases_errorCount = 0;
2008 verCases_tenThousandsCount = 0;
2009 count = 10000;
2010 while ( ! atEndOfInput() ) {
2011 readVerInput_f32( &a );
2012 readVerInput_ui32( &subjZ );
2013 readVerInput_flags( &subjFlags );
2014 *verLoops_trueFlagsPtr = 0;
2015 trueZ = trueFunction( a, roundingMode, exact );
2016 trueFlags = *verLoops_trueFlagsPtr;
2017 --count;
2018 if ( ! count ) {
2019 verCases_perTenThousand();
2020 count = 10000;
2021 }
2022 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2023 if (
2024 verCases_checkInvInts
2025 || (trueFlags != softfloat_flag_invalid)
2026 || (subjFlags != softfloat_flag_invalid)
2027 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
2028 ) {
2029 ++verCases_errorCount;
2030 verCases_writeErrorFound( 10000 - count );
2031 writeCase_a_f32( a, " " );
2032 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
2033 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2034 }
2035 }
2036 }
2037 verCases_writeTestsPerformed( 10000 - count );
2038
2039}
2040
2041void
2042 ver_a_f32_z_ui64_rx(
2043 uint_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
2044 uint_fast8_t roundingMode,
2045 bool exact
2046 )
2047{
2048 int count;
2049 float32_t a;
2050 uint_fast64_t subjZ;
2051 uint_fast8_t subjFlags;
2052 uint_fast64_t trueZ;
2053 uint_fast8_t trueFlags;
2054
2055 verCases_errorCount = 0;
2056 verCases_tenThousandsCount = 0;
2057 count = 10000;
2058 while ( ! atEndOfInput() ) {
2059 readVerInput_f32( &a );
2060 readVerInput_ui64( &subjZ );
2061 readVerInput_flags( &subjFlags );
2062 *verLoops_trueFlagsPtr = 0;
2063 trueZ = trueFunction( a, roundingMode, exact );
2064 trueFlags = *verLoops_trueFlagsPtr;
2065 --count;
2066 if ( ! count ) {
2067 verCases_perTenThousand();
2068 count = 10000;
2069 }
2070 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2071 if (
2072 verCases_checkInvInts
2073 || (trueFlags != softfloat_flag_invalid)
2074 || (subjFlags != softfloat_flag_invalid)
2075 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
2076 ) {
2077 ++verCases_errorCount;
2078 verCases_writeErrorFound( 10000 - count );
2079 writeCase_a_f32( a, " " );
2080 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
2081 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2082 }
2083 }
2084 }
2085 verCases_writeTestsPerformed( 10000 - count );
2086
2087}
2088
2089void
2090 ver_a_f32_z_i32_rx(
2091 int_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
2092 uint_fast8_t roundingMode,
2093 bool exact
2094 )
2095{
2096 int count;
2097 float32_t a;
2098 int_fast32_t subjZ;
2099 uint_fast8_t subjFlags;
2100 int_fast32_t trueZ;
2101 uint_fast8_t trueFlags;
2102
2103 verCases_errorCount = 0;
2104 verCases_tenThousandsCount = 0;
2105 count = 10000;
2106 while ( ! atEndOfInput() ) {
2107 readVerInput_f32( &a );
2108 readVerInput_i32( &subjZ );
2109 readVerInput_flags( &subjFlags );
2110 *verLoops_trueFlagsPtr = 0;
2111 trueZ = trueFunction( a, roundingMode, exact );
2112 trueFlags = *verLoops_trueFlagsPtr;
2113 --count;
2114 if ( ! count ) {
2115 verCases_perTenThousand();
2116 count = 10000;
2117 }
2118 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2119 if (
2120 verCases_checkInvInts
2121 || (trueFlags != softfloat_flag_invalid)
2122 || (subjFlags != softfloat_flag_invalid)
2123 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
2124 && (! f32_isNaN( a ) || (subjZ != 0)))
2125 ) {
2126 ++verCases_errorCount;
2127 verCases_writeErrorFound( 10000 - count );
2128 writeCase_a_f32( a, " " );
2129 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
2130 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2131 }
2132 }
2133 }
2134 verCases_writeTestsPerformed( 10000 - count );
2135
2136}
2137
2138void
2139 ver_a_f32_z_i64_rx(
2140 int_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
2141 uint_fast8_t roundingMode,
2142 bool exact
2143 )
2144{
2145 int count;
2146 float32_t a;
2147 int_fast64_t subjZ;
2148 uint_fast8_t subjFlags;
2149 int_fast64_t trueZ;
2150 uint_fast8_t trueFlags;
2151
2152 verCases_errorCount = 0;
2153 verCases_tenThousandsCount = 0;
2154 count = 10000;
2155 while ( ! atEndOfInput() ) {
2156 readVerInput_f32( &a );
2157 readVerInput_i64( &subjZ );
2158 readVerInput_flags( &subjFlags );
2159 *verLoops_trueFlagsPtr = 0;
2160 trueZ = trueFunction( a, roundingMode, exact );
2161 trueFlags = *verLoops_trueFlagsPtr;
2162 --count;
2163 if ( ! count ) {
2164 verCases_perTenThousand();
2165 count = 10000;
2166 }
2167 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2168 if (
2169 verCases_checkInvInts
2170 || (trueFlags != softfloat_flag_invalid)
2171 || (subjFlags != softfloat_flag_invalid)
2172 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
2173 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
2174 && (! f32_isNaN( a ) || (subjZ != 0)))
2175 ) {
2176 ++verCases_errorCount;
2177 verCases_writeErrorFound( 10000 - count );
2178 writeCase_a_f32( a, " " );
2179 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
2180 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2181 }
2182 }
2183 }
2184 verCases_writeTestsPerformed( 10000 - count );
2185
2186}
2187
2188void
2189 ver_a_f32_z_ui32_x(
2190 uint_fast32_t trueFunction( float32_t, bool ), bool exact )
2191{
2192 int count;
2193 float32_t a;
2194 uint_fast32_t subjZ;
2195 uint_fast8_t subjFlags;
2196 uint_fast32_t trueZ;
2197 uint_fast8_t trueFlags;
2198
2199 verCases_errorCount = 0;
2200 verCases_tenThousandsCount = 0;
2201 count = 10000;
2202 while ( ! atEndOfInput() ) {
2203 readVerInput_f32( &a );
2204 readVerInput_ui32( &subjZ );
2205 readVerInput_flags( &subjFlags );
2206 *verLoops_trueFlagsPtr = 0;
2207 trueZ = trueFunction( a, exact );
2208 trueFlags = *verLoops_trueFlagsPtr;
2209 --count;
2210 if ( ! count ) {
2211 verCases_perTenThousand();
2212 count = 10000;
2213 }
2214 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2215 if (
2216 verCases_checkInvInts
2217 || (trueFlags != softfloat_flag_invalid)
2218 || (subjFlags != softfloat_flag_invalid)
2219 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
2220 ) {
2221 ++verCases_errorCount;
2222 verCases_writeErrorFound( 10000 - count );
2223 writeCase_a_f32( a, " " );
2224 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
2225 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2226 }
2227 }
2228 }
2229 verCases_writeTestsPerformed( 10000 - count );
2230
2231}
2232
2233void
2234 ver_a_f32_z_ui64_x(
2235 uint_fast64_t trueFunction( float32_t, bool ), bool exact )
2236{
2237 int count;
2238 float32_t a;
2239 uint_fast64_t subjZ;
2240 uint_fast8_t subjFlags;
2241 uint_fast64_t trueZ;
2242 uint_fast8_t trueFlags;
2243
2244 verCases_errorCount = 0;
2245 verCases_tenThousandsCount = 0;
2246 count = 10000;
2247 while ( ! atEndOfInput() ) {
2248 readVerInput_f32( &a );
2249 readVerInput_ui64( &subjZ );
2250 readVerInput_flags( &subjFlags );
2251 *verLoops_trueFlagsPtr = 0;
2252 trueZ = trueFunction( a, exact );
2253 trueFlags = *verLoops_trueFlagsPtr;
2254 --count;
2255 if ( ! count ) {
2256 verCases_perTenThousand();
2257 count = 10000;
2258 }
2259 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2260 if (
2261 verCases_checkInvInts
2262 || (trueFlags != softfloat_flag_invalid)
2263 || (subjFlags != softfloat_flag_invalid)
2264 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
2265 ) {
2266 ++verCases_errorCount;
2267 verCases_writeErrorFound( 10000 - count );
2268 writeCase_a_f32( a, " " );
2269 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
2270 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2271 }
2272 }
2273 }
2274 verCases_writeTestsPerformed( 10000 - count );
2275
2276}
2277
2278void
2279 ver_a_f32_z_i32_x(
2280 int_fast32_t trueFunction( float32_t, bool ), bool exact )
2281{
2282 int count;
2283 float32_t a;
2284 int_fast32_t subjZ;
2285 uint_fast8_t subjFlags;
2286 int_fast32_t trueZ;
2287 uint_fast8_t trueFlags;
2288
2289 verCases_errorCount = 0;
2290 verCases_tenThousandsCount = 0;
2291 count = 10000;
2292 while ( ! atEndOfInput() ) {
2293 readVerInput_f32( &a );
2294 readVerInput_i32( &subjZ );
2295 readVerInput_flags( &subjFlags );
2296 *verLoops_trueFlagsPtr = 0;
2297 trueZ = trueFunction( a, exact );
2298 trueFlags = *verLoops_trueFlagsPtr;
2299 --count;
2300 if ( ! count ) {
2301 verCases_perTenThousand();
2302 count = 10000;
2303 }
2304 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2305 if (
2306 verCases_checkInvInts
2307 || (trueFlags != softfloat_flag_invalid)
2308 || (subjFlags != softfloat_flag_invalid)
2309 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
2310 && (! f32_isNaN( a ) || (subjZ != 0)))
2311 ) {
2312 ++verCases_errorCount;
2313 verCases_writeErrorFound( 10000 - count );
2314 writeCase_a_f32( a, " " );
2315 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
2316 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2317 }
2318 }
2319 }
2320 verCases_writeTestsPerformed( 10000 - count );
2321
2322}
2323
2324void
2325 ver_a_f32_z_i64_x(
2326 int_fast64_t trueFunction( float32_t, bool ), bool exact )
2327{
2328 int count;
2329 float32_t a;
2330 int_fast64_t subjZ;
2331 uint_fast8_t subjFlags;
2332 int_fast64_t trueZ;
2333 uint_fast8_t trueFlags;
2334
2335 verCases_errorCount = 0;
2336 verCases_tenThousandsCount = 0;
2337 count = 10000;
2338 while ( ! atEndOfInput() ) {
2339 readVerInput_f32( &a );
2340 readVerInput_i64( &subjZ );
2341 readVerInput_flags( &subjFlags );
2342 *verLoops_trueFlagsPtr = 0;
2343 trueZ = trueFunction( a, exact );
2344 trueFlags = *verLoops_trueFlagsPtr;
2345 --count;
2346 if ( ! count ) {
2347 verCases_perTenThousand();
2348 count = 10000;
2349 }
2350 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2351 if (
2352 verCases_checkInvInts
2353 || (trueFlags != softfloat_flag_invalid)
2354 || (subjFlags != softfloat_flag_invalid)
2355 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
2356 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
2357 && (! f32_isNaN( a ) || (subjZ != 0)))
2358 ) {
2359 ++verCases_errorCount;
2360 verCases_writeErrorFound( 10000 - count );
2361 writeCase_a_f32( a, " " );
2362 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
2363 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2364 }
2365 }
2366 }
2367 verCases_writeTestsPerformed( 10000 - count );
2368
2369}
2370
2371#ifdef FLOAT16
2372
2373void ver_a_f32_z_f16( float16_t trueFunction( float32_t ) )
2374{
2375 int count;
2376 float32_t a;
2377 float16_t subjZ;
2378 uint_fast8_t subjFlags;
2379 float16_t trueZ;
2380 uint_fast8_t trueFlags;
2381
2382 verCases_errorCount = 0;
2383 verCases_tenThousandsCount = 0;
2384 count = 10000;
2385 while ( ! atEndOfInput() ) {
2386 readVerInput_f32( &a );
2387 readVerInput_f16( &subjZ );
2388 readVerInput_flags( &subjFlags );
2389 *verLoops_trueFlagsPtr = 0;
2390 trueZ = trueFunction( a );
2391 trueFlags = *verLoops_trueFlagsPtr;
2392 --count;
2393 if ( ! count ) {
2394 verCases_perTenThousand();
2395 count = 10000;
2396 }
2397 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
2398 if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
2399 trueFlags |= softfloat_flag_invalid;
2400 }
2401 if (
2402 verCases_checkNaNs
2403 || ! f16_isNaN( trueZ )
2404 || ! f16_isNaN( subjZ )
2405 || f16_isSignalingNaN( subjZ )
2406 || (trueFlags != subjFlags)
2407 ) {
2408 ++verCases_errorCount;
2409 verCases_writeErrorFound( 10000 - count );
2410 writeCase_a_f32( a, " " );
2411 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
2412 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2413 }
2414 }
2415 }
2416 verCases_writeTestsPerformed( 10000 - count );
2417
2418}
2419
2420#endif
2421
2422#ifdef FLOAT64
2423
2424void ver_a_f32_z_f64( float64_t trueFunction( float32_t ) )
2425{
2426 int count;
2427 float32_t a;
2428 float64_t subjZ;
2429 uint_fast8_t subjFlags;
2430 float64_t trueZ;
2431 uint_fast8_t trueFlags;
2432
2433 verCases_errorCount = 0;
2434 verCases_tenThousandsCount = 0;
2435 count = 10000;
2436 while ( ! atEndOfInput() ) {
2437 readVerInput_f32( &a );
2438 readVerInput_f64( &subjZ );
2439 readVerInput_flags( &subjFlags );
2440 *verLoops_trueFlagsPtr = 0;
2441 trueZ = trueFunction( a );
2442 trueFlags = *verLoops_trueFlagsPtr;
2443 --count;
2444 if ( ! count ) {
2445 verCases_perTenThousand();
2446 count = 10000;
2447 }
2448 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
2449 if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
2450 trueFlags |= softfloat_flag_invalid;
2451 }
2452 if (
2453 verCases_checkNaNs
2454 || ! f64_isNaN( trueZ )
2455 || ! f64_isNaN( subjZ )
2456 || f64_isSignalingNaN( subjZ )
2457 || (trueFlags != subjFlags)
2458 ) {
2459 ++verCases_errorCount;
2460 verCases_writeErrorFound( 10000 - count );
2461 writeCase_a_f32( a, " " );
2462 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
2463 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2464 }
2465 }
2466 }
2467 verCases_writeTestsPerformed( 10000 - count );
2468
2469}
2470
2471#endif
2472
2473#ifdef EXTFLOAT80
2474
2475void ver_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
2476{
2477 int count;
2478 float32_t a;
2479 extFloat80_t subjZ;
2480 uint_fast8_t subjFlags;
2481 extFloat80_t trueZ;
2482 uint_fast8_t trueFlags;
2483
2484 verCases_errorCount = 0;
2485 verCases_tenThousandsCount = 0;
2486 count = 10000;
2487 while ( ! atEndOfInput() ) {
2488 readVerInput_f32( &a );
2489 readVerInput_extF80( &subjZ );
2490 readVerInput_flags( &subjFlags );
2491 *verLoops_trueFlagsPtr = 0;
2492 trueFunction( a, &trueZ );
2493 trueFlags = *verLoops_trueFlagsPtr;
2494 --count;
2495 if ( ! count ) {
2496 verCases_perTenThousand();
2497 count = 10000;
2498 }
2499 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
2500 if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
2501 trueFlags |= softfloat_flag_invalid;
2502 }
2503 if (
2504 verCases_checkNaNs
2505 || ! extF80M_isNaN( &trueZ )
2506 || ! extF80M_isNaN( &subjZ )
2507 || extF80M_isSignalingNaN( &subjZ )
2508 || (trueFlags != subjFlags)
2509 ) {
2510 ++verCases_errorCount;
2511 verCases_writeErrorFound( 10000 - count );
2512 writeCase_a_f32( a, "\n\t" );
2513 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
2514 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2515 }
2516 }
2517 }
2518 verCases_writeTestsPerformed( 10000 - count );
2519
2520}
2521
2522#endif
2523
2524#ifdef FLOAT128
2525
2526void ver_a_f32_z_f128( void trueFunction( float32_t, float128_t * ) )
2527{
2528 int count;
2529 float32_t a;
2530 float128_t subjZ;
2531 uint_fast8_t subjFlags;
2532 float128_t trueZ;
2533 uint_fast8_t trueFlags;
2534
2535 verCases_errorCount = 0;
2536 verCases_tenThousandsCount = 0;
2537 count = 10000;
2538 while ( ! atEndOfInput() ) {
2539 readVerInput_f32( &a );
2540 readVerInput_f128( &subjZ );
2541 readVerInput_flags( &subjFlags );
2542 *verLoops_trueFlagsPtr = 0;
2543 trueFunction( a, &trueZ );
2544 trueFlags = *verLoops_trueFlagsPtr;
2545 --count;
2546 if ( ! count ) {
2547 verCases_perTenThousand();
2548 count = 10000;
2549 }
2550 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
2551 if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
2552 trueFlags |= softfloat_flag_invalid;
2553 }
2554 if (
2555 verCases_checkNaNs
2556 || ! f128M_isNaN( &trueZ )
2557 || ! f128M_isNaN( &subjZ )
2558 || f128M_isSignalingNaN( &subjZ )
2559 || (trueFlags != subjFlags)
2560 ) {
2561 ++verCases_errorCount;
2562 verCases_writeErrorFound( 10000 - count );
2563 writeCase_a_f32( a, " " );
2564 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
2565 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2566 }
2567 }
2568 }
2569 verCases_writeTestsPerformed( 10000 - count );
2570
2571}
2572
2573#endif
2574
2575void ver_az_f32( float32_t trueFunction( float32_t ) )
2576{
2577 int count;
2578 float32_t a, subjZ;
2579 uint_fast8_t subjFlags;
2580 float32_t trueZ;
2581 uint_fast8_t trueFlags;
2582
2583 verCases_errorCount = 0;
2584 verCases_tenThousandsCount = 0;
2585 count = 10000;
2586 while ( ! atEndOfInput() ) {
2587 readVerInput_f32( &a );
2588 readVerInput_f32( &subjZ );
2589 readVerInput_flags( &subjFlags );
2590 *verLoops_trueFlagsPtr = 0;
2591 trueZ = trueFunction( a );
2592 trueFlags = *verLoops_trueFlagsPtr;
2593 --count;
2594 if ( ! count ) {
2595 verCases_perTenThousand();
2596 count = 10000;
2597 }
2598 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
2599 if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
2600 trueFlags |= softfloat_flag_invalid;
2601 }
2602 if (
2603 verCases_checkNaNs
2604 || ! f32_isNaN( trueZ )
2605 || ! f32_isNaN( subjZ )
2606 || f32_isSignalingNaN( subjZ )
2607 || (trueFlags != subjFlags)
2608 ) {
2609 ++verCases_errorCount;
2610 verCases_writeErrorFound( 10000 - count );
2611 writeCase_a_f32( a, " " );
2612 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
2613 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2614 }
2615 }
2616 }
2617 verCases_writeTestsPerformed( 10000 - count );
2618
2619}
2620
2621void
2622 ver_az_f32_rx(
2623 float32_t trueFunction( float32_t, uint_fast8_t, bool ),
2624 uint_fast8_t roundingMode,
2625 bool exact
2626 )
2627{
2628 int count;
2629 float32_t a, subjZ;
2630 uint_fast8_t subjFlags;
2631 float32_t trueZ;
2632 uint_fast8_t trueFlags;
2633
2634 verCases_errorCount = 0;
2635 verCases_tenThousandsCount = 0;
2636 count = 10000;
2637 while ( ! atEndOfInput() ) {
2638 readVerInput_f32( &a );
2639 readVerInput_f32( &subjZ );
2640 readVerInput_flags( &subjFlags );
2641 *verLoops_trueFlagsPtr = 0;
2642 trueZ = trueFunction( a, roundingMode, exact );
2643 trueFlags = *verLoops_trueFlagsPtr;
2644 --count;
2645 if ( ! count ) {
2646 verCases_perTenThousand();
2647 count = 10000;
2648 }
2649 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
2650 if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
2651 trueFlags |= softfloat_flag_invalid;
2652 }
2653 if (
2654 verCases_checkNaNs
2655 || ! f32_isNaN( trueZ )
2656 || ! f32_isNaN( subjZ )
2657 || f32_isSignalingNaN( subjZ )
2658 || (trueFlags != subjFlags)
2659 ) {
2660 ++verCases_errorCount;
2661 verCases_writeErrorFound( 10000 - count );
2662 writeCase_a_f32( a, " " );
2663 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
2664 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2665 }
2666 }
2667 }
2668 verCases_writeTestsPerformed( 10000 - count );
2669
2670}
2671
2672void ver_abz_f32( float32_t trueFunction( float32_t, float32_t ) )
2673{
2674 int count;
2675 float32_t a, b, subjZ;
2676 uint_fast8_t subjFlags;
2677 float32_t trueZ;
2678 uint_fast8_t trueFlags;
2679
2680 verCases_errorCount = 0;
2681 verCases_tenThousandsCount = 0;
2682 count = 10000;
2683 while ( ! atEndOfInput() ) {
2684 readVerInput_f32( &a );
2685 readVerInput_f32( &b );
2686 readVerInput_f32( &subjZ );
2687 readVerInput_flags( &subjFlags );
2688 *verLoops_trueFlagsPtr = 0;
2689 trueZ = trueFunction( a, b );
2690 trueFlags = *verLoops_trueFlagsPtr;
2691 --count;
2692 if ( ! count ) {
2693 verCases_perTenThousand();
2694 count = 10000;
2695 }
2696 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
2697 if (
2698 ! verCases_checkNaNs
2699 && (f32_isSignalingNaN( a ) || f32_isSignalingNaN( b ))
2700 ) {
2701 trueFlags |= softfloat_flag_invalid;
2702 }
2703 if (
2704 verCases_checkNaNs
2705 || ! f32_isNaN( trueZ )
2706 || ! f32_isNaN( subjZ )
2707 || f32_isSignalingNaN( subjZ )
2708 || (trueFlags != subjFlags)
2709 ) {
2710 ++verCases_errorCount;
2711 verCases_writeErrorFound( 10000 - count );
2712 writeCase_ab_f32( a, b );
2713 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
2714 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2715 }
2716 }
2717 }
2718 verCases_writeTestsPerformed( 10000 - count );
2719
2720}
2721
2722void ver_abcz_f32( float32_t trueFunction( float32_t, float32_t, float32_t ) )
2723{
2724 int count;
2725 float32_t a, b, c, subjZ;
2726 uint_fast8_t subjFlags;
2727 float32_t trueZ;
2728 uint_fast8_t trueFlags;
2729
2730 verCases_errorCount = 0;
2731 verCases_tenThousandsCount = 0;
2732 count = 10000;
2733 while ( ! atEndOfInput() ) {
2734 readVerInput_f32( &a );
2735 readVerInput_f32( &b );
2736 readVerInput_f32( &c );
2737 readVerInput_f32( &subjZ );
2738 readVerInput_flags( &subjFlags );
2739 *verLoops_trueFlagsPtr = 0;
2740 trueZ = trueFunction( a, b, c );
2741 trueFlags = *verLoops_trueFlagsPtr;
2742 --count;
2743 if ( ! count ) {
2744 verCases_perTenThousand();
2745 count = 10000;
2746 }
2747 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
2748 if (
2749 ! verCases_checkNaNs
2750 && (f32_isSignalingNaN( a ) || f32_isSignalingNaN( b )
2751 || f32_isSignalingNaN( c ))
2752 ) {
2753 trueFlags |= softfloat_flag_invalid;
2754 }
2755 if (
2756 verCases_checkNaNs
2757 || ! f32_isNaN( trueZ )
2758 || ! f32_isNaN( subjZ )
2759 || f32_isSignalingNaN( subjZ )
2760 || (trueFlags != subjFlags)
2761 ) {
2762 ++verCases_errorCount;
2763 verCases_writeErrorFound( 10000 - count );
2764 writeCase_abc_f32( a, b, c );
2765 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
2766 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2767 }
2768 }
2769 }
2770 verCases_writeTestsPerformed( 10000 - count );
2771
2772}
2773
2774void ver_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
2775{
2776 int count;
2777 float32_t a, b;
2778 bool subjZ;
2779 uint_fast8_t subjFlags;
2780 bool trueZ;
2781 uint_fast8_t trueFlags;
2782
2783 verCases_errorCount = 0;
2784 verCases_tenThousandsCount = 0;
2785 count = 10000;
2786 while ( ! atEndOfInput() ) {
2787 readVerInput_f32( &a );
2788 readVerInput_f32( &b );
2789 readVerInput_bool( &subjZ );
2790 readVerInput_flags( &subjFlags );
2791 *verLoops_trueFlagsPtr = 0;
2792 trueZ = trueFunction( a, b );
2793 trueFlags = *verLoops_trueFlagsPtr;
2794 --count;
2795 if ( ! count ) {
2796 verCases_perTenThousand();
2797 count = 10000;
2798 }
2799 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2800 if (
2801 ! verCases_checkNaNs
2802 && (f32_isSignalingNaN( a ) || f32_isSignalingNaN( b ))
2803 ) {
2804 trueFlags |= softfloat_flag_invalid;
2805 }
2806 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2807 ++verCases_errorCount;
2808 verCases_writeErrorFound( 10000 - count );
2809 writeCase_ab_f32( a, b );
2810 writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
2811 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2812 }
2813 }
2814 }
2815 verCases_writeTestsPerformed( 10000 - count );
2816
2817}
2818
2819/*----------------------------------------------------------------------------
2820*----------------------------------------------------------------------------*/
2821
2822#ifdef FLOAT64
2823
2824void
2825 ver_a_f64_z_ui32_rx(
2826 uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
2827 uint_fast8_t roundingMode,
2828 bool exact
2829 )
2830{
2831 int count;
2832 float64_t a;
2833 uint_fast32_t subjZ;
2834 uint_fast8_t subjFlags;
2835 uint_fast32_t trueZ;
2836 uint_fast8_t trueFlags;
2837
2838 verCases_errorCount = 0;
2839 verCases_tenThousandsCount = 0;
2840 count = 10000;
2841 while ( ! atEndOfInput() ) {
2842 readVerInput_f64( &a );
2843 readVerInput_ui32( &subjZ );
2844 readVerInput_flags( &subjFlags );
2845 *verLoops_trueFlagsPtr = 0;
2846 trueZ = trueFunction( a, roundingMode, exact );
2847 trueFlags = *verLoops_trueFlagsPtr;
2848 --count;
2849 if ( ! count ) {
2850 verCases_perTenThousand();
2851 count = 10000;
2852 }
2853 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2854 if (
2855 verCases_checkInvInts
2856 || (trueFlags != softfloat_flag_invalid)
2857 || (subjFlags != softfloat_flag_invalid)
2858 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
2859 ) {
2860 ++verCases_errorCount;
2861 verCases_writeErrorFound( 10000 - count );
2862 writeCase_a_f64( a, " " );
2863 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
2864 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2865 }
2866 }
2867 }
2868 verCases_writeTestsPerformed( 10000 - count );
2869
2870}
2871
2872void
2873 ver_a_f64_z_ui64_rx(
2874 uint_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
2875 uint_fast8_t roundingMode,
2876 bool exact
2877 )
2878{
2879 int count;
2880 float64_t a;
2881 uint_fast64_t subjZ;
2882 uint_fast8_t subjFlags;
2883 uint_fast64_t trueZ;
2884 uint_fast8_t trueFlags;
2885
2886 verCases_errorCount = 0;
2887 verCases_tenThousandsCount = 0;
2888 count = 10000;
2889 while ( ! atEndOfInput() ) {
2890 readVerInput_f64( &a );
2891 readVerInput_ui64( &subjZ );
2892 readVerInput_flags( &subjFlags );
2893 *verLoops_trueFlagsPtr = 0;
2894 trueZ = trueFunction( a, roundingMode, exact );
2895 trueFlags = *verLoops_trueFlagsPtr;
2896 --count;
2897 if ( ! count ) {
2898 verCases_perTenThousand();
2899 count = 10000;
2900 }
2901 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2902 if (
2903 verCases_checkInvInts
2904 || (trueFlags != softfloat_flag_invalid)
2905 || (subjFlags != softfloat_flag_invalid)
2906 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
2907 ) {
2908 ++verCases_errorCount;
2909 verCases_writeErrorFound( 10000 - count );
2910 writeCase_a_f64( a, " " );
2911 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
2912 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2913 }
2914 }
2915 }
2916 verCases_writeTestsPerformed( 10000 - count );
2917
2918}
2919
2920void
2921 ver_a_f64_z_i32_rx(
2922 int_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
2923 uint_fast8_t roundingMode,
2924 bool exact
2925 )
2926{
2927 int count;
2928 float64_t a;
2929 int_fast32_t subjZ;
2930 uint_fast8_t subjFlags;
2931 int_fast32_t trueZ;
2932 uint_fast8_t trueFlags;
2933
2934 verCases_errorCount = 0;
2935 verCases_tenThousandsCount = 0;
2936 count = 10000;
2937 while ( ! atEndOfInput() ) {
2938 readVerInput_f64( &a );
2939 readVerInput_i32( &subjZ );
2940 readVerInput_flags( &subjFlags );
2941 *verLoops_trueFlagsPtr = 0;
2942 trueZ = trueFunction( a, roundingMode, exact );
2943 trueFlags = *verLoops_trueFlagsPtr;
2944 --count;
2945 if ( ! count ) {
2946 verCases_perTenThousand();
2947 count = 10000;
2948 }
2949 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2950 if (
2951 verCases_checkInvInts
2952 || (trueFlags != softfloat_flag_invalid)
2953 || (subjFlags != softfloat_flag_invalid)
2954 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
2955 && (! f64_isNaN( a ) || (subjZ != 0)))
2956 ) {
2957 ++verCases_errorCount;
2958 verCases_writeErrorFound( 10000 - count );
2959 writeCase_a_f64( a, " " );
2960 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
2961 if ( verCases_errorCount == verCases_maxErrorCount ) break;
2962 }
2963 }
2964 }
2965 verCases_writeTestsPerformed( 10000 - count );
2966
2967}
2968
2969void
2970 ver_a_f64_z_i64_rx(
2971 int_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
2972 uint_fast8_t roundingMode,
2973 bool exact
2974 )
2975{
2976 int count;
2977 float64_t a;
2978 int_fast64_t subjZ;
2979 uint_fast8_t subjFlags;
2980 int_fast64_t trueZ;
2981 uint_fast8_t trueFlags;
2982
2983 verCases_errorCount = 0;
2984 verCases_tenThousandsCount = 0;
2985 count = 10000;
2986 while ( ! atEndOfInput() ) {
2987 readVerInput_f64( &a );
2988 readVerInput_i64( &subjZ );
2989 readVerInput_flags( &subjFlags );
2990 *verLoops_trueFlagsPtr = 0;
2991 trueZ = trueFunction( a, roundingMode, exact );
2992 trueFlags = *verLoops_trueFlagsPtr;
2993 --count;
2994 if ( ! count ) {
2995 verCases_perTenThousand();
2996 count = 10000;
2997 }
2998 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
2999 if (
3000 verCases_checkInvInts
3001 || (trueFlags != softfloat_flag_invalid)
3002 || (subjFlags != softfloat_flag_invalid)
3003 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
3004 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
3005 && (! f64_isNaN( a ) || (subjZ != 0)))
3006 ) {
3007 ++verCases_errorCount;
3008 verCases_writeErrorFound( 10000 - count );
3009 writeCase_a_f64( a, " " );
3010 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
3011 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3012 }
3013 }
3014 }
3015 verCases_writeTestsPerformed( 10000 - count );
3016
3017}
3018
3019void
3020 ver_a_f64_z_ui32_x(
3021 uint_fast32_t trueFunction( float64_t, bool ), bool exact )
3022{
3023 int count;
3024 float64_t a;
3025 uint_fast32_t subjZ;
3026 uint_fast8_t subjFlags;
3027 uint_fast32_t trueZ;
3028 uint_fast8_t trueFlags;
3029
3030 verCases_errorCount = 0;
3031 verCases_tenThousandsCount = 0;
3032 count = 10000;
3033 while ( ! atEndOfInput() ) {
3034 readVerInput_f64( &a );
3035 readVerInput_ui32( &subjZ );
3036 readVerInput_flags( &subjFlags );
3037 *verLoops_trueFlagsPtr = 0;
3038 trueZ = trueFunction( a, exact );
3039 trueFlags = *verLoops_trueFlagsPtr;
3040 --count;
3041 if ( ! count ) {
3042 verCases_perTenThousand();
3043 count = 10000;
3044 }
3045 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3046 if (
3047 verCases_checkInvInts
3048 || (trueFlags != softfloat_flag_invalid)
3049 || (subjFlags != softfloat_flag_invalid)
3050 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
3051 ) {
3052 ++verCases_errorCount;
3053 verCases_writeErrorFound( 10000 - count );
3054 writeCase_a_f64( a, " " );
3055 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
3056 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3057 }
3058 }
3059 }
3060 verCases_writeTestsPerformed( 10000 - count );
3061
3062}
3063
3064void
3065 ver_a_f64_z_ui64_x(
3066 uint_fast64_t trueFunction( float64_t, bool ), bool exact )
3067{
3068 int count;
3069 float64_t a;
3070 uint_fast64_t subjZ;
3071 uint_fast8_t subjFlags;
3072 uint_fast64_t trueZ;
3073 uint_fast8_t trueFlags;
3074
3075 verCases_errorCount = 0;
3076 verCases_tenThousandsCount = 0;
3077 count = 10000;
3078 while ( ! atEndOfInput() ) {
3079 readVerInput_f64( &a );
3080 readVerInput_ui64( &subjZ );
3081 readVerInput_flags( &subjFlags );
3082 *verLoops_trueFlagsPtr = 0;
3083 trueZ = trueFunction( a, exact );
3084 trueFlags = *verLoops_trueFlagsPtr;
3085 --count;
3086 if ( ! count ) {
3087 verCases_perTenThousand();
3088 count = 10000;
3089 }
3090 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3091 if (
3092 verCases_checkInvInts
3093 || (trueFlags != softfloat_flag_invalid)
3094 || (subjFlags != softfloat_flag_invalid)
3095 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
3096 ) {
3097 ++verCases_errorCount;
3098 verCases_writeErrorFound( 10000 - count );
3099 writeCase_a_f64( a, " " );
3100 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
3101 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3102 }
3103 }
3104 }
3105 verCases_writeTestsPerformed( 10000 - count );
3106
3107}
3108
3109void
3110 ver_a_f64_z_i32_x(
3111 int_fast32_t trueFunction( float64_t, bool ), bool exact )
3112{
3113 int count;
3114 float64_t a;
3115 int_fast32_t subjZ;
3116 uint_fast8_t subjFlags;
3117 int_fast32_t trueZ;
3118 uint_fast8_t trueFlags;
3119
3120 verCases_errorCount = 0;
3121 verCases_tenThousandsCount = 0;
3122 count = 10000;
3123 while ( ! atEndOfInput() ) {
3124 readVerInput_f64( &a );
3125 readVerInput_i32( &subjZ );
3126 readVerInput_flags( &subjFlags );
3127 *verLoops_trueFlagsPtr = 0;
3128 trueZ = trueFunction( a, exact );
3129 trueFlags = *verLoops_trueFlagsPtr;
3130 --count;
3131 if ( ! count ) {
3132 verCases_perTenThousand();
3133 count = 10000;
3134 }
3135 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3136 if (
3137 verCases_checkInvInts
3138 || (trueFlags != softfloat_flag_invalid)
3139 || (subjFlags != softfloat_flag_invalid)
3140 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
3141 && (! f64_isNaN( a ) || (subjZ != 0)))
3142 ) {
3143 ++verCases_errorCount;
3144 verCases_writeErrorFound( 10000 - count );
3145 writeCase_a_f64( a, " " );
3146 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
3147 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3148 }
3149 }
3150 }
3151 verCases_writeTestsPerformed( 10000 - count );
3152
3153}
3154
3155void
3156 ver_a_f64_z_i64_x(
3157 int_fast64_t trueFunction( float64_t, bool ), bool exact )
3158{
3159 int count;
3160 float64_t a;
3161 int_fast64_t subjZ;
3162 uint_fast8_t subjFlags;
3163 int_fast64_t trueZ;
3164 uint_fast8_t trueFlags;
3165
3166 verCases_errorCount = 0;
3167 verCases_tenThousandsCount = 0;
3168 count = 10000;
3169 while ( ! atEndOfInput() ) {
3170 readVerInput_f64( &a );
3171 readVerInput_i64( &subjZ );
3172 readVerInput_flags( &subjFlags );
3173 *verLoops_trueFlagsPtr = 0;
3174 trueZ = trueFunction( a, exact );
3175 trueFlags = *verLoops_trueFlagsPtr;
3176 --count;
3177 if ( ! count ) {
3178 verCases_perTenThousand();
3179 count = 10000;
3180 }
3181 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3182 if (
3183 verCases_checkInvInts
3184 || (trueFlags != softfloat_flag_invalid)
3185 || (subjFlags != softfloat_flag_invalid)
3186 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
3187 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
3188 && (! f64_isNaN( a ) || (subjZ != 0)))
3189 ) {
3190 ++verCases_errorCount;
3191 verCases_writeErrorFound( 10000 - count );
3192 writeCase_a_f64( a, " " );
3193 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
3194 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3195 }
3196 }
3197 }
3198 verCases_writeTestsPerformed( 10000 - count );
3199
3200}
3201
3202#ifdef FLOAT16
3203
3204void ver_a_f64_z_f16( float16_t trueFunction( float64_t ) )
3205{
3206 int count;
3207 float64_t a;
3208 float16_t subjZ;
3209 uint_fast8_t subjFlags;
3210 float16_t trueZ;
3211 uint_fast8_t trueFlags;
3212
3213 verCases_errorCount = 0;
3214 verCases_tenThousandsCount = 0;
3215 count = 10000;
3216 while ( ! atEndOfInput() ) {
3217 readVerInput_f64( &a );
3218 readVerInput_f16( &subjZ );
3219 readVerInput_flags( &subjFlags );
3220 *verLoops_trueFlagsPtr = 0;
3221 trueZ = trueFunction( a );
3222 trueFlags = *verLoops_trueFlagsPtr;
3223 --count;
3224 if ( ! count ) {
3225 verCases_perTenThousand();
3226 count = 10000;
3227 }
3228 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
3229 if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
3230 trueFlags |= softfloat_flag_invalid;
3231 }
3232 if (
3233 verCases_checkNaNs
3234 || ! f16_isNaN( trueZ )
3235 || ! f16_isNaN( subjZ )
3236 || f16_isSignalingNaN( subjZ )
3237 || (trueFlags != subjFlags)
3238 ) {
3239 ++verCases_errorCount;
3240 verCases_writeErrorFound( 10000 - count );
3241 writeCase_a_f64( a, " " );
3242 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
3243 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3244 }
3245 }
3246 }
3247 verCases_writeTestsPerformed( 10000 - count );
3248
3249}
3250
3251#endif
3252
3253void ver_a_f64_z_f32( float32_t trueFunction( float64_t ) )
3254{
3255 int count;
3256 float64_t a;
3257 float32_t subjZ;
3258 uint_fast8_t subjFlags;
3259 float32_t trueZ;
3260 uint_fast8_t trueFlags;
3261
3262 verCases_errorCount = 0;
3263 verCases_tenThousandsCount = 0;
3264 count = 10000;
3265 while ( ! atEndOfInput() ) {
3266 readVerInput_f64( &a );
3267 readVerInput_f32( &subjZ );
3268 readVerInput_flags( &subjFlags );
3269 *verLoops_trueFlagsPtr = 0;
3270 trueZ = trueFunction( a );
3271 trueFlags = *verLoops_trueFlagsPtr;
3272 --count;
3273 if ( ! count ) {
3274 verCases_perTenThousand();
3275 count = 10000;
3276 }
3277 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
3278 if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
3279 trueFlags |= softfloat_flag_invalid;
3280 }
3281 if (
3282 verCases_checkNaNs
3283 || ! f32_isNaN( trueZ )
3284 || ! f32_isNaN( subjZ )
3285 || f32_isSignalingNaN( subjZ )
3286 || (trueFlags != subjFlags)
3287 ) {
3288 ++verCases_errorCount;
3289 verCases_writeErrorFound( 10000 - count );
3290 writeCase_a_f64( a, " " );
3291 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
3292 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3293 }
3294 }
3295 }
3296 verCases_writeTestsPerformed( 10000 - count );
3297
3298}
3299
3300#ifdef EXTFLOAT80
3301
3302void ver_a_f64_z_extF80( void trueFunction( float64_t, extFloat80_t * ) )
3303{
3304 int count;
3305 float64_t a;
3306 extFloat80_t subjZ;
3307 uint_fast8_t subjFlags;
3308 extFloat80_t trueZ;
3309 uint_fast8_t trueFlags;
3310
3311 verCases_errorCount = 0;
3312 verCases_tenThousandsCount = 0;
3313 count = 10000;
3314 while ( ! atEndOfInput() ) {
3315 readVerInput_f64( &a );
3316 readVerInput_extF80( &subjZ );
3317 readVerInput_flags( &subjFlags );
3318 *verLoops_trueFlagsPtr = 0;
3319 trueFunction( a, &trueZ );
3320 trueFlags = *verLoops_trueFlagsPtr;
3321 --count;
3322 if ( ! count ) {
3323 verCases_perTenThousand();
3324 count = 10000;
3325 }
3326 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
3327 if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
3328 trueFlags |= softfloat_flag_invalid;
3329 }
3330 if (
3331 verCases_checkNaNs
3332 || ! extF80M_isNaN( &trueZ )
3333 || ! extF80M_isNaN( &subjZ )
3334 || extF80M_isSignalingNaN( &subjZ )
3335 || (trueFlags != subjFlags)
3336 ) {
3337 ++verCases_errorCount;
3338 verCases_writeErrorFound( 10000 - count );
3339 writeCase_a_f64( a, "\n\t" );
3340 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
3341 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3342 }
3343 }
3344 }
3345 verCases_writeTestsPerformed( 10000 - count );
3346
3347}
3348
3349#endif
3350
3351#ifdef FLOAT128
3352
3353void ver_a_f64_z_f128( void trueFunction( float64_t, float128_t * ) )
3354{
3355 int count;
3356 float64_t a;
3357 float128_t subjZ;
3358 uint_fast8_t subjFlags;
3359 float128_t trueZ;
3360 uint_fast8_t trueFlags;
3361
3362 verCases_errorCount = 0;
3363 verCases_tenThousandsCount = 0;
3364 count = 10000;
3365 while ( ! atEndOfInput() ) {
3366 readVerInput_f64( &a );
3367 readVerInput_f128( &subjZ );
3368 readVerInput_flags( &subjFlags );
3369 *verLoops_trueFlagsPtr = 0;
3370 trueFunction( a, &trueZ );
3371 trueFlags = *verLoops_trueFlagsPtr;
3372 --count;
3373 if ( ! count ) {
3374 verCases_perTenThousand();
3375 count = 10000;
3376 }
3377 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
3378 if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
3379 trueFlags |= softfloat_flag_invalid;
3380 }
3381 if (
3382 verCases_checkNaNs
3383 || ! f128M_isNaN( &trueZ )
3384 || ! f128M_isNaN( &subjZ )
3385 || f128M_isSignalingNaN( &subjZ )
3386 || (trueFlags != subjFlags)
3387 ) {
3388 ++verCases_errorCount;
3389 verCases_writeErrorFound( 10000 - count );
3390 writeCase_a_f64( a, " " );
3391 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
3392 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3393 }
3394 }
3395 }
3396 verCases_writeTestsPerformed( 10000 - count );
3397
3398}
3399
3400#endif
3401
3402void ver_az_f64( float64_t trueFunction( float64_t ) )
3403{
3404 int count;
3405 float64_t a, subjZ;
3406 uint_fast8_t subjFlags;
3407 float64_t trueZ;
3408 uint_fast8_t trueFlags;
3409
3410 verCases_errorCount = 0;
3411 verCases_tenThousandsCount = 0;
3412 count = 10000;
3413 while ( ! atEndOfInput() ) {
3414 readVerInput_f64( &a );
3415 readVerInput_f64( &subjZ );
3416 readVerInput_flags( &subjFlags );
3417 *verLoops_trueFlagsPtr = 0;
3418 trueZ = trueFunction( a );
3419 trueFlags = *verLoops_trueFlagsPtr;
3420 --count;
3421 if ( ! count ) {
3422 verCases_perTenThousand();
3423 count = 10000;
3424 }
3425 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
3426 if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
3427 trueFlags |= softfloat_flag_invalid;
3428 }
3429 if (
3430 verCases_checkNaNs
3431 || ! f64_isNaN( trueZ )
3432 || ! f64_isNaN( subjZ )
3433 || f64_isSignalingNaN( subjZ )
3434 || (trueFlags != subjFlags)
3435 ) {
3436 ++verCases_errorCount;
3437 verCases_writeErrorFound( 10000 - count );
3438 writeCase_a_f64( a, "\n\t" );
3439 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
3440 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3441 }
3442 }
3443 }
3444 verCases_writeTestsPerformed( 10000 - count );
3445
3446}
3447
3448void
3449 ver_az_f64_rx(
3450 float64_t trueFunction( float64_t, uint_fast8_t, bool ),
3451 uint_fast8_t roundingMode,
3452 bool exact
3453 )
3454{
3455 int count;
3456 float64_t a, subjZ;
3457 uint_fast8_t subjFlags;
3458 float64_t trueZ;
3459 uint_fast8_t trueFlags;
3460
3461 verCases_errorCount = 0;
3462 verCases_tenThousandsCount = 0;
3463 count = 10000;
3464 while ( ! atEndOfInput() ) {
3465 readVerInput_f64( &a );
3466 readVerInput_f64( &subjZ );
3467 readVerInput_flags( &subjFlags );
3468 *verLoops_trueFlagsPtr = 0;
3469 trueZ = trueFunction( a, roundingMode, exact );
3470 trueFlags = *verLoops_trueFlagsPtr;
3471 --count;
3472 if ( ! count ) {
3473 verCases_perTenThousand();
3474 count = 10000;
3475 }
3476 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
3477 if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
3478 trueFlags |= softfloat_flag_invalid;
3479 }
3480 if (
3481 verCases_checkNaNs
3482 || ! f64_isNaN( trueZ )
3483 || ! f64_isNaN( subjZ )
3484 || f64_isSignalingNaN( subjZ )
3485 || (trueFlags != subjFlags)
3486 ) {
3487 ++verCases_errorCount;
3488 verCases_writeErrorFound( 10000 - count );
3489 writeCase_a_f64( a, "\n\t" );
3490 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
3491 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3492 }
3493 }
3494 }
3495 verCases_writeTestsPerformed( 10000 - count );
3496
3497}
3498
3499void ver_abz_f64( float64_t trueFunction( float64_t, float64_t ) )
3500{
3501 int count;
3502 float64_t a, b, subjZ;
3503 uint_fast8_t subjFlags;
3504 float64_t trueZ;
3505 uint_fast8_t trueFlags;
3506
3507 verCases_errorCount = 0;
3508 verCases_tenThousandsCount = 0;
3509 count = 10000;
3510 while ( ! atEndOfInput() ) {
3511 readVerInput_f64( &a );
3512 readVerInput_f64( &b );
3513 readVerInput_f64( &subjZ );
3514 readVerInput_flags( &subjFlags );
3515 *verLoops_trueFlagsPtr = 0;
3516 trueZ = trueFunction( a, b );
3517 trueFlags = *verLoops_trueFlagsPtr;
3518 --count;
3519 if ( ! count ) {
3520 verCases_perTenThousand();
3521 count = 10000;
3522 }
3523 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
3524 if (
3525 ! verCases_checkNaNs
3526 && (f64_isSignalingNaN( a ) || f64_isSignalingNaN( b ))
3527 ) {
3528 trueFlags |= softfloat_flag_invalid;
3529 }
3530 if (
3531 verCases_checkNaNs
3532 || ! f64_isNaN( trueZ )
3533 || ! f64_isNaN( subjZ )
3534 || f64_isSignalingNaN( subjZ )
3535 || (trueFlags != subjFlags)
3536 ) {
3537 ++verCases_errorCount;
3538 verCases_writeErrorFound( 10000 - count );
3539 writeCase_ab_f64( a, b, "\n\t" );
3540 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
3541 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3542 }
3543 }
3544 }
3545 verCases_writeTestsPerformed( 10000 - count );
3546
3547}
3548
3549void ver_abcz_f64( float64_t trueFunction( float64_t, float64_t, float64_t ) )
3550{
3551 int count;
3552 float64_t a, b, c, subjZ;
3553 uint_fast8_t subjFlags;
3554 float64_t trueZ;
3555 uint_fast8_t trueFlags;
3556
3557 verCases_errorCount = 0;
3558 verCases_tenThousandsCount = 0;
3559 count = 10000;
3560 while ( ! atEndOfInput() ) {
3561 readVerInput_f64( &a );
3562 readVerInput_f64( &b );
3563 readVerInput_f64( &c );
3564 readVerInput_f64( &subjZ );
3565 readVerInput_flags( &subjFlags );
3566 *verLoops_trueFlagsPtr = 0;
3567 trueZ = trueFunction( a, b, c );
3568 trueFlags = *verLoops_trueFlagsPtr;
3569 --count;
3570 if ( ! count ) {
3571 verCases_perTenThousand();
3572 count = 10000;
3573 }
3574 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
3575 if (
3576 ! verCases_checkNaNs
3577 && (f64_isSignalingNaN( a ) || f64_isSignalingNaN( b )
3578 || f64_isSignalingNaN( c ))
3579 ) {
3580 trueFlags |= softfloat_flag_invalid;
3581 }
3582 if (
3583 verCases_checkNaNs
3584 || ! f64_isNaN( trueZ )
3585 || ! f64_isNaN( subjZ )
3586 || f64_isSignalingNaN( subjZ )
3587 || (trueFlags != subjFlags)
3588 ) {
3589 ++verCases_errorCount;
3590 verCases_writeErrorFound( 10000 - count );
3591 writeCase_abc_f64( a, b, c );
3592 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
3593 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3594 }
3595 }
3596 }
3597 verCases_writeTestsPerformed( 10000 - count );
3598
3599}
3600
3601void ver_ab_f64_z_bool( bool trueFunction( float64_t, float64_t ) )
3602{
3603 int count;
3604 float64_t a, b;
3605 bool subjZ;
3606 uint_fast8_t subjFlags;
3607 bool trueZ;
3608 uint_fast8_t trueFlags;
3609
3610 verCases_errorCount = 0;
3611 verCases_tenThousandsCount = 0;
3612 count = 10000;
3613 while ( ! atEndOfInput() ) {
3614 readVerInput_f64( &a );
3615 readVerInput_f64( &b );
3616 readVerInput_bool( &subjZ );
3617 readVerInput_flags( &subjFlags );
3618 *verLoops_trueFlagsPtr = 0;
3619 trueZ = trueFunction( a, b );
3620 trueFlags = *verLoops_trueFlagsPtr;
3621 --count;
3622 if ( ! count ) {
3623 verCases_perTenThousand();
3624 count = 10000;
3625 }
3626 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3627 if (
3628 ! verCases_checkNaNs
3629 && (f64_isSignalingNaN( a ) || f64_isSignalingNaN( b ))
3630 ) {
3631 trueFlags |= softfloat_flag_invalid;
3632 }
3633 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3634 ++verCases_errorCount;
3635 verCases_writeErrorFound( 10000 - count );
3636 writeCase_ab_f64( a, b, " " );
3637 writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
3638 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3639 }
3640 }
3641 }
3642 verCases_writeTestsPerformed( 10000 - count );
3643
3644}
3645
3646#endif
3647
3648/*----------------------------------------------------------------------------
3649*----------------------------------------------------------------------------*/
3650
3651#ifdef EXTFLOAT80
3652
3653void
3654 ver_a_extF80_z_ui32_rx(
3655 uint_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
3656 uint_fast8_t roundingMode,
3657 bool exact
3658 )
3659{
3660 int count;
3661 extFloat80_t a;
3662 uint_fast32_t subjZ;
3663 uint_fast8_t subjFlags;
3664 uint_fast32_t trueZ;
3665 uint_fast8_t trueFlags;
3666
3667 verCases_errorCount = 0;
3668 verCases_tenThousandsCount = 0;
3669 count = 10000;
3670 while ( ! atEndOfInput() ) {
3671 readVerInput_extF80( &a );
3672 readVerInput_ui32( &subjZ );
3673 readVerInput_flags( &subjFlags );
3674 *verLoops_trueFlagsPtr = 0;
3675 trueZ = trueFunction( &a, roundingMode, exact );
3676 trueFlags = *verLoops_trueFlagsPtr;
3677 --count;
3678 if ( ! count ) {
3679 verCases_perTenThousand();
3680 count = 10000;
3681 }
3682 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3683 if (
3684 verCases_checkInvInts
3685 || (trueFlags != softfloat_flag_invalid)
3686 || (subjFlags != softfloat_flag_invalid)
3687 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
3688 ) {
3689 ++verCases_errorCount;
3690 verCases_writeErrorFound( 10000 - count );
3691 writeCase_a_extF80M( &a, " " );
3692 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
3693 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3694 }
3695 }
3696 }
3697 verCases_writeTestsPerformed( 10000 - count );
3698
3699}
3700
3701void
3702 ver_a_extF80_z_ui64_rx(
3703 uint_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
3704 uint_fast8_t roundingMode,
3705 bool exact
3706 )
3707{
3708 int count;
3709 extFloat80_t a;
3710 uint_fast64_t subjZ;
3711 uint_fast8_t subjFlags;
3712 uint_fast64_t trueZ;
3713 uint_fast8_t trueFlags;
3714
3715 verCases_errorCount = 0;
3716 verCases_tenThousandsCount = 0;
3717 count = 10000;
3718 while ( ! atEndOfInput() ) {
3719 readVerInput_extF80( &a );
3720 readVerInput_ui64( &subjZ );
3721 readVerInput_flags( &subjFlags );
3722 *verLoops_trueFlagsPtr = 0;
3723 trueZ = trueFunction( &a, roundingMode, exact );
3724 trueFlags = *verLoops_trueFlagsPtr;
3725 --count;
3726 if ( ! count ) {
3727 verCases_perTenThousand();
3728 count = 10000;
3729 }
3730 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3731 if (
3732 verCases_checkInvInts
3733 || (trueFlags != softfloat_flag_invalid)
3734 || (subjFlags != softfloat_flag_invalid)
3735 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
3736 ) {
3737 ++verCases_errorCount;
3738 verCases_writeErrorFound( 10000 - count );
3739 writeCase_a_extF80M( &a, "\n\t" );
3740 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
3741 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3742 }
3743 }
3744 }
3745 verCases_writeTestsPerformed( 10000 - count );
3746
3747}
3748
3749void
3750 ver_a_extF80_z_i32_rx(
3751 int_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
3752 uint_fast8_t roundingMode,
3753 bool exact
3754 )
3755{
3756 int count;
3757 extFloat80_t a;
3758 int_fast32_t subjZ;
3759 uint_fast8_t subjFlags;
3760 int_fast32_t trueZ;
3761 uint_fast8_t trueFlags;
3762
3763 verCases_errorCount = 0;
3764 verCases_tenThousandsCount = 0;
3765 count = 10000;
3766 while ( ! atEndOfInput() ) {
3767 readVerInput_extF80( &a );
3768 readVerInput_i32( &subjZ );
3769 readVerInput_flags( &subjFlags );
3770 *verLoops_trueFlagsPtr = 0;
3771 trueZ = trueFunction( &a, roundingMode, exact );
3772 trueFlags = *verLoops_trueFlagsPtr;
3773 --count;
3774 if ( ! count ) {
3775 verCases_perTenThousand();
3776 count = 10000;
3777 }
3778 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3779 if (
3780 verCases_checkInvInts
3781 || (trueFlags != softfloat_flag_invalid)
3782 || (subjFlags != softfloat_flag_invalid)
3783 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
3784 && (! extF80M_isNaN( &a ) || (subjZ != 0)))
3785 ) {
3786 ++verCases_errorCount;
3787 verCases_writeErrorFound( 10000 - count );
3788 writeCase_a_extF80M( &a, " " );
3789 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
3790 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3791 }
3792 }
3793 }
3794 verCases_writeTestsPerformed( 10000 - count );
3795
3796}
3797
3798void
3799 ver_a_extF80_z_i64_rx(
3800 int_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
3801 uint_fast8_t roundingMode,
3802 bool exact
3803 )
3804{
3805 int count;
3806 extFloat80_t a;
3807 int_fast64_t subjZ;
3808 uint_fast8_t subjFlags;
3809 int_fast64_t trueZ;
3810 uint_fast8_t trueFlags;
3811
3812 verCases_errorCount = 0;
3813 verCases_tenThousandsCount = 0;
3814 count = 10000;
3815 while ( ! atEndOfInput() ) {
3816 readVerInput_extF80( &a );
3817 readVerInput_i64( &subjZ );
3818 readVerInput_flags( &subjFlags );
3819 *verLoops_trueFlagsPtr = 0;
3820 trueZ = trueFunction( &a, roundingMode, exact );
3821 trueFlags = *verLoops_trueFlagsPtr;
3822 --count;
3823 if ( ! count ) {
3824 verCases_perTenThousand();
3825 count = 10000;
3826 }
3827 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3828 if (
3829 verCases_checkInvInts
3830 || (trueFlags != softfloat_flag_invalid)
3831 || (subjFlags != softfloat_flag_invalid)
3832 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
3833 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
3834 && (! extF80M_isNaN( &a ) || (subjZ != 0)))
3835 ) {
3836 ++verCases_errorCount;
3837 verCases_writeErrorFound( 10000 - count );
3838 writeCase_a_extF80M( &a, "\n\t" );
3839 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
3840 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3841 }
3842 }
3843 }
3844 verCases_writeTestsPerformed( 10000 - count );
3845
3846}
3847
3848void
3849 ver_a_extF80_z_ui32_x(
3850 uint_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
3851{
3852 int count;
3853 extFloat80_t a;
3854 uint_fast32_t subjZ;
3855 uint_fast8_t subjFlags;
3856 uint_fast32_t trueZ;
3857 uint_fast8_t trueFlags;
3858
3859 verCases_errorCount = 0;
3860 verCases_tenThousandsCount = 0;
3861 count = 10000;
3862 while ( ! atEndOfInput() ) {
3863 readVerInput_extF80( &a );
3864 readVerInput_ui32( &subjZ );
3865 readVerInput_flags( &subjFlags );
3866 *verLoops_trueFlagsPtr = 0;
3867 trueZ = trueFunction( &a, exact );
3868 trueFlags = *verLoops_trueFlagsPtr;
3869 --count;
3870 if ( ! count ) {
3871 verCases_perTenThousand();
3872 count = 10000;
3873 }
3874 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3875 if (
3876 verCases_checkInvInts
3877 || (trueFlags != softfloat_flag_invalid)
3878 || (subjFlags != softfloat_flag_invalid)
3879 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
3880 ) {
3881 ++verCases_errorCount;
3882 verCases_writeErrorFound( 10000 - count );
3883 writeCase_a_extF80M( &a, " " );
3884 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
3885 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3886 }
3887 }
3888 }
3889 verCases_writeTestsPerformed( 10000 - count );
3890
3891}
3892
3893void
3894 ver_a_extF80_z_ui64_x(
3895 uint_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
3896{
3897 int count;
3898 extFloat80_t a;
3899 uint_fast64_t subjZ;
3900 uint_fast8_t subjFlags;
3901 uint_fast64_t trueZ;
3902 uint_fast8_t trueFlags;
3903
3904 verCases_errorCount = 0;
3905 verCases_tenThousandsCount = 0;
3906 count = 10000;
3907 while ( ! atEndOfInput() ) {
3908 readVerInput_extF80( &a );
3909 readVerInput_ui64( &subjZ );
3910 readVerInput_flags( &subjFlags );
3911 *verLoops_trueFlagsPtr = 0;
3912 trueZ = trueFunction( &a, exact );
3913 trueFlags = *verLoops_trueFlagsPtr;
3914 --count;
3915 if ( ! count ) {
3916 verCases_perTenThousand();
3917 count = 10000;
3918 }
3919 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3920 if (
3921 verCases_checkInvInts
3922 || (trueFlags != softfloat_flag_invalid)
3923 || (subjFlags != softfloat_flag_invalid)
3924 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
3925 ) {
3926 ++verCases_errorCount;
3927 verCases_writeErrorFound( 10000 - count );
3928 writeCase_a_extF80M( &a, "\n\t" );
3929 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
3930 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3931 }
3932 }
3933 }
3934 verCases_writeTestsPerformed( 10000 - count );
3935
3936}
3937
3938void
3939 ver_a_extF80_z_i32_x(
3940 int_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
3941{
3942 int count;
3943 extFloat80_t a;
3944 int_fast32_t subjZ;
3945 uint_fast8_t subjFlags;
3946 int_fast32_t trueZ;
3947 uint_fast8_t trueFlags;
3948
3949 verCases_errorCount = 0;
3950 verCases_tenThousandsCount = 0;
3951 count = 10000;
3952 while ( ! atEndOfInput() ) {
3953 readVerInput_extF80( &a );
3954 readVerInput_i32( &subjZ );
3955 readVerInput_flags( &subjFlags );
3956 *verLoops_trueFlagsPtr = 0;
3957 trueZ = trueFunction( &a, exact );
3958 trueFlags = *verLoops_trueFlagsPtr;
3959 --count;
3960 if ( ! count ) {
3961 verCases_perTenThousand();
3962 count = 10000;
3963 }
3964 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
3965 if (
3966 verCases_checkInvInts
3967 || (trueFlags != softfloat_flag_invalid)
3968 || (subjFlags != softfloat_flag_invalid)
3969 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
3970 && (! extF80M_isNaN( &a ) || (subjZ != 0)))
3971 ) {
3972 ++verCases_errorCount;
3973 verCases_writeErrorFound( 10000 - count );
3974 writeCase_a_extF80M( &a, " " );
3975 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
3976 if ( verCases_errorCount == verCases_maxErrorCount ) break;
3977 }
3978 }
3979 }
3980 verCases_writeTestsPerformed( 10000 - count );
3981
3982}
3983
3984void
3985 ver_a_extF80_z_i64_x(
3986 int_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
3987{
3988 int count;
3989 extFloat80_t a;
3990 int_fast64_t subjZ;
3991 uint_fast8_t subjFlags;
3992 int_fast64_t trueZ;
3993 uint_fast8_t trueFlags;
3994
3995 verCases_errorCount = 0;
3996 verCases_tenThousandsCount = 0;
3997 count = 10000;
3998 while ( ! atEndOfInput() ) {
3999 readVerInput_extF80( &a );
4000 readVerInput_i64( &subjZ );
4001 readVerInput_flags( &subjFlags );
4002 *verLoops_trueFlagsPtr = 0;
4003 trueZ = trueFunction( &a, exact );
4004 trueFlags = *verLoops_trueFlagsPtr;
4005 --count;
4006 if ( ! count ) {
4007 verCases_perTenThousand();
4008 count = 10000;
4009 }
4010 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4011 if (
4012 verCases_checkInvInts
4013 || (trueFlags != softfloat_flag_invalid)
4014 || (subjFlags != softfloat_flag_invalid)
4015 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
4016 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
4017 && (! extF80M_isNaN( &a ) || (subjZ != 0)))
4018 ) {
4019 ++verCases_errorCount;
4020 verCases_writeErrorFound( 10000 - count );
4021 writeCase_a_extF80M( &a, "\n\t" );
4022 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
4023 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4024 }
4025 }
4026 }
4027 verCases_writeTestsPerformed( 10000 - count );
4028
4029}
4030
4031#ifdef FLOAT16
4032
4033void ver_a_extF80_z_f16( float16_t trueFunction( const extFloat80_t * ) )
4034{
4035 int count;
4036 extFloat80_t a;
4037 float16_t subjZ;
4038 uint_fast8_t subjFlags;
4039 float16_t trueZ;
4040 uint_fast8_t trueFlags;
4041
4042 verCases_errorCount = 0;
4043 verCases_tenThousandsCount = 0;
4044 count = 10000;
4045 while ( ! atEndOfInput() ) {
4046 readVerInput_extF80( &a );
4047 readVerInput_f16( &subjZ );
4048 readVerInput_flags( &subjFlags );
4049 *verLoops_trueFlagsPtr = 0;
4050 trueZ = trueFunction( &a );
4051 trueFlags = *verLoops_trueFlagsPtr;
4052 --count;
4053 if ( ! count ) {
4054 verCases_perTenThousand();
4055 count = 10000;
4056 }
4057 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
4058 if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
4059 trueFlags |= softfloat_flag_invalid;
4060 }
4061 if (
4062 verCases_checkNaNs
4063 || ! f16_isNaN( trueZ )
4064 || ! f16_isNaN( subjZ )
4065 || f16_isSignalingNaN( subjZ )
4066 || (trueFlags != subjFlags)
4067 ) {
4068 ++verCases_errorCount;
4069 verCases_writeErrorFound( 10000 - count );
4070 writeCase_a_extF80M( &a, " " );
4071 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
4072 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4073 }
4074 }
4075 }
4076 verCases_writeTestsPerformed( 10000 - count );
4077
4078}
4079
4080#endif
4081
4082void ver_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
4083{
4084 int count;
4085 extFloat80_t a;
4086 float32_t subjZ;
4087 uint_fast8_t subjFlags;
4088 float32_t trueZ;
4089 uint_fast8_t trueFlags;
4090
4091 verCases_errorCount = 0;
4092 verCases_tenThousandsCount = 0;
4093 count = 10000;
4094 while ( ! atEndOfInput() ) {
4095 readVerInput_extF80( &a );
4096 readVerInput_f32( &subjZ );
4097 readVerInput_flags( &subjFlags );
4098 *verLoops_trueFlagsPtr = 0;
4099 trueZ = trueFunction( &a );
4100 trueFlags = *verLoops_trueFlagsPtr;
4101 --count;
4102 if ( ! count ) {
4103 verCases_perTenThousand();
4104 count = 10000;
4105 }
4106 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
4107 if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
4108 trueFlags |= softfloat_flag_invalid;
4109 }
4110 if (
4111 verCases_checkNaNs
4112 || ! f32_isNaN( trueZ )
4113 || ! f32_isNaN( subjZ )
4114 || f32_isSignalingNaN( subjZ )
4115 || (trueFlags != subjFlags)
4116 ) {
4117 ++verCases_errorCount;
4118 verCases_writeErrorFound( 10000 - count );
4119 writeCase_a_extF80M( &a, " " );
4120 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
4121 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4122 }
4123 }
4124 }
4125 verCases_writeTestsPerformed( 10000 - count );
4126
4127}
4128
4129#ifdef FLOAT64
4130
4131void ver_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
4132{
4133 int count;
4134 extFloat80_t a;
4135 float64_t subjZ;
4136 uint_fast8_t subjFlags;
4137 float64_t trueZ;
4138 uint_fast8_t trueFlags;
4139
4140 verCases_errorCount = 0;
4141 verCases_tenThousandsCount = 0;
4142 count = 10000;
4143 while ( ! atEndOfInput() ) {
4144 readVerInput_extF80( &a );
4145 readVerInput_f64( &subjZ );
4146 readVerInput_flags( &subjFlags );
4147 *verLoops_trueFlagsPtr = 0;
4148 trueZ = trueFunction( &a );
4149 trueFlags = *verLoops_trueFlagsPtr;
4150 --count;
4151 if ( ! count ) {
4152 verCases_perTenThousand();
4153 count = 10000;
4154 }
4155 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
4156 if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
4157 trueFlags |= softfloat_flag_invalid;
4158 }
4159 if (
4160 verCases_checkNaNs
4161 || ! f64_isNaN( trueZ )
4162 || ! f64_isNaN( subjZ )
4163 || f64_isSignalingNaN( subjZ )
4164 || (trueFlags != subjFlags)
4165 ) {
4166 ++verCases_errorCount;
4167 verCases_writeErrorFound( 10000 - count );
4168 writeCase_a_extF80M( &a, "\n\t" );
4169 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
4170 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4171 }
4172 }
4173 }
4174 verCases_writeTestsPerformed( 10000 - count );
4175
4176}
4177
4178#endif
4179
4180#ifdef FLOAT128
4181
4182void
4183 ver_a_extF80_z_f128( void trueFunction( const extFloat80_t *, float128_t * ) )
4184{
4185 int count;
4186 extFloat80_t a;
4187 float128_t subjZ;
4188 uint_fast8_t subjFlags;
4189 float128_t trueZ;
4190 uint_fast8_t trueFlags;
4191
4192 verCases_errorCount = 0;
4193 verCases_tenThousandsCount = 0;
4194 count = 10000;
4195 while ( ! atEndOfInput() ) {
4196 readVerInput_extF80( &a );
4197 readVerInput_f128( &subjZ );
4198 readVerInput_flags( &subjFlags );
4199 *verLoops_trueFlagsPtr = 0;
4200 trueFunction( &a, &trueZ );
4201 trueFlags = *verLoops_trueFlagsPtr;
4202 --count;
4203 if ( ! count ) {
4204 verCases_perTenThousand();
4205 count = 10000;
4206 }
4207 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
4208 if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
4209 trueFlags |= softfloat_flag_invalid;
4210 }
4211 if (
4212 verCases_checkNaNs
4213 || ! f128M_isNaN( &trueZ )
4214 || ! f128M_isNaN( &subjZ )
4215 || f128M_isSignalingNaN( &subjZ )
4216 || (trueFlags != subjFlags)
4217 ) {
4218 ++verCases_errorCount;
4219 verCases_writeErrorFound( 10000 - count );
4220 writeCase_a_extF80M( &a, " " );
4221 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
4222 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4223 }
4224 }
4225 }
4226 verCases_writeTestsPerformed( 10000 - count );
4227
4228}
4229
4230#endif
4231
4232void ver_az_extF80( void trueFunction( const extFloat80_t *, extFloat80_t * ) )
4233{
4234 int count;
4235 extFloat80_t a, subjZ;
4236 uint_fast8_t subjFlags;
4237 extFloat80_t trueZ;
4238 uint_fast8_t trueFlags;
4239
4240 verCases_errorCount = 0;
4241 verCases_tenThousandsCount = 0;
4242 count = 10000;
4243 while ( ! atEndOfInput() ) {
4244 readVerInput_extF80( &a );
4245 readVerInput_extF80( &subjZ );
4246 readVerInput_flags( &subjFlags );
4247 *verLoops_trueFlagsPtr = 0;
4248 trueFunction( &a, &trueZ );
4249 trueFlags = *verLoops_trueFlagsPtr;
4250 --count;
4251 if ( ! count ) {
4252 verCases_perTenThousand();
4253 count = 10000;
4254 }
4255 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
4256 if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
4257 trueFlags |= softfloat_flag_invalid;
4258 }
4259 if (
4260 verCases_checkNaNs
4261 || ! extF80M_isNaN( &trueZ )
4262 || ! extF80M_isNaN( &subjZ )
4263 || extF80M_isSignalingNaN( &subjZ )
4264 || (trueFlags != subjFlags)
4265 ) {
4266 ++verCases_errorCount;
4267 verCases_writeErrorFound( 10000 - count );
4268 writeCase_a_extF80M( &a, "\n\t" );
4269 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
4270 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4271 }
4272 }
4273 }
4274 verCases_writeTestsPerformed( 10000 - count );
4275
4276}
4277
4278void
4279 ver_az_extF80_rx(
4280 void
4281 trueFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
4282 uint_fast8_t roundingMode,
4283 bool exact
4284 )
4285{
4286 int count;
4287 extFloat80_t a, subjZ;
4288 uint_fast8_t subjFlags;
4289 extFloat80_t trueZ;
4290 uint_fast8_t trueFlags;
4291
4292 verCases_errorCount = 0;
4293 verCases_tenThousandsCount = 0;
4294 count = 10000;
4295 while ( ! atEndOfInput() ) {
4296 readVerInput_extF80( &a );
4297 readVerInput_extF80( &subjZ );
4298 readVerInput_flags( &subjFlags );
4299 *verLoops_trueFlagsPtr = 0;
4300 trueFunction( &a, roundingMode, exact, &trueZ );
4301 trueFlags = *verLoops_trueFlagsPtr;
4302 --count;
4303 if ( ! count ) {
4304 verCases_perTenThousand();
4305 count = 10000;
4306 }
4307 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
4308 if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
4309 trueFlags |= softfloat_flag_invalid;
4310 }
4311 if (
4312 verCases_checkNaNs
4313 || ! extF80M_isNaN( &trueZ )
4314 || ! extF80M_isNaN( &subjZ )
4315 || extF80M_isSignalingNaN( &subjZ )
4316 || (trueFlags != subjFlags)
4317 ) {
4318 ++verCases_errorCount;
4319 verCases_writeErrorFound( 10000 - count );
4320 writeCase_a_extF80M( &a, "\n\t" );
4321 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
4322 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4323 }
4324 }
4325 }
4326 verCases_writeTestsPerformed( 10000 - count );
4327
4328}
4329
4330void
4331 ver_abz_extF80(
4332 void
4333 trueFunction(
4334 const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
4335 )
4336{
4337 int count;
4338 extFloat80_t a, b, subjZ;
4339 uint_fast8_t subjFlags;
4340 extFloat80_t trueZ;
4341 uint_fast8_t trueFlags;
4342
4343 verCases_errorCount = 0;
4344 verCases_tenThousandsCount = 0;
4345 count = 10000;
4346 while ( ! atEndOfInput() ) {
4347 readVerInput_extF80( &a );
4348 readVerInput_extF80( &b );
4349 readVerInput_extF80( &subjZ );
4350 readVerInput_flags( &subjFlags );
4351 *verLoops_trueFlagsPtr = 0;
4352 trueFunction( &a, &b, &trueZ );
4353 trueFlags = *verLoops_trueFlagsPtr;
4354 --count;
4355 if ( ! count ) {
4356 verCases_perTenThousand();
4357 count = 10000;
4358 }
4359 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
4360 if (
4361 ! verCases_checkNaNs
4362 && (extF80M_isSignalingNaN( &a )
4363 || extF80M_isSignalingNaN( &b ))
4364 ) {
4365 trueFlags |= softfloat_flag_invalid;
4366 }
4367 if (
4368 verCases_checkNaNs
4369 || ! extF80M_isNaN( &trueZ )
4370 || ! extF80M_isNaN( &subjZ )
4371 || extF80M_isSignalingNaN( &subjZ )
4372 || (trueFlags != subjFlags)
4373 ) {
4374 ++verCases_errorCount;
4375 verCases_writeErrorFound( 10000 - count );
4376 writeCase_ab_extF80M( &a, &b, "\n\t" );
4377 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
4378 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4379 }
4380 }
4381 }
4382 verCases_writeTestsPerformed( 10000 - count );
4383
4384}
4385
4386void
4387 ver_ab_extF80_z_bool(
4388 bool trueFunction( const extFloat80_t *, const extFloat80_t * ) )
4389{
4390 int count;
4391 extFloat80_t a, b;
4392 bool subjZ;
4393 uint_fast8_t subjFlags;
4394 bool trueZ;
4395 uint_fast8_t trueFlags;
4396
4397 verCases_errorCount = 0;
4398 verCases_tenThousandsCount = 0;
4399 count = 10000;
4400 while ( ! atEndOfInput() ) {
4401 readVerInput_extF80( &a );
4402 readVerInput_extF80( &b );
4403 readVerInput_bool( &subjZ );
4404 readVerInput_flags( &subjFlags );
4405 *verLoops_trueFlagsPtr = 0;
4406 trueZ = trueFunction( &a, &b );
4407 trueFlags = *verLoops_trueFlagsPtr;
4408 --count;
4409 if ( ! count ) {
4410 verCases_perTenThousand();
4411 count = 10000;
4412 }
4413 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4414 if (
4415 ! verCases_checkNaNs
4416 && (extF80M_isSignalingNaN( &a )
4417 || extF80M_isSignalingNaN( &b ))
4418 ) {
4419 trueFlags |= softfloat_flag_invalid;
4420 }
4421 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4422 ++verCases_errorCount;
4423 verCases_writeErrorFound( 10000 - count );
4424 writeCase_ab_extF80M( &a, &b, " " );
4425 writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
4426 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4427 }
4428 }
4429 }
4430 verCases_writeTestsPerformed( 10000 - count );
4431
4432}
4433
4434#endif
4435
4436/*----------------------------------------------------------------------------
4437*----------------------------------------------------------------------------*/
4438
4439#ifdef FLOAT128
4440
4441void
4442 ver_a_f128_z_ui32_rx(
4443 uint_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
4444 uint_fast8_t roundingMode,
4445 bool exact
4446 )
4447{
4448 int count;
4449 float128_t a;
4450 uint_fast32_t subjZ;
4451 uint_fast8_t subjFlags;
4452 uint_fast32_t trueZ;
4453 uint_fast8_t trueFlags;
4454
4455 verCases_errorCount = 0;
4456 verCases_tenThousandsCount = 0;
4457 count = 10000;
4458 while ( ! atEndOfInput() ) {
4459 readVerInput_f128( &a );
4460 readVerInput_ui32( &subjZ );
4461 readVerInput_flags( &subjFlags );
4462 *verLoops_trueFlagsPtr = 0;
4463 trueZ = trueFunction( &a, roundingMode, exact );
4464 trueFlags = *verLoops_trueFlagsPtr;
4465 --count;
4466 if ( ! count ) {
4467 verCases_perTenThousand();
4468 count = 10000;
4469 }
4470 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4471 if (
4472 verCases_checkInvInts
4473 || (trueFlags != softfloat_flag_invalid)
4474 || (subjFlags != softfloat_flag_invalid)
4475 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
4476 ) {
4477 ++verCases_errorCount;
4478 verCases_writeErrorFound( 10000 - count );
4479 writeCase_a_f128M( &a, " " );
4480 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
4481 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4482 }
4483 }
4484 }
4485 verCases_writeTestsPerformed( 10000 - count );
4486
4487}
4488
4489void
4490 ver_a_f128_z_ui64_rx(
4491 uint_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
4492 uint_fast8_t roundingMode,
4493 bool exact
4494 )
4495{
4496 int count;
4497 float128_t a;
4498 uint_fast64_t subjZ;
4499 uint_fast8_t subjFlags;
4500 uint_fast64_t trueZ;
4501 uint_fast8_t trueFlags;
4502
4503 verCases_errorCount = 0;
4504 verCases_tenThousandsCount = 0;
4505 count = 10000;
4506 while ( ! atEndOfInput() ) {
4507 readVerInput_f128( &a );
4508 readVerInput_ui64( &subjZ );
4509 readVerInput_flags( &subjFlags );
4510 *verLoops_trueFlagsPtr = 0;
4511 trueZ = trueFunction( &a, roundingMode, exact );
4512 trueFlags = *verLoops_trueFlagsPtr;
4513 --count;
4514 if ( ! count ) {
4515 verCases_perTenThousand();
4516 count = 10000;
4517 }
4518 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4519 if (
4520 verCases_checkInvInts
4521 || (trueFlags != softfloat_flag_invalid)
4522 || (subjFlags != softfloat_flag_invalid)
4523 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
4524 ) {
4525 ++verCases_errorCount;
4526 verCases_writeErrorFound( 10000 - count );
4527 writeCase_a_f128M( &a, "\n\t" );
4528 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
4529 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4530 }
4531 }
4532 }
4533 verCases_writeTestsPerformed( 10000 - count );
4534
4535}
4536
4537void
4538 ver_a_f128_z_i32_rx(
4539 int_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
4540 uint_fast8_t roundingMode,
4541 bool exact
4542 )
4543{
4544 int count;
4545 float128_t a;
4546 int_fast32_t subjZ;
4547 uint_fast8_t subjFlags;
4548 int_fast32_t trueZ;
4549 uint_fast8_t trueFlags;
4550
4551 verCases_errorCount = 0;
4552 verCases_tenThousandsCount = 0;
4553 count = 10000;
4554 while ( ! atEndOfInput() ) {
4555 readVerInput_f128( &a );
4556 readVerInput_i32( &subjZ );
4557 readVerInput_flags( &subjFlags );
4558 *verLoops_trueFlagsPtr = 0;
4559 trueZ = trueFunction( &a, roundingMode, exact );
4560 trueFlags = *verLoops_trueFlagsPtr;
4561 --count;
4562 if ( ! count ) {
4563 verCases_perTenThousand();
4564 count = 10000;
4565 }
4566 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4567 if (
4568 verCases_checkInvInts
4569 || (trueFlags != softfloat_flag_invalid)
4570 || (subjFlags != softfloat_flag_invalid)
4571 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
4572 && (! f128M_isNaN( &a ) || (subjZ != 0)))
4573 ) {
4574 ++verCases_errorCount;
4575 verCases_writeErrorFound( 10000 - count );
4576 writeCase_a_f128M( &a, " " );
4577 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
4578 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4579 }
4580 }
4581 }
4582 verCases_writeTestsPerformed( 10000 - count );
4583
4584}
4585
4586void
4587 ver_a_f128_z_i64_rx(
4588 int_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
4589 uint_fast8_t roundingMode,
4590 bool exact
4591 )
4592{
4593 int count;
4594 float128_t a;
4595 int_fast64_t subjZ;
4596 uint_fast8_t subjFlags;
4597 int_fast64_t trueZ;
4598 uint_fast8_t trueFlags;
4599
4600 verCases_errorCount = 0;
4601 verCases_tenThousandsCount = 0;
4602 count = 10000;
4603 while ( ! atEndOfInput() ) {
4604 readVerInput_f128( &a );
4605 readVerInput_i64( &subjZ );
4606 readVerInput_flags( &subjFlags );
4607 *verLoops_trueFlagsPtr = 0;
4608 trueZ = trueFunction( &a, roundingMode, exact );
4609 trueFlags = *verLoops_trueFlagsPtr;
4610 --count;
4611 if ( ! count ) {
4612 verCases_perTenThousand();
4613 count = 10000;
4614 }
4615 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4616 if (
4617 verCases_checkInvInts
4618 || (trueFlags != softfloat_flag_invalid)
4619 || (subjFlags != softfloat_flag_invalid)
4620 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
4621 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
4622 && (! f128M_isNaN( &a ) || (subjZ != 0)))
4623 ) {
4624 ++verCases_errorCount;
4625 verCases_writeErrorFound( 10000 - count );
4626 writeCase_a_f128M( &a, "\n\t" );
4627 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
4628 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4629 }
4630 }
4631 }
4632 verCases_writeTestsPerformed( 10000 - count );
4633
4634}
4635
4636void
4637 ver_a_f128_z_ui32_x(
4638 uint_fast32_t trueFunction( const float128_t *, bool ), bool exact )
4639{
4640 int count;
4641 float128_t a;
4642 uint_fast32_t subjZ;
4643 uint_fast8_t subjFlags;
4644 uint_fast32_t trueZ;
4645 uint_fast8_t trueFlags;
4646
4647 verCases_errorCount = 0;
4648 verCases_tenThousandsCount = 0;
4649 count = 10000;
4650 while ( ! atEndOfInput() ) {
4651 readVerInput_f128( &a );
4652 readVerInput_ui32( &subjZ );
4653 readVerInput_flags( &subjFlags );
4654 *verLoops_trueFlagsPtr = 0;
4655 trueZ = trueFunction( &a, exact );
4656 trueFlags = *verLoops_trueFlagsPtr;
4657 --count;
4658 if ( ! count ) {
4659 verCases_perTenThousand();
4660 count = 10000;
4661 }
4662 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4663 if (
4664 verCases_checkInvInts
4665 || (trueFlags != softfloat_flag_invalid)
4666 || (subjFlags != softfloat_flag_invalid)
4667 || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
4668 ) {
4669 ++verCases_errorCount;
4670 verCases_writeErrorFound( 10000 - count );
4671 writeCase_a_f128M( &a, " " );
4672 writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
4673 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4674 }
4675 }
4676 }
4677 verCases_writeTestsPerformed( 10000 - count );
4678
4679}
4680
4681void
4682 ver_a_f128_z_ui64_x(
4683 uint_fast64_t trueFunction( const float128_t *, bool ), bool exact )
4684{
4685 int count;
4686 float128_t a;
4687 uint_fast64_t subjZ;
4688 uint_fast8_t subjFlags;
4689 uint_fast64_t trueZ;
4690 uint_fast8_t trueFlags;
4691
4692 verCases_errorCount = 0;
4693 verCases_tenThousandsCount = 0;
4694 count = 10000;
4695 while ( ! atEndOfInput() ) {
4696 readVerInput_f128( &a );
4697 readVerInput_ui64( &subjZ );
4698 readVerInput_flags( &subjFlags );
4699 *verLoops_trueFlagsPtr = 0;
4700 trueZ = trueFunction( &a, exact );
4701 trueFlags = *verLoops_trueFlagsPtr;
4702 --count;
4703 if ( ! count ) {
4704 verCases_perTenThousand();
4705 count = 10000;
4706 }
4707 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4708 if (
4709 verCases_checkInvInts
4710 || (trueFlags != softfloat_flag_invalid)
4711 || (subjFlags != softfloat_flag_invalid)
4712 || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
4713 ) {
4714 ++verCases_errorCount;
4715 verCases_writeErrorFound( 10000 - count );
4716 writeCase_a_f128M( &a, "\n\t" );
4717 writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
4718 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4719 }
4720 }
4721 }
4722 verCases_writeTestsPerformed( 10000 - count );
4723
4724}
4725
4726void
4727 ver_a_f128_z_i32_x(
4728 int_fast32_t trueFunction( const float128_t *, bool ), bool exact )
4729{
4730 int count;
4731 float128_t a;
4732 int_fast32_t subjZ;
4733 uint_fast8_t subjFlags;
4734 int_fast32_t trueZ;
4735 uint_fast8_t trueFlags;
4736
4737 verCases_errorCount = 0;
4738 verCases_tenThousandsCount = 0;
4739 count = 10000;
4740 while ( ! atEndOfInput() ) {
4741 readVerInput_f128( &a );
4742 readVerInput_i32( &subjZ );
4743 readVerInput_flags( &subjFlags );
4744 *verLoops_trueFlagsPtr = 0;
4745 trueZ = trueFunction( &a, exact );
4746 trueFlags = *verLoops_trueFlagsPtr;
4747 --count;
4748 if ( ! count ) {
4749 verCases_perTenThousand();
4750 count = 10000;
4751 }
4752 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4753 if (
4754 verCases_checkInvInts
4755 || (trueFlags != softfloat_flag_invalid)
4756 || (subjFlags != softfloat_flag_invalid)
4757 || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
4758 && (! f128M_isNaN( &a ) || (subjZ != 0)))
4759 ) {
4760 ++verCases_errorCount;
4761 verCases_writeErrorFound( 10000 - count );
4762 writeCase_a_f128M( &a, " " );
4763 writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
4764 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4765 }
4766 }
4767 }
4768 verCases_writeTestsPerformed( 10000 - count );
4769
4770}
4771
4772void
4773 ver_a_f128_z_i64_x(
4774 int_fast64_t trueFunction( const float128_t *, bool ), bool exact )
4775{
4776 int count;
4777 float128_t a;
4778 int_fast64_t subjZ;
4779 uint_fast8_t subjFlags;
4780 int_fast64_t trueZ;
4781 uint_fast8_t trueFlags;
4782
4783 verCases_errorCount = 0;
4784 verCases_tenThousandsCount = 0;
4785 count = 10000;
4786 while ( ! atEndOfInput() ) {
4787 readVerInput_f128( &a );
4788 readVerInput_i64( &subjZ );
4789 readVerInput_flags( &subjFlags );
4790 *verLoops_trueFlagsPtr = 0;
4791 trueZ = trueFunction( &a, exact );
4792 trueFlags = *verLoops_trueFlagsPtr;
4793 --count;
4794 if ( ! count ) {
4795 verCases_perTenThousand();
4796 count = 10000;
4797 }
4798 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
4799 if (
4800 verCases_checkInvInts
4801 || (trueFlags != softfloat_flag_invalid)
4802 || (subjFlags != softfloat_flag_invalid)
4803 || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
4804 && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
4805 && (! f128M_isNaN( &a ) || (subjZ != 0)))
4806 ) {
4807 ++verCases_errorCount;
4808 verCases_writeErrorFound( 10000 - count );
4809 writeCase_a_f128M( &a, "\n\t" );
4810 writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
4811 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4812 }
4813 }
4814 }
4815 verCases_writeTestsPerformed( 10000 - count );
4816
4817}
4818
4819#ifdef FLOAT16
4820
4821void ver_a_f128_z_f16( float16_t trueFunction( const float128_t * ) )
4822{
4823 int count;
4824 float128_t a;
4825 float16_t subjZ;
4826 uint_fast8_t subjFlags;
4827 float16_t trueZ;
4828 uint_fast8_t trueFlags;
4829
4830 verCases_errorCount = 0;
4831 verCases_tenThousandsCount = 0;
4832 count = 10000;
4833 while ( ! atEndOfInput() ) {
4834 readVerInput_f128( &a );
4835 readVerInput_f16( &subjZ );
4836 readVerInput_flags( &subjFlags );
4837 *verLoops_trueFlagsPtr = 0;
4838 trueZ = trueFunction( &a );
4839 trueFlags = *verLoops_trueFlagsPtr;
4840 --count;
4841 if ( ! count ) {
4842 verCases_perTenThousand();
4843 count = 10000;
4844 }
4845 if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
4846 if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
4847 trueFlags |= softfloat_flag_invalid;
4848 }
4849 if (
4850 verCases_checkNaNs
4851 || ! f16_isNaN( trueZ )
4852 || ! f16_isNaN( subjZ )
4853 || f16_isSignalingNaN( subjZ )
4854 || (trueFlags != subjFlags)
4855 ) {
4856 ++verCases_errorCount;
4857 verCases_writeErrorFound( 10000 - count );
4858 writeCase_a_f128M( &a, " " );
4859 writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
4860 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4861 }
4862 }
4863 }
4864 verCases_writeTestsPerformed( 10000 - count );
4865
4866}
4867
4868#endif
4869
4870void ver_a_f128_z_f32( float32_t trueFunction( const float128_t * ) )
4871{
4872 int count;
4873 float128_t a;
4874 float32_t subjZ;
4875 uint_fast8_t subjFlags;
4876 float32_t trueZ;
4877 uint_fast8_t trueFlags;
4878
4879 verCases_errorCount = 0;
4880 verCases_tenThousandsCount = 0;
4881 count = 10000;
4882 while ( ! atEndOfInput() ) {
4883 readVerInput_f128( &a );
4884 readVerInput_f32( &subjZ );
4885 readVerInput_flags( &subjFlags );
4886 *verLoops_trueFlagsPtr = 0;
4887 trueZ = trueFunction( &a );
4888 trueFlags = *verLoops_trueFlagsPtr;
4889 --count;
4890 if ( ! count ) {
4891 verCases_perTenThousand();
4892 count = 10000;
4893 }
4894 if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
4895 if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
4896 trueFlags |= softfloat_flag_invalid;
4897 }
4898 if (
4899 verCases_checkNaNs
4900 || ! f32_isNaN( trueZ )
4901 || ! f32_isNaN( subjZ )
4902 || f32_isSignalingNaN( subjZ )
4903 || (trueFlags != subjFlags)
4904 ) {
4905 ++verCases_errorCount;
4906 verCases_writeErrorFound( 10000 - count );
4907 writeCase_a_f128M( &a, "\n\t" );
4908 writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
4909 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4910 }
4911 }
4912 }
4913 verCases_writeTestsPerformed( 10000 - count );
4914
4915}
4916
4917#ifdef FLOAT64
4918
4919void ver_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
4920{
4921 int count;
4922 float128_t a;
4923 float64_t subjZ;
4924 uint_fast8_t subjFlags;
4925 float64_t trueZ;
4926 uint_fast8_t trueFlags;
4927
4928 verCases_errorCount = 0;
4929 verCases_tenThousandsCount = 0;
4930 count = 10000;
4931 while ( ! atEndOfInput() ) {
4932 readVerInput_f128( &a );
4933 readVerInput_f64( &subjZ );
4934 readVerInput_flags( &subjFlags );
4935 *verLoops_trueFlagsPtr = 0;
4936 trueZ = trueFunction( &a );
4937 trueFlags = *verLoops_trueFlagsPtr;
4938 --count;
4939 if ( ! count ) {
4940 verCases_perTenThousand();
4941 count = 10000;
4942 }
4943 if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
4944 if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
4945 trueFlags |= softfloat_flag_invalid;
4946 }
4947 if (
4948 verCases_checkNaNs
4949 || ! f64_isNaN( trueZ )
4950 || ! f64_isNaN( subjZ )
4951 || f64_isSignalingNaN( subjZ )
4952 || (trueFlags != subjFlags)
4953 ) {
4954 ++verCases_errorCount;
4955 verCases_writeErrorFound( 10000 - count );
4956 writeCase_a_f128M( &a, "\n\t" );
4957 writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
4958 if ( verCases_errorCount == verCases_maxErrorCount ) break;
4959 }
4960 }
4961 }
4962 verCases_writeTestsPerformed( 10000 - count );
4963
4964}
4965
4966#endif
4967
4968#ifdef EXTFLOAT80
4969
4970void
4971 ver_a_f128_z_extF80( void trueFunction( const float128_t *, extFloat80_t * ) )
4972{
4973 int count;
4974 float128_t a;
4975 extFloat80_t subjZ;
4976 uint_fast8_t subjFlags;
4977 extFloat80_t trueZ;
4978 uint_fast8_t trueFlags;
4979
4980 verCases_errorCount = 0;
4981 verCases_tenThousandsCount = 0;
4982 count = 10000;
4983 while ( ! atEndOfInput() ) {
4984 readVerInput_f128( &a );
4985 readVerInput_extF80( &subjZ );
4986 readVerInput_flags( &subjFlags );
4987 *verLoops_trueFlagsPtr = 0;
4988 trueFunction( &a, &trueZ );
4989 trueFlags = *verLoops_trueFlagsPtr;
4990 --count;
4991 if ( ! count ) {
4992 verCases_perTenThousand();
4993 count = 10000;
4994 }
4995 if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
4996 if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
4997 trueFlags |= softfloat_flag_invalid;
4998 }
4999 if (
5000 verCases_checkNaNs
5001 || ! extF80M_isNaN( &trueZ )
5002 || ! extF80M_isNaN( &subjZ )
5003 || extF80M_isSignalingNaN( &subjZ )
5004 || (trueFlags != subjFlags)
5005 ) {
5006 ++verCases_errorCount;
5007 verCases_writeErrorFound( 10000 - count );
5008 writeCase_a_f128M( &a, "\n\t" );
5009 writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
5010 if ( verCases_errorCount == verCases_maxErrorCount ) break;
5011 }
5012 }
5013 }
5014 verCases_writeTestsPerformed( 10000 - count );
5015
5016}
5017
5018#endif
5019
5020void ver_az_f128( void trueFunction( const float128_t *, float128_t * ) )
5021{
5022 int count;
5023 float128_t a, subjZ;
5024 uint_fast8_t subjFlags;
5025 float128_t trueZ;
5026 uint_fast8_t trueFlags;
5027
5028 verCases_errorCount = 0;
5029 verCases_tenThousandsCount = 0;
5030 count = 10000;
5031 while ( ! atEndOfInput() ) {
5032 readVerInput_f128( &a );
5033 readVerInput_f128( &subjZ );
5034 readVerInput_flags( &subjFlags );
5035 *verLoops_trueFlagsPtr = 0;
5036 trueFunction( &a, &trueZ );
5037 trueFlags = *verLoops_trueFlagsPtr;
5038 --count;
5039 if ( ! count ) {
5040 verCases_perTenThousand();
5041 count = 10000;
5042 }
5043 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
5044 if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
5045 trueFlags |= softfloat_flag_invalid;
5046 }
5047 if (
5048 verCases_checkNaNs
5049 || ! f128M_isNaN( &trueZ )
5050 || ! f128M_isNaN( &subjZ )
5051 || f128M_isSignalingNaN( &subjZ )
5052 || (trueFlags != subjFlags)
5053 ) {
5054 ++verCases_errorCount;
5055 verCases_writeErrorFound( 10000 - count );
5056 writeCase_a_f128M( &a, " " );
5057 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
5058 if ( verCases_errorCount == verCases_maxErrorCount ) break;
5059 }
5060 }
5061 }
5062 verCases_writeTestsPerformed( 10000 - count );
5063
5064}
5065
5066void
5067 ver_az_f128_rx(
5068 void trueFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
5069 uint_fast8_t roundingMode,
5070 bool exact
5071 )
5072{
5073 int count;
5074 float128_t a, subjZ;
5075 uint_fast8_t subjFlags;
5076 float128_t trueZ;
5077 uint_fast8_t trueFlags;
5078
5079 verCases_errorCount = 0;
5080 verCases_tenThousandsCount = 0;
5081 count = 10000;
5082 while ( ! atEndOfInput() ) {
5083 readVerInput_f128( &a );
5084 readVerInput_f128( &subjZ );
5085 readVerInput_flags( &subjFlags );
5086 *verLoops_trueFlagsPtr = 0;
5087 trueFunction( &a, roundingMode, exact, &trueZ );
5088 trueFlags = *verLoops_trueFlagsPtr;
5089 --count;
5090 if ( ! count ) {
5091 verCases_perTenThousand();
5092 count = 10000;
5093 }
5094 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
5095 if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
5096 trueFlags |= softfloat_flag_invalid;
5097 }
5098 if (
5099 verCases_checkNaNs
5100 || ! f128M_isNaN( &trueZ )
5101 || ! f128M_isNaN( &subjZ )
5102 || f128M_isSignalingNaN( &subjZ )
5103 || (trueFlags != subjFlags)
5104 ) {
5105 ++verCases_errorCount;
5106 verCases_writeErrorFound( 10000 - count );
5107 writeCase_a_f128M( &a, " " );
5108 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
5109 if ( verCases_errorCount == verCases_maxErrorCount ) break;
5110 }
5111 }
5112 }
5113 verCases_writeTestsPerformed( 10000 - count );
5114
5115}
5116
5117void
5118 ver_abz_f128(
5119 void trueFunction( const float128_t *, const float128_t *, float128_t * )
5120 )
5121{
5122 int count;
5123 float128_t a, b, subjZ;
5124 uint_fast8_t subjFlags;
5125 float128_t trueZ;
5126 uint_fast8_t trueFlags;
5127
5128 verCases_errorCount = 0;
5129 verCases_tenThousandsCount = 0;
5130 count = 10000;
5131 while ( ! atEndOfInput() ) {
5132 readVerInput_f128( &a );
5133 readVerInput_f128( &b );
5134 readVerInput_f128( &subjZ );
5135 readVerInput_flags( &subjFlags );
5136 *verLoops_trueFlagsPtr = 0;
5137 trueFunction( &a, &b, &trueZ );
5138 trueFlags = *verLoops_trueFlagsPtr;
5139 --count;
5140 if ( ! count ) {
5141 verCases_perTenThousand();
5142 count = 10000;
5143 }
5144 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
5145 if (
5146 ! verCases_checkNaNs
5147 && (f128M_isSignalingNaN( &a )
5148 || f128M_isSignalingNaN( &b ))
5149 ) {
5150 trueFlags |= softfloat_flag_invalid;
5151 }
5152 if (
5153 verCases_checkNaNs
5154 || ! f128M_isNaN( &trueZ )
5155 || ! f128M_isNaN( &subjZ )
5156 || f128M_isSignalingNaN( &subjZ )
5157 || (trueFlags != subjFlags)
5158 ) {
5159 ++verCases_errorCount;
5160 verCases_writeErrorFound( 10000 - count );
5161 writeCase_ab_f128M( &a, &b );
5162 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
5163 if ( verCases_errorCount == verCases_maxErrorCount ) break;
5164 }
5165 }
5166 }
5167 verCases_writeTestsPerformed( 10000 - count );
5168
5169}
5170
5171void
5172 ver_abcz_f128(
5173 void
5174 trueFunction(
5175 const float128_t *,
5176 const float128_t *,
5177 const float128_t *,
5178 float128_t *
5179 )
5180 )
5181{
5182 int count;
5183 float128_t a, b, c, subjZ;
5184 uint_fast8_t subjFlags;
5185 float128_t trueZ;
5186 uint_fast8_t trueFlags;
5187
5188 verCases_errorCount = 0;
5189 verCases_tenThousandsCount = 0;
5190 count = 10000;
5191 while ( ! atEndOfInput() ) {
5192 readVerInput_f128( &a );
5193 readVerInput_f128( &b );
5194 readVerInput_f128( &c );
5195 readVerInput_f128( &subjZ );
5196 readVerInput_flags( &subjFlags );
5197 *verLoops_trueFlagsPtr = 0;
5198 trueFunction( &a, &b, &c, &trueZ );
5199 trueFlags = *verLoops_trueFlagsPtr;
5200 --count;
5201 if ( ! count ) {
5202 verCases_perTenThousand();
5203 count = 10000;
5204 }
5205 if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
5206 if (
5207 ! verCases_checkNaNs
5208 && ( f128M_isSignalingNaN( &a )
5209 || f128M_isSignalingNaN( &b )
5210 || f128M_isSignalingNaN( &c )
5211 )
5212 ) {
5213 trueFlags |= softfloat_flag_invalid;
5214 }
5215 if (
5216 verCases_checkNaNs
5217 || ! f128M_isNaN( &trueZ )
5218 || ! f128M_isNaN( &subjZ )
5219 || f128M_isSignalingNaN( &subjZ )
5220 || (trueFlags != subjFlags)
5221 ) {
5222 ++verCases_errorCount;
5223 verCases_writeErrorFound( 10000 - count );
5224 writeCase_abc_f128M( &a, &b, &c );
5225 writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
5226 if ( verCases_errorCount == verCases_maxErrorCount ) break;
5227 }
5228 }
5229 }
5230 verCases_writeTestsPerformed( 10000 - count );
5231
5232}
5233
5234void
5235 ver_ab_f128_z_bool(
5236 bool trueFunction( const float128_t *, const float128_t * ) )
5237{
5238 int count;
5239 float128_t a, b;
5240 bool subjZ;
5241 uint_fast8_t subjFlags;
5242 bool trueZ;
5243 uint_fast8_t trueFlags;
5244
5245 verCases_errorCount = 0;
5246 verCases_tenThousandsCount = 0;
5247 count = 10000;
5248 while ( ! atEndOfInput() ) {
5249 readVerInput_f128( &a );
5250 readVerInput_f128( &b );
5251 readVerInput_bool( &subjZ );
5252 readVerInput_flags( &subjFlags );
5253 *verLoops_trueFlagsPtr = 0;
5254 trueZ = trueFunction( &a, &b );
5255 trueFlags = *verLoops_trueFlagsPtr;
5256 --count;
5257 if ( ! count ) {
5258 verCases_perTenThousand();
5259 count = 10000;
5260 }
5261 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
5262 if (
5263 ! verCases_checkNaNs
5264 && (f128M_isSignalingNaN( &a )
5265 || f128M_isSignalingNaN( &b ))
5266 ) {
5267 trueFlags |= softfloat_flag_invalid;
5268 }
5269 if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
5270 ++verCases_errorCount;
5271 verCases_writeErrorFound( 10000 - count );
5272 writeCase_ab_f128M( &a, &b );
5273 writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
5274 if ( verCases_errorCount == verCases_maxErrorCount ) break;
5275 }
5276 }
5277 }
5278 verCases_writeTestsPerformed( 10000 - count );
5279
5280}
5281
5282#endif
5283
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette