]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/test/testfloat/slowfloat.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / test / testfloat / slowfloat.h
1
2 /*
3 ===============================================================================
4
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.
8
9 Written by John R. Hauser.  More information is available through the Web
10 page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
11
12 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
13 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
14 TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
15 PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
16 AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
17
18 Derivative works are acceptable, even for commercial purposes, so long as
19 (1) they include prominent notice that the work is derivative, and (2) they
20 include prominent notice akin to these four paragraphs for those parts of
21 this code that are retained.
22
23 ===============================================================================
24 */
25
26 extern int8 slow_float_rounding_mode;
27 extern int8 slow_float_exception_flags;
28 extern int8 slow_float_detect_tininess;
29 #ifdef FLOATX80
30 extern int8 slow_floatx80_rounding_precision;
31 #endif
32
33 float32 slow_int32_to_float32( int32 );
34 float64 slow_int32_to_float64( int32 );
35 #ifdef FLOATX80
36 floatx80 slow_int32_to_floatx80( int32 );
37 #endif
38 #ifdef FLOAT128
39 float128 slow_int32_to_float128( int32 );
40 #endif
41 #ifdef BITS64
42 float32 slow_int64_to_float32( int64 );
43 float64 slow_int64_to_float64( int64 );
44 #ifdef FLOATX80
45 floatx80 slow_int64_to_floatx80( int64 );
46 #endif
47 #ifdef FLOAT128
48 float128 slow_int64_to_float128( int64 );
49 #endif
50 #endif
51
52 int32 slow_float32_to_int32( float32 );
53 int32 slow_float32_to_int32_round_to_zero( float32 );
54 #ifdef BITS64
55 int64 slow_float32_to_int64( float32 );
56 int64 slow_float32_to_int64_round_to_zero( float32 );
57 #endif
58 float64 slow_float32_to_float64( float32 );
59 #ifdef FLOATX80
60 floatx80 slow_float32_to_floatx80( float32 );
61 #endif
62 #ifdef FLOAT128
63 float128 slow_float32_to_float128( float32 );
64 #endif
65
66 float32 slow_float32_round_to_int( float32 );
67 float32 slow_float32_add( float32, float32 );
68 float32 slow_float32_sub( float32, float32 );
69 float32 slow_float32_mul( float32, float32 );
70 float32 slow_float32_div( float32, float32 );
71 float32 slow_float32_rem( float32, float32 );
72 float32 slow_float32_sqrt( float32 );
73 flag slow_float32_eq( float32, float32 );
74 flag slow_float32_le( float32, float32 );
75 flag slow_float32_lt( float32, float32 );
76 flag slow_float32_eq_signaling( float32, float32 );
77 flag slow_float32_le_quiet( float32, float32 );
78 flag slow_float32_lt_quiet( float32, float32 );
79
80 int32 slow_float64_to_int32( float64 );
81 int32 slow_float64_to_int32_round_to_zero( float64 );
82 #ifdef BITS64
83 int64 slow_float64_to_int64( float64 );
84 int64 slow_float64_to_int64_round_to_zero( float64 );
85 #endif
86 float32 slow_float64_to_float32( float64 );
87 #ifdef FLOATX80
88 floatx80 slow_float64_to_floatx80( float64 );
89 #endif
90 #ifdef FLOAT128
91 float128 slow_float64_to_float128( float64 );
92 #endif
93
94 float64 slow_float64_round_to_int( float64 );
95 float64 slow_float64_add( float64, float64 );
96 float64 slow_float64_sub( float64, float64 );
97 float64 slow_float64_mul( float64, float64 );
98 float64 slow_float64_div( float64, float64 );
99 float64 slow_float64_rem( float64, float64 );
100 float64 slow_float64_sqrt( float64 );
101 flag slow_float64_eq( float64, float64 );
102 flag slow_float64_le( float64, float64 );
103 flag slow_float64_lt( float64, float64 );
104 flag slow_float64_eq_signaling( float64, float64 );
105 flag slow_float64_le_quiet( float64, float64 );
106 flag slow_float64_lt_quiet( float64, float64 );
107
108 #ifdef FLOATX80
109
110 int32 slow_floatx80_to_int32( floatx80 );
111 int32 slow_floatx80_to_int32_round_to_zero( floatx80 );
112 #ifdef BITS64
113 int64 slow_floatx80_to_int64( floatx80 );
114 int64 slow_floatx80_to_int64_round_to_zero( floatx80 );
115 #endif
116 float32 slow_floatx80_to_float32( floatx80 );
117 float64 slow_floatx80_to_float64( floatx80 );
118 #ifdef FLOAT128
119 float128 slow_floatx80_to_float128( floatx80 );
120 #endif
121
122 floatx80 slow_floatx80_round_to_int( floatx80 );
123 floatx80 slow_floatx80_add( floatx80, floatx80 );
124 floatx80 slow_floatx80_sub( floatx80, floatx80 );
125 floatx80 slow_floatx80_mul( floatx80, floatx80 );
126 floatx80 slow_floatx80_div( floatx80, floatx80 );
127 floatx80 slow_floatx80_rem( floatx80, floatx80 );
128 floatx80 slow_floatx80_sqrt( floatx80 );
129 flag slow_floatx80_eq( floatx80, floatx80 );
130 flag slow_floatx80_le( floatx80, floatx80 );
131 flag slow_floatx80_lt( floatx80, floatx80 );
132 flag slow_floatx80_eq_signaling( floatx80, floatx80 );
133 flag slow_floatx80_le_quiet( floatx80, floatx80 );
134 flag slow_floatx80_lt_quiet( floatx80, floatx80 );
135
136 #endif
137
138 #ifdef FLOAT128
139
140 int32 slow_float128_to_int32( float128 );
141 int32 slow_float128_to_int32_round_to_zero( float128 );
142 #ifdef BITS64
143 int64 slow_float128_to_int64( float128 );
144 int64 slow_float128_to_int64_round_to_zero( float128 );
145 #endif
146 float32 slow_float128_to_float32( float128 );
147 float64 slow_float128_to_float64( float128 );
148 #ifdef FLOATX80
149 floatx80 slow_float128_to_floatx80( float128 );
150 #endif
151
152 float128 slow_float128_round_to_int( float128 );
153 float128 slow_float128_add( float128, float128 );
154 float128 slow_float128_sub( float128, float128 );
155 float128 slow_float128_mul( float128, float128 );
156 float128 slow_float128_div( float128, float128 );
157 float128 slow_float128_rem( float128, float128 );
158 float128 slow_float128_sqrt( float128 );
159 flag slow_float128_eq( float128, float128 );
160 flag slow_float128_le( float128, float128 );
161 flag slow_float128_lt( float128, float128 );
162 flag slow_float128_eq_signaling( float128, float128 );
163 flag slow_float128_le_quiet( float128, float128 );
164 flag slow_float128_lt_quiet( float128, float128 );
165
166 #endif
167