3 ===============================================================================
5 This C header file is part of TestFloat, Release 2a, a package of programs
6 for testing the correctness of floating-point arithmetic complying to the
7 IEC/IEEE Standard for Floating-Point.
9 Written by John R. Hauser. More information is available through the Web
10 page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
12 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
13 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
14 TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
15 PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
16 AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
18 Derivative works are acceptable, even for commercial purposes, so long as
19 (1) they include prominent notice that the work is derivative, and (2) they
20 include prominent notice akin to these four paragraphs for those parts of
21 this code that are retained.
23 ===============================================================================
28 extern volatile flag stop;
30 extern char *trueName, *testName;
31 extern flag forever, errorStop;
32 extern uint32 maxErrorCount;
33 extern flag checkNaNs;
34 extern int8 *trueFlagsPtr;
35 extern int8 ( *testFlagsFunctionPtr )( void );
36 extern char *functionName;
37 extern char *roundingPrecisionName, *roundingModeName, *tininessModeName;
38 extern flag anyErrors;
40 void writeFunctionName( FILE * );
41 void exitWithStatus( void );
43 void test_a_int32_z_float32( float32 ( int32 ), float32 ( int32 ) );
44 void test_a_int32_z_float64( float64 ( int32 ), float64 ( int32 ) );
46 void test_a_int32_z_floatx80( floatx80 ( int32 ), floatx80 ( int32 ) );
49 void test_a_int32_z_float128( float128 ( int32 ), float128 ( int32 ) );
52 void test_a_int64_z_float32( float32 ( int64 ), float32 ( int64 ) );
53 void test_a_int64_z_float64( float64 ( int64 ), float64 ( int64 ) );
55 void test_a_int64_z_floatx80( floatx80 ( int64 ), floatx80 ( int64 ) );
58 void test_a_int64_z_float128( float128 ( int64 ), float128 ( int64 ) );
62 void test_a_float32_z_int32( int32 ( float32 ), int32 ( float32 ) );
64 void test_a_float32_z_int64( int64 ( float32 ), int64 ( float32 ) );
66 void test_a_float32_z_float64( float64 ( float32 ), float64 ( float32 ) );
68 void test_a_float32_z_floatx80( floatx80 ( float32 ), floatx80 ( float32 ) );
71 void test_a_float32_z_float128( float128 ( float32 ), float128 ( float32 ) );
73 void test_az_float32( float32 ( float32 ), float32 ( float32 ) );
75 test_ab_float32_z_flag(
76 flag ( float32, float32 ), flag ( float32, float32 ) );
79 float32 ( float32, float32 ), float32 ( float32, float32 ) );
81 void test_a_float64_z_int32( int32 ( float64 ), int32 ( float64 ) );
83 void test_a_float64_z_int64( int64 ( float64 ), int64 ( float64 ) );
85 void test_a_float64_z_float32( float32 ( float64 ), float32 ( float64 ) );
87 void test_a_float64_z_floatx80( floatx80 ( float64 ), floatx80 ( float64 ) );
90 void test_a_float64_z_float128( float128 ( float64 ), float128 ( float64 ) );
92 void test_az_float64( float64 ( float64 ), float64 ( float64 ) );
94 test_ab_float64_z_flag(
95 flag ( float64, float64 ), flag ( float64, float64 ) );
98 float64 ( float64, float64 ), float64 ( float64, float64 ) );
102 void test_a_floatx80_z_int32( int32 ( floatx80 ), int32 ( floatx80 ) );
104 void test_a_floatx80_z_int64( int64 ( floatx80 ), int64 ( floatx80 ) );
106 void test_a_floatx80_z_float32( float32 ( floatx80 ), float32 ( floatx80 ) );
107 void test_a_floatx80_z_float64( float64 ( floatx80 ), float64 ( floatx80 ) );
110 test_a_floatx80_z_float128( float128 ( floatx80 ), float128 ( floatx80 ) );
112 void test_az_floatx80( floatx80 ( floatx80 ), floatx80 ( floatx80 ) );
114 test_ab_floatx80_z_flag(
115 flag ( floatx80, floatx80 ), flag ( floatx80, floatx80 ) );
118 floatx80 ( floatx80, floatx80 ), floatx80 ( floatx80, floatx80 ) );
124 void test_a_float128_z_int32( int32 ( float128 ), int32 ( float128 ) );
126 void test_a_float128_z_int64( int64 ( float128 ), int64 ( float128 ) );
128 void test_a_float128_z_float32( float32 ( float128 ), float32 ( float128 ) );
129 void test_a_float128_z_float64( float64 ( float128 ), float64 ( float128 ) );
132 test_a_float128_z_floatx80( floatx80 ( float128 ), floatx80 ( float128 ) );
134 void test_az_float128( float128 ( float128 ), float128 ( float128 ) );
136 test_ab_float128_z_flag(
137 flag ( float128, float128 ), flag ( float128, float128 ) );
140 float128 ( float128, float128 ), float128 ( float128, float128 ) );