|
1 ------------------------------------------------------------------------ |
|
2 -- rounding.decTest -- decimal rounding modes testcases -- |
|
3 -- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. -- |
|
4 ------------------------------------------------------------------------ |
|
5 -- Please see the document "General Decimal Arithmetic Testcases" -- |
|
6 -- at http://www2.hursley.ibm.com/decimal for the description of -- |
|
7 -- these testcases. -- |
|
8 -- -- |
|
9 -- These testcases are experimental ('beta' versions), and they -- |
|
10 -- may contain errors. They are offered on an as-is basis. In -- |
|
11 -- particular, achieving the same results as the tests here is not -- |
|
12 -- a guarantee that an implementation complies with any Standard -- |
|
13 -- or specification. The tests are not exhaustive. -- |
|
14 -- -- |
|
15 -- Please send comments, suggestions, and corrections to the author: -- |
|
16 -- Mike Cowlishaw, IBM Fellow -- |
|
17 -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- |
|
18 -- mfc@uk.ibm.com -- |
|
19 ------------------------------------------------------------------------ |
|
20 version: 2.58 |
|
21 |
|
22 -- These tests require that implementations take account of residues in |
|
23 -- order to get correct results for some rounding modes. Rather than |
|
24 -- single rounding tests we therefore need tests for most operators. |
|
25 -- [We do assume add/minus/plus/subtract are common paths, however, as |
|
26 -- is rounding of negatives (if the latter works for addition, assume it |
|
27 -- works for the others, too).] |
|
28 -- |
|
29 -- Round-for-reround (05UP) is tested as a separate block, mostly for |
|
30 -- 'historical' reasons. |
|
31 -- |
|
32 -- Underflow Subnormal and overflow behaviours are tested under the |
|
33 -- individual operators. |
|
34 |
|
35 extended: 1 |
|
36 precision: 5 -- for easier visual inspection |
|
37 maxExponent: 999 |
|
38 minexponent: -999 |
|
39 |
|
40 -- Addition operators ------------------------------------------------- |
|
41 rounding: down |
|
42 |
|
43 radx100 add 12345 -0.1 -> 12344 Inexact Rounded |
|
44 radx101 add 12345 -0.01 -> 12344 Inexact Rounded |
|
45 radx102 add 12345 -0.001 -> 12344 Inexact Rounded |
|
46 radx103 add 12345 -0.00001 -> 12344 Inexact Rounded |
|
47 radx104 add 12345 -0.000001 -> 12344 Inexact Rounded |
|
48 radx105 add 12345 -0.0000001 -> 12344 Inexact Rounded |
|
49 radx106 add 12345 0 -> 12345 |
|
50 radx107 add 12345 0.0000001 -> 12345 Inexact Rounded |
|
51 radx108 add 12345 0.000001 -> 12345 Inexact Rounded |
|
52 radx109 add 12345 0.00001 -> 12345 Inexact Rounded |
|
53 radx110 add 12345 0.0001 -> 12345 Inexact Rounded |
|
54 radx111 add 12345 0.001 -> 12345 Inexact Rounded |
|
55 radx112 add 12345 0.01 -> 12345 Inexact Rounded |
|
56 radx113 add 12345 0.1 -> 12345 Inexact Rounded |
|
57 |
|
58 radx115 add 12346 0.49999 -> 12346 Inexact Rounded |
|
59 radx116 add 12346 0.5 -> 12346 Inexact Rounded |
|
60 radx117 add 12346 0.50001 -> 12346 Inexact Rounded |
|
61 |
|
62 radx120 add 12345 0.4 -> 12345 Inexact Rounded |
|
63 radx121 add 12345 0.49 -> 12345 Inexact Rounded |
|
64 radx122 add 12345 0.499 -> 12345 Inexact Rounded |
|
65 radx123 add 12345 0.49999 -> 12345 Inexact Rounded |
|
66 radx124 add 12345 0.5 -> 12345 Inexact Rounded |
|
67 radx125 add 12345 0.50001 -> 12345 Inexact Rounded |
|
68 radx126 add 12345 0.5001 -> 12345 Inexact Rounded |
|
69 radx127 add 12345 0.501 -> 12345 Inexact Rounded |
|
70 radx128 add 12345 0.51 -> 12345 Inexact Rounded |
|
71 radx129 add 12345 0.6 -> 12345 Inexact Rounded |
|
72 |
|
73 rounding: half_down |
|
74 |
|
75 radx140 add 12345 -0.1 -> 12345 Inexact Rounded |
|
76 radx141 add 12345 -0.01 -> 12345 Inexact Rounded |
|
77 radx142 add 12345 -0.001 -> 12345 Inexact Rounded |
|
78 radx143 add 12345 -0.00001 -> 12345 Inexact Rounded |
|
79 radx144 add 12345 -0.000001 -> 12345 Inexact Rounded |
|
80 radx145 add 12345 -0.0000001 -> 12345 Inexact Rounded |
|
81 radx146 add 12345 0 -> 12345 |
|
82 radx147 add 12345 0.0000001 -> 12345 Inexact Rounded |
|
83 radx148 add 12345 0.000001 -> 12345 Inexact Rounded |
|
84 radx149 add 12345 0.00001 -> 12345 Inexact Rounded |
|
85 radx150 add 12345 0.0001 -> 12345 Inexact Rounded |
|
86 radx151 add 12345 0.001 -> 12345 Inexact Rounded |
|
87 radx152 add 12345 0.01 -> 12345 Inexact Rounded |
|
88 radx153 add 12345 0.1 -> 12345 Inexact Rounded |
|
89 |
|
90 radx155 add 12346 0.49999 -> 12346 Inexact Rounded |
|
91 radx156 add 12346 0.5 -> 12346 Inexact Rounded |
|
92 radx157 add 12346 0.50001 -> 12347 Inexact Rounded |
|
93 |
|
94 radx160 add 12345 0.4 -> 12345 Inexact Rounded |
|
95 radx161 add 12345 0.49 -> 12345 Inexact Rounded |
|
96 radx162 add 12345 0.499 -> 12345 Inexact Rounded |
|
97 radx163 add 12345 0.49999 -> 12345 Inexact Rounded |
|
98 radx164 add 12345 0.5 -> 12345 Inexact Rounded |
|
99 radx165 add 12345 0.50001 -> 12346 Inexact Rounded |
|
100 radx166 add 12345 0.5001 -> 12346 Inexact Rounded |
|
101 radx167 add 12345 0.501 -> 12346 Inexact Rounded |
|
102 radx168 add 12345 0.51 -> 12346 Inexact Rounded |
|
103 radx169 add 12345 0.6 -> 12346 Inexact Rounded |
|
104 |
|
105 rounding: half_even |
|
106 |
|
107 radx170 add 12345 -0.1 -> 12345 Inexact Rounded |
|
108 radx171 add 12345 -0.01 -> 12345 Inexact Rounded |
|
109 radx172 add 12345 -0.001 -> 12345 Inexact Rounded |
|
110 radx173 add 12345 -0.00001 -> 12345 Inexact Rounded |
|
111 radx174 add 12345 -0.000001 -> 12345 Inexact Rounded |
|
112 radx175 add 12345 -0.0000001 -> 12345 Inexact Rounded |
|
113 radx176 add 12345 0 -> 12345 |
|
114 radx177 add 12345 0.0000001 -> 12345 Inexact Rounded |
|
115 radx178 add 12345 0.000001 -> 12345 Inexact Rounded |
|
116 radx179 add 12345 0.00001 -> 12345 Inexact Rounded |
|
117 radx180 add 12345 0.0001 -> 12345 Inexact Rounded |
|
118 radx181 add 12345 0.001 -> 12345 Inexact Rounded |
|
119 radx182 add 12345 0.01 -> 12345 Inexact Rounded |
|
120 radx183 add 12345 0.1 -> 12345 Inexact Rounded |
|
121 |
|
122 radx185 add 12346 0.49999 -> 12346 Inexact Rounded |
|
123 radx186 add 12346 0.5 -> 12346 Inexact Rounded |
|
124 radx187 add 12346 0.50001 -> 12347 Inexact Rounded |
|
125 |
|
126 radx190 add 12345 0.4 -> 12345 Inexact Rounded |
|
127 radx191 add 12345 0.49 -> 12345 Inexact Rounded |
|
128 radx192 add 12345 0.499 -> 12345 Inexact Rounded |
|
129 radx193 add 12345 0.49999 -> 12345 Inexact Rounded |
|
130 radx194 add 12345 0.5 -> 12346 Inexact Rounded |
|
131 radx195 add 12345 0.50001 -> 12346 Inexact Rounded |
|
132 radx196 add 12345 0.5001 -> 12346 Inexact Rounded |
|
133 radx197 add 12345 0.501 -> 12346 Inexact Rounded |
|
134 radx198 add 12345 0.51 -> 12346 Inexact Rounded |
|
135 radx199 add 12345 0.6 -> 12346 Inexact Rounded |
|
136 |
|
137 rounding: half_up |
|
138 |
|
139 radx200 add 12345 -0.1 -> 12345 Inexact Rounded |
|
140 radx201 add 12345 -0.01 -> 12345 Inexact Rounded |
|
141 radx202 add 12345 -0.001 -> 12345 Inexact Rounded |
|
142 radx203 add 12345 -0.00001 -> 12345 Inexact Rounded |
|
143 radx204 add 12345 -0.000001 -> 12345 Inexact Rounded |
|
144 radx205 add 12345 -0.0000001 -> 12345 Inexact Rounded |
|
145 radx206 add 12345 0 -> 12345 |
|
146 radx207 add 12345 0.0000001 -> 12345 Inexact Rounded |
|
147 radx208 add 12345 0.000001 -> 12345 Inexact Rounded |
|
148 radx209 add 12345 0.00001 -> 12345 Inexact Rounded |
|
149 radx210 add 12345 0.0001 -> 12345 Inexact Rounded |
|
150 radx211 add 12345 0.001 -> 12345 Inexact Rounded |
|
151 radx212 add 12345 0.01 -> 12345 Inexact Rounded |
|
152 radx213 add 12345 0.1 -> 12345 Inexact Rounded |
|
153 |
|
154 radx215 add 12346 0.49999 -> 12346 Inexact Rounded |
|
155 radx216 add 12346 0.5 -> 12347 Inexact Rounded |
|
156 radx217 add 12346 0.50001 -> 12347 Inexact Rounded |
|
157 |
|
158 radx220 add 12345 0.4 -> 12345 Inexact Rounded |
|
159 radx221 add 12345 0.49 -> 12345 Inexact Rounded |
|
160 radx222 add 12345 0.499 -> 12345 Inexact Rounded |
|
161 radx223 add 12345 0.49999 -> 12345 Inexact Rounded |
|
162 radx224 add 12345 0.5 -> 12346 Inexact Rounded |
|
163 radx225 add 12345 0.50001 -> 12346 Inexact Rounded |
|
164 radx226 add 12345 0.5001 -> 12346 Inexact Rounded |
|
165 radx227 add 12345 0.501 -> 12346 Inexact Rounded |
|
166 radx228 add 12345 0.51 -> 12346 Inexact Rounded |
|
167 radx229 add 12345 0.6 -> 12346 Inexact Rounded |
|
168 |
|
169 rounding: up |
|
170 |
|
171 radx230 add 12345 -0.1 -> 12345 Inexact Rounded |
|
172 radx231 add 12345 -0.01 -> 12345 Inexact Rounded |
|
173 radx232 add 12345 -0.001 -> 12345 Inexact Rounded |
|
174 radx233 add 12345 -0.00001 -> 12345 Inexact Rounded |
|
175 radx234 add 12345 -0.000001 -> 12345 Inexact Rounded |
|
176 radx235 add 12345 -0.0000001 -> 12345 Inexact Rounded |
|
177 radx236 add 12345 0 -> 12345 |
|
178 radx237 add 12345 0.0000001 -> 12346 Inexact Rounded |
|
179 radx238 add 12345 0.000001 -> 12346 Inexact Rounded |
|
180 radx239 add 12345 0.00001 -> 12346 Inexact Rounded |
|
181 radx240 add 12345 0.0001 -> 12346 Inexact Rounded |
|
182 radx241 add 12345 0.001 -> 12346 Inexact Rounded |
|
183 radx242 add 12345 0.01 -> 12346 Inexact Rounded |
|
184 radx243 add 12345 0.1 -> 12346 Inexact Rounded |
|
185 |
|
186 radx245 add 12346 0.49999 -> 12347 Inexact Rounded |
|
187 radx246 add 12346 0.5 -> 12347 Inexact Rounded |
|
188 radx247 add 12346 0.50001 -> 12347 Inexact Rounded |
|
189 |
|
190 radx250 add 12345 0.4 -> 12346 Inexact Rounded |
|
191 radx251 add 12345 0.49 -> 12346 Inexact Rounded |
|
192 radx252 add 12345 0.499 -> 12346 Inexact Rounded |
|
193 radx253 add 12345 0.49999 -> 12346 Inexact Rounded |
|
194 radx254 add 12345 0.5 -> 12346 Inexact Rounded |
|
195 radx255 add 12345 0.50001 -> 12346 Inexact Rounded |
|
196 radx256 add 12345 0.5001 -> 12346 Inexact Rounded |
|
197 radx257 add 12345 0.501 -> 12346 Inexact Rounded |
|
198 radx258 add 12345 0.51 -> 12346 Inexact Rounded |
|
199 radx259 add 12345 0.6 -> 12346 Inexact Rounded |
|
200 |
|
201 rounding: floor |
|
202 |
|
203 radx300 add 12345 -0.1 -> 12344 Inexact Rounded |
|
204 radx301 add 12345 -0.01 -> 12344 Inexact Rounded |
|
205 radx302 add 12345 -0.001 -> 12344 Inexact Rounded |
|
206 radx303 add 12345 -0.00001 -> 12344 Inexact Rounded |
|
207 radx304 add 12345 -0.000001 -> 12344 Inexact Rounded |
|
208 radx305 add 12345 -0.0000001 -> 12344 Inexact Rounded |
|
209 radx306 add 12345 0 -> 12345 |
|
210 radx307 add 12345 0.0000001 -> 12345 Inexact Rounded |
|
211 radx308 add 12345 0.000001 -> 12345 Inexact Rounded |
|
212 radx309 add 12345 0.00001 -> 12345 Inexact Rounded |
|
213 radx310 add 12345 0.0001 -> 12345 Inexact Rounded |
|
214 radx311 add 12345 0.001 -> 12345 Inexact Rounded |
|
215 radx312 add 12345 0.01 -> 12345 Inexact Rounded |
|
216 radx313 add 12345 0.1 -> 12345 Inexact Rounded |
|
217 |
|
218 radx315 add 12346 0.49999 -> 12346 Inexact Rounded |
|
219 radx316 add 12346 0.5 -> 12346 Inexact Rounded |
|
220 radx317 add 12346 0.50001 -> 12346 Inexact Rounded |
|
221 |
|
222 radx320 add 12345 0.4 -> 12345 Inexact Rounded |
|
223 radx321 add 12345 0.49 -> 12345 Inexact Rounded |
|
224 radx322 add 12345 0.499 -> 12345 Inexact Rounded |
|
225 radx323 add 12345 0.49999 -> 12345 Inexact Rounded |
|
226 radx324 add 12345 0.5 -> 12345 Inexact Rounded |
|
227 radx325 add 12345 0.50001 -> 12345 Inexact Rounded |
|
228 radx326 add 12345 0.5001 -> 12345 Inexact Rounded |
|
229 radx327 add 12345 0.501 -> 12345 Inexact Rounded |
|
230 radx328 add 12345 0.51 -> 12345 Inexact Rounded |
|
231 radx329 add 12345 0.6 -> 12345 Inexact Rounded |
|
232 |
|
233 rounding: ceiling |
|
234 |
|
235 radx330 add 12345 -0.1 -> 12345 Inexact Rounded |
|
236 radx331 add 12345 -0.01 -> 12345 Inexact Rounded |
|
237 radx332 add 12345 -0.001 -> 12345 Inexact Rounded |
|
238 radx333 add 12345 -0.00001 -> 12345 Inexact Rounded |
|
239 radx334 add 12345 -0.000001 -> 12345 Inexact Rounded |
|
240 radx335 add 12345 -0.0000001 -> 12345 Inexact Rounded |
|
241 radx336 add 12345 0 -> 12345 |
|
242 radx337 add 12345 0.0000001 -> 12346 Inexact Rounded |
|
243 radx338 add 12345 0.000001 -> 12346 Inexact Rounded |
|
244 radx339 add 12345 0.00001 -> 12346 Inexact Rounded |
|
245 radx340 add 12345 0.0001 -> 12346 Inexact Rounded |
|
246 radx341 add 12345 0.001 -> 12346 Inexact Rounded |
|
247 radx342 add 12345 0.01 -> 12346 Inexact Rounded |
|
248 radx343 add 12345 0.1 -> 12346 Inexact Rounded |
|
249 |
|
250 radx345 add 12346 0.49999 -> 12347 Inexact Rounded |
|
251 radx346 add 12346 0.5 -> 12347 Inexact Rounded |
|
252 radx347 add 12346 0.50001 -> 12347 Inexact Rounded |
|
253 |
|
254 radx350 add 12345 0.4 -> 12346 Inexact Rounded |
|
255 radx351 add 12345 0.49 -> 12346 Inexact Rounded |
|
256 radx352 add 12345 0.499 -> 12346 Inexact Rounded |
|
257 radx353 add 12345 0.49999 -> 12346 Inexact Rounded |
|
258 radx354 add 12345 0.5 -> 12346 Inexact Rounded |
|
259 radx355 add 12345 0.50001 -> 12346 Inexact Rounded |
|
260 radx356 add 12345 0.5001 -> 12346 Inexact Rounded |
|
261 radx357 add 12345 0.501 -> 12346 Inexact Rounded |
|
262 radx358 add 12345 0.51 -> 12346 Inexact Rounded |
|
263 radx359 add 12345 0.6 -> 12346 Inexact Rounded |
|
264 |
|
265 -- negatives... |
|
266 |
|
267 rounding: down |
|
268 |
|
269 rsux100 add -12345 -0.1 -> -12345 Inexact Rounded |
|
270 rsux101 add -12345 -0.01 -> -12345 Inexact Rounded |
|
271 rsux102 add -12345 -0.001 -> -12345 Inexact Rounded |
|
272 rsux103 add -12345 -0.00001 -> -12345 Inexact Rounded |
|
273 rsux104 add -12345 -0.000001 -> -12345 Inexact Rounded |
|
274 rsux105 add -12345 -0.0000001 -> -12345 Inexact Rounded |
|
275 rsux106 add -12345 0 -> -12345 |
|
276 rsux107 add -12345 0.0000001 -> -12344 Inexact Rounded |
|
277 rsux108 add -12345 0.000001 -> -12344 Inexact Rounded |
|
278 rsux109 add -12345 0.00001 -> -12344 Inexact Rounded |
|
279 rsux110 add -12345 0.0001 -> -12344 Inexact Rounded |
|
280 rsux111 add -12345 0.001 -> -12344 Inexact Rounded |
|
281 rsux112 add -12345 0.01 -> -12344 Inexact Rounded |
|
282 rsux113 add -12345 0.1 -> -12344 Inexact Rounded |
|
283 |
|
284 rsux115 add -12346 0.49999 -> -12345 Inexact Rounded |
|
285 rsux116 add -12346 0.5 -> -12345 Inexact Rounded |
|
286 rsux117 add -12346 0.50001 -> -12345 Inexact Rounded |
|
287 |
|
288 rsux120 add -12345 0.4 -> -12344 Inexact Rounded |
|
289 rsux121 add -12345 0.49 -> -12344 Inexact Rounded |
|
290 rsux122 add -12345 0.499 -> -12344 Inexact Rounded |
|
291 rsux123 add -12345 0.49999 -> -12344 Inexact Rounded |
|
292 rsux124 add -12345 0.5 -> -12344 Inexact Rounded |
|
293 rsux125 add -12345 0.50001 -> -12344 Inexact Rounded |
|
294 rsux126 add -12345 0.5001 -> -12344 Inexact Rounded |
|
295 rsux127 add -12345 0.501 -> -12344 Inexact Rounded |
|
296 rsux128 add -12345 0.51 -> -12344 Inexact Rounded |
|
297 rsux129 add -12345 0.6 -> -12344 Inexact Rounded |
|
298 |
|
299 rounding: half_down |
|
300 |
|
301 rsux140 add -12345 -0.1 -> -12345 Inexact Rounded |
|
302 rsux141 add -12345 -0.01 -> -12345 Inexact Rounded |
|
303 rsux142 add -12345 -0.001 -> -12345 Inexact Rounded |
|
304 rsux143 add -12345 -0.00001 -> -12345 Inexact Rounded |
|
305 rsux144 add -12345 -0.000001 -> -12345 Inexact Rounded |
|
306 rsux145 add -12345 -0.0000001 -> -12345 Inexact Rounded |
|
307 rsux146 add -12345 0 -> -12345 |
|
308 rsux147 add -12345 0.0000001 -> -12345 Inexact Rounded |
|
309 rsux148 add -12345 0.000001 -> -12345 Inexact Rounded |
|
310 rsux149 add -12345 0.00001 -> -12345 Inexact Rounded |
|
311 rsux150 add -12345 0.0001 -> -12345 Inexact Rounded |
|
312 rsux151 add -12345 0.001 -> -12345 Inexact Rounded |
|
313 rsux152 add -12345 0.01 -> -12345 Inexact Rounded |
|
314 rsux153 add -12345 0.1 -> -12345 Inexact Rounded |
|
315 |
|
316 rsux155 add -12346 0.49999 -> -12346 Inexact Rounded |
|
317 rsux156 add -12346 0.5 -> -12345 Inexact Rounded |
|
318 rsux157 add -12346 0.50001 -> -12345 Inexact Rounded |
|
319 |
|
320 rsux160 add -12345 0.4 -> -12345 Inexact Rounded |
|
321 rsux161 add -12345 0.49 -> -12345 Inexact Rounded |
|
322 rsux162 add -12345 0.499 -> -12345 Inexact Rounded |
|
323 rsux163 add -12345 0.49999 -> -12345 Inexact Rounded |
|
324 rsux164 add -12345 0.5 -> -12344 Inexact Rounded |
|
325 rsux165 add -12345 0.50001 -> -12344 Inexact Rounded |
|
326 rsux166 add -12345 0.5001 -> -12344 Inexact Rounded |
|
327 rsux167 add -12345 0.501 -> -12344 Inexact Rounded |
|
328 rsux168 add -12345 0.51 -> -12344 Inexact Rounded |
|
329 rsux169 add -12345 0.6 -> -12344 Inexact Rounded |
|
330 |
|
331 rounding: half_even |
|
332 |
|
333 rsux170 add -12345 -0.1 -> -12345 Inexact Rounded |
|
334 rsux171 add -12345 -0.01 -> -12345 Inexact Rounded |
|
335 rsux172 add -12345 -0.001 -> -12345 Inexact Rounded |
|
336 rsux173 add -12345 -0.00001 -> -12345 Inexact Rounded |
|
337 rsux174 add -12345 -0.000001 -> -12345 Inexact Rounded |
|
338 rsux175 add -12345 -0.0000001 -> -12345 Inexact Rounded |
|
339 rsux176 add -12345 0 -> -12345 |
|
340 rsux177 add -12345 0.0000001 -> -12345 Inexact Rounded |
|
341 rsux178 add -12345 0.000001 -> -12345 Inexact Rounded |
|
342 rsux179 add -12345 0.00001 -> -12345 Inexact Rounded |
|
343 rsux180 add -12345 0.0001 -> -12345 Inexact Rounded |
|
344 rsux181 add -12345 0.001 -> -12345 Inexact Rounded |
|
345 rsux182 add -12345 0.01 -> -12345 Inexact Rounded |
|
346 rsux183 add -12345 0.1 -> -12345 Inexact Rounded |
|
347 |
|
348 rsux185 add -12346 0.49999 -> -12346 Inexact Rounded |
|
349 rsux186 add -12346 0.5 -> -12346 Inexact Rounded |
|
350 rsux187 add -12346 0.50001 -> -12345 Inexact Rounded |
|
351 |
|
352 rsux190 add -12345 0.4 -> -12345 Inexact Rounded |
|
353 rsux191 add -12345 0.49 -> -12345 Inexact Rounded |
|
354 rsux192 add -12345 0.499 -> -12345 Inexact Rounded |
|
355 rsux193 add -12345 0.49999 -> -12345 Inexact Rounded |
|
356 rsux194 add -12345 0.5 -> -12344 Inexact Rounded |
|
357 rsux195 add -12345 0.50001 -> -12344 Inexact Rounded |
|
358 rsux196 add -12345 0.5001 -> -12344 Inexact Rounded |
|
359 rsux197 add -12345 0.501 -> -12344 Inexact Rounded |
|
360 rsux198 add -12345 0.51 -> -12344 Inexact Rounded |
|
361 rsux199 add -12345 0.6 -> -12344 Inexact Rounded |
|
362 |
|
363 rounding: half_up |
|
364 |
|
365 rsux200 add -12345 -0.1 -> -12345 Inexact Rounded |
|
366 rsux201 add -12345 -0.01 -> -12345 Inexact Rounded |
|
367 rsux202 add -12345 -0.001 -> -12345 Inexact Rounded |
|
368 rsux203 add -12345 -0.00001 -> -12345 Inexact Rounded |
|
369 rsux204 add -12345 -0.000001 -> -12345 Inexact Rounded |
|
370 rsux205 add -12345 -0.0000001 -> -12345 Inexact Rounded |
|
371 rsux206 add -12345 0 -> -12345 |
|
372 rsux207 add -12345 0.0000001 -> -12345 Inexact Rounded |
|
373 rsux208 add -12345 0.000001 -> -12345 Inexact Rounded |
|
374 rsux209 add -12345 0.00001 -> -12345 Inexact Rounded |
|
375 rsux210 add -12345 0.0001 -> -12345 Inexact Rounded |
|
376 rsux211 add -12345 0.001 -> -12345 Inexact Rounded |
|
377 rsux212 add -12345 0.01 -> -12345 Inexact Rounded |
|
378 rsux213 add -12345 0.1 -> -12345 Inexact Rounded |
|
379 |
|
380 rsux215 add -12346 0.49999 -> -12346 Inexact Rounded |
|
381 rsux216 add -12346 0.5 -> -12346 Inexact Rounded |
|
382 rsux217 add -12346 0.50001 -> -12345 Inexact Rounded |
|
383 |
|
384 rsux220 add -12345 0.4 -> -12345 Inexact Rounded |
|
385 rsux221 add -12345 0.49 -> -12345 Inexact Rounded |
|
386 rsux222 add -12345 0.499 -> -12345 Inexact Rounded |
|
387 rsux223 add -12345 0.49999 -> -12345 Inexact Rounded |
|
388 rsux224 add -12345 0.5 -> -12345 Inexact Rounded |
|
389 rsux225 add -12345 0.50001 -> -12344 Inexact Rounded |
|
390 rsux226 add -12345 0.5001 -> -12344 Inexact Rounded |
|
391 rsux227 add -12345 0.501 -> -12344 Inexact Rounded |
|
392 rsux228 add -12345 0.51 -> -12344 Inexact Rounded |
|
393 rsux229 add -12345 0.6 -> -12344 Inexact Rounded |
|
394 |
|
395 rounding: up |
|
396 |
|
397 rsux230 add -12345 -0.1 -> -12346 Inexact Rounded |
|
398 rsux231 add -12345 -0.01 -> -12346 Inexact Rounded |
|
399 rsux232 add -12345 -0.001 -> -12346 Inexact Rounded |
|
400 rsux233 add -12345 -0.00001 -> -12346 Inexact Rounded |
|
401 rsux234 add -12345 -0.000001 -> -12346 Inexact Rounded |
|
402 rsux235 add -12345 -0.0000001 -> -12346 Inexact Rounded |
|
403 rsux236 add -12345 0 -> -12345 |
|
404 rsux237 add -12345 0.0000001 -> -12345 Inexact Rounded |
|
405 rsux238 add -12345 0.000001 -> -12345 Inexact Rounded |
|
406 rsux239 add -12345 0.00001 -> -12345 Inexact Rounded |
|
407 rsux240 add -12345 0.0001 -> -12345 Inexact Rounded |
|
408 rsux241 add -12345 0.001 -> -12345 Inexact Rounded |
|
409 rsux242 add -12345 0.01 -> -12345 Inexact Rounded |
|
410 rsux243 add -12345 0.1 -> -12345 Inexact Rounded |
|
411 |
|
412 rsux245 add -12346 0.49999 -> -12346 Inexact Rounded |
|
413 rsux246 add -12346 0.5 -> -12346 Inexact Rounded |
|
414 rsux247 add -12346 0.50001 -> -12346 Inexact Rounded |
|
415 |
|
416 rsux250 add -12345 0.4 -> -12345 Inexact Rounded |
|
417 rsux251 add -12345 0.49 -> -12345 Inexact Rounded |
|
418 rsux252 add -12345 0.499 -> -12345 Inexact Rounded |
|
419 rsux253 add -12345 0.49999 -> -12345 Inexact Rounded |
|
420 rsux254 add -12345 0.5 -> -12345 Inexact Rounded |
|
421 rsux255 add -12345 0.50001 -> -12345 Inexact Rounded |
|
422 rsux256 add -12345 0.5001 -> -12345 Inexact Rounded |
|
423 rsux257 add -12345 0.501 -> -12345 Inexact Rounded |
|
424 rsux258 add -12345 0.51 -> -12345 Inexact Rounded |
|
425 rsux259 add -12345 0.6 -> -12345 Inexact Rounded |
|
426 |
|
427 rounding: floor |
|
428 |
|
429 rsux300 add -12345 -0.1 -> -12346 Inexact Rounded |
|
430 rsux301 add -12345 -0.01 -> -12346 Inexact Rounded |
|
431 rsux302 add -12345 -0.001 -> -12346 Inexact Rounded |
|
432 rsux303 add -12345 -0.00001 -> -12346 Inexact Rounded |
|
433 rsux304 add -12345 -0.000001 -> -12346 Inexact Rounded |
|
434 rsux305 add -12345 -0.0000001 -> -12346 Inexact Rounded |
|
435 rsux306 add -12345 0 -> -12345 |
|
436 rsux307 add -12345 0.0000001 -> -12345 Inexact Rounded |
|
437 rsux308 add -12345 0.000001 -> -12345 Inexact Rounded |
|
438 rsux309 add -12345 0.00001 -> -12345 Inexact Rounded |
|
439 rsux310 add -12345 0.0001 -> -12345 Inexact Rounded |
|
440 rsux311 add -12345 0.001 -> -12345 Inexact Rounded |
|
441 rsux312 add -12345 0.01 -> -12345 Inexact Rounded |
|
442 rsux313 add -12345 0.1 -> -12345 Inexact Rounded |
|
443 |
|
444 rsux315 add -12346 0.49999 -> -12346 Inexact Rounded |
|
445 rsux316 add -12346 0.5 -> -12346 Inexact Rounded |
|
446 rsux317 add -12346 0.50001 -> -12346 Inexact Rounded |
|
447 |
|
448 rsux320 add -12345 0.4 -> -12345 Inexact Rounded |
|
449 rsux321 add -12345 0.49 -> -12345 Inexact Rounded |
|
450 rsux322 add -12345 0.499 -> -12345 Inexact Rounded |
|
451 rsux323 add -12345 0.49999 -> -12345 Inexact Rounded |
|
452 rsux324 add -12345 0.5 -> -12345 Inexact Rounded |
|
453 rsux325 add -12345 0.50001 -> -12345 Inexact Rounded |
|
454 rsux326 add -12345 0.5001 -> -12345 Inexact Rounded |
|
455 rsux327 add -12345 0.501 -> -12345 Inexact Rounded |
|
456 rsux328 add -12345 0.51 -> -12345 Inexact Rounded |
|
457 rsux329 add -12345 0.6 -> -12345 Inexact Rounded |
|
458 |
|
459 rounding: ceiling |
|
460 |
|
461 rsux330 add -12345 -0.1 -> -12345 Inexact Rounded |
|
462 rsux331 add -12345 -0.01 -> -12345 Inexact Rounded |
|
463 rsux332 add -12345 -0.001 -> -12345 Inexact Rounded |
|
464 rsux333 add -12345 -0.00001 -> -12345 Inexact Rounded |
|
465 rsux334 add -12345 -0.000001 -> -12345 Inexact Rounded |
|
466 rsux335 add -12345 -0.0000001 -> -12345 Inexact Rounded |
|
467 rsux336 add -12345 0 -> -12345 |
|
468 rsux337 add -12345 0.0000001 -> -12344 Inexact Rounded |
|
469 rsux338 add -12345 0.000001 -> -12344 Inexact Rounded |
|
470 rsux339 add -12345 0.00001 -> -12344 Inexact Rounded |
|
471 rsux340 add -12345 0.0001 -> -12344 Inexact Rounded |
|
472 rsux341 add -12345 0.001 -> -12344 Inexact Rounded |
|
473 rsux342 add -12345 0.01 -> -12344 Inexact Rounded |
|
474 rsux343 add -12345 0.1 -> -12344 Inexact Rounded |
|
475 |
|
476 rsux345 add -12346 0.49999 -> -12345 Inexact Rounded |
|
477 rsux346 add -12346 0.5 -> -12345 Inexact Rounded |
|
478 rsux347 add -12346 0.50001 -> -12345 Inexact Rounded |
|
479 |
|
480 rsux350 add -12345 0.4 -> -12344 Inexact Rounded |
|
481 rsux351 add -12345 0.49 -> -12344 Inexact Rounded |
|
482 rsux352 add -12345 0.499 -> -12344 Inexact Rounded |
|
483 rsux353 add -12345 0.49999 -> -12344 Inexact Rounded |
|
484 rsux354 add -12345 0.5 -> -12344 Inexact Rounded |
|
485 rsux355 add -12345 0.50001 -> -12344 Inexact Rounded |
|
486 rsux356 add -12345 0.5001 -> -12344 Inexact Rounded |
|
487 rsux357 add -12345 0.501 -> -12344 Inexact Rounded |
|
488 rsux358 add -12345 0.51 -> -12344 Inexact Rounded |
|
489 rsux359 add -12345 0.6 -> -12344 Inexact Rounded |
|
490 |
|
491 -- Check cancellation subtractions |
|
492 -- (The IEEE 854 'curious rule' in $6.3) |
|
493 |
|
494 rounding: down |
|
495 rzex001 add 0 0 -> 0 |
|
496 rzex002 add 0 -0 -> 0 |
|
497 rzex003 add -0 0 -> 0 |
|
498 rzex004 add -0 -0 -> -0 |
|
499 rzex005 add 1 -1 -> 0 |
|
500 rzex006 add -1 1 -> 0 |
|
501 rzex007 add 1.5 -1.5 -> 0.0 |
|
502 rzex008 add -1.5 1.5 -> 0.0 |
|
503 rzex009 add 2 -2 -> 0 |
|
504 rzex010 add -2 2 -> 0 |
|
505 |
|
506 rounding: up |
|
507 rzex011 add 0 0 -> 0 |
|
508 rzex012 add 0 -0 -> 0 |
|
509 rzex013 add -0 0 -> 0 |
|
510 rzex014 add -0 -0 -> -0 |
|
511 rzex015 add 1 -1 -> 0 |
|
512 rzex016 add -1 1 -> 0 |
|
513 rzex017 add 1.5 -1.5 -> 0.0 |
|
514 rzex018 add -1.5 1.5 -> 0.0 |
|
515 rzex019 add 2 -2 -> 0 |
|
516 rzex020 add -2 2 -> 0 |
|
517 |
|
518 rounding: half_up |
|
519 rzex021 add 0 0 -> 0 |
|
520 rzex022 add 0 -0 -> 0 |
|
521 rzex023 add -0 0 -> 0 |
|
522 rzex024 add -0 -0 -> -0 |
|
523 rzex025 add 1 -1 -> 0 |
|
524 rzex026 add -1 1 -> 0 |
|
525 rzex027 add 1.5 -1.5 -> 0.0 |
|
526 rzex028 add -1.5 1.5 -> 0.0 |
|
527 rzex029 add 2 -2 -> 0 |
|
528 rzex030 add -2 2 -> 0 |
|
529 |
|
530 rounding: half_down |
|
531 rzex031 add 0 0 -> 0 |
|
532 rzex032 add 0 -0 -> 0 |
|
533 rzex033 add -0 0 -> 0 |
|
534 rzex034 add -0 -0 -> -0 |
|
535 rzex035 add 1 -1 -> 0 |
|
536 rzex036 add -1 1 -> 0 |
|
537 rzex037 add 1.5 -1.5 -> 0.0 |
|
538 rzex038 add -1.5 1.5 -> 0.0 |
|
539 rzex039 add 2 -2 -> 0 |
|
540 rzex040 add -2 2 -> 0 |
|
541 |
|
542 rounding: half_even |
|
543 rzex041 add 0 0 -> 0 |
|
544 rzex042 add 0 -0 -> 0 |
|
545 rzex043 add -0 0 -> 0 |
|
546 rzex044 add -0 -0 -> -0 |
|
547 rzex045 add 1 -1 -> 0 |
|
548 rzex046 add -1 1 -> 0 |
|
549 rzex047 add 1.5 -1.5 -> 0.0 |
|
550 rzex048 add -1.5 1.5 -> 0.0 |
|
551 rzex049 add 2 -2 -> 0 |
|
552 rzex050 add -2 2 -> 0 |
|
553 |
|
554 rounding: floor |
|
555 rzex051 add 0 0 -> 0 |
|
556 rzex052 add 0 -0 -> -0 -- here are two 'curious' |
|
557 rzex053 add -0 0 -> -0 -- |
|
558 rzex054 add -0 -0 -> -0 |
|
559 rzex055 add 1 -1 -> -0 -- here are the rest |
|
560 rzex056 add -1 1 -> -0 -- .. |
|
561 rzex057 add 1.5 -1.5 -> -0.0 -- .. |
|
562 rzex058 add -1.5 1.5 -> -0.0 -- .. |
|
563 rzex059 add 2 -2 -> -0 -- .. |
|
564 rzex060 add -2 2 -> -0 -- .. |
|
565 |
|
566 rounding: ceiling |
|
567 rzex061 add 0 0 -> 0 |
|
568 rzex062 add 0 -0 -> 0 |
|
569 rzex063 add -0 0 -> 0 |
|
570 rzex064 add -0 -0 -> -0 |
|
571 rzex065 add 1 -1 -> 0 |
|
572 rzex066 add -1 1 -> 0 |
|
573 rzex067 add 1.5 -1.5 -> 0.0 |
|
574 rzex068 add -1.5 1.5 -> 0.0 |
|
575 rzex069 add 2 -2 -> 0 |
|
576 rzex070 add -2 2 -> 0 |
|
577 |
|
578 |
|
579 -- Division operators ------------------------------------------------- |
|
580 |
|
581 rounding: down |
|
582 rdvx101 divide 12345 1 -> 12345 |
|
583 rdvx102 divide 12345 1.0001 -> 12343 Inexact Rounded |
|
584 rdvx103 divide 12345 1.001 -> 12332 Inexact Rounded |
|
585 rdvx104 divide 12345 1.01 -> 12222 Inexact Rounded |
|
586 rdvx105 divide 12345 1.1 -> 11222 Inexact Rounded |
|
587 rdvx106 divide 12355 4 -> 3088.7 Inexact Rounded |
|
588 rdvx107 divide 12345 4 -> 3086.2 Inexact Rounded |
|
589 rdvx108 divide 12355 4.0001 -> 3088.6 Inexact Rounded |
|
590 rdvx109 divide 12345 4.0001 -> 3086.1 Inexact Rounded |
|
591 rdvx110 divide 12345 4.9 -> 2519.3 Inexact Rounded |
|
592 rdvx111 divide 12345 4.99 -> 2473.9 Inexact Rounded |
|
593 rdvx112 divide 12345 4.999 -> 2469.4 Inexact Rounded |
|
594 rdvx113 divide 12345 4.9999 -> 2469.0 Inexact Rounded |
|
595 rdvx114 divide 12345 5 -> 2469 |
|
596 rdvx115 divide 12345 5.0001 -> 2468.9 Inexact Rounded |
|
597 rdvx116 divide 12345 5.001 -> 2468.5 Inexact Rounded |
|
598 rdvx117 divide 12345 5.01 -> 2464.0 Inexact Rounded |
|
599 rdvx118 divide 12345 5.1 -> 2420.5 Inexact Rounded |
|
600 |
|
601 rounding: half_down |
|
602 rdvx201 divide 12345 1 -> 12345 |
|
603 rdvx202 divide 12345 1.0001 -> 12344 Inexact Rounded |
|
604 rdvx203 divide 12345 1.001 -> 12333 Inexact Rounded |
|
605 rdvx204 divide 12345 1.01 -> 12223 Inexact Rounded |
|
606 rdvx205 divide 12345 1.1 -> 11223 Inexact Rounded |
|
607 rdvx206 divide 12355 4 -> 3088.7 Inexact Rounded |
|
608 rdvx207 divide 12345 4 -> 3086.2 Inexact Rounded |
|
609 rdvx208 divide 12355 4.0001 -> 3088.7 Inexact Rounded |
|
610 rdvx209 divide 12345 4.0001 -> 3086.2 Inexact Rounded |
|
611 rdvx210 divide 12345 4.9 -> 2519.4 Inexact Rounded |
|
612 rdvx211 divide 12345 4.99 -> 2473.9 Inexact Rounded |
|
613 rdvx212 divide 12345 4.999 -> 2469.5 Inexact Rounded |
|
614 rdvx213 divide 12345 4.9999 -> 2469.0 Inexact Rounded |
|
615 rdvx214 divide 12345 5 -> 2469 |
|
616 rdvx215 divide 12345 5.0001 -> 2469.0 Inexact Rounded |
|
617 rdvx216 divide 12345 5.001 -> 2468.5 Inexact Rounded |
|
618 rdvx217 divide 12345 5.01 -> 2464.1 Inexact Rounded |
|
619 rdvx218 divide 12345 5.1 -> 2420.6 Inexact Rounded |
|
620 |
|
621 rounding: half_even |
|
622 rdvx301 divide 12345 1 -> 12345 |
|
623 rdvx302 divide 12345 1.0001 -> 12344 Inexact Rounded |
|
624 rdvx303 divide 12345 1.001 -> 12333 Inexact Rounded |
|
625 rdvx304 divide 12345 1.01 -> 12223 Inexact Rounded |
|
626 rdvx305 divide 12345 1.1 -> 11223 Inexact Rounded |
|
627 rdvx306 divide 12355 4 -> 3088.8 Inexact Rounded |
|
628 rdvx307 divide 12345 4 -> 3086.2 Inexact Rounded |
|
629 rdvx308 divide 12355 4.0001 -> 3088.7 Inexact Rounded |
|
630 rdvx309 divide 12345 4.0001 -> 3086.2 Inexact Rounded |
|
631 rdvx310 divide 12345 4.9 -> 2519.4 Inexact Rounded |
|
632 rdvx311 divide 12345 4.99 -> 2473.9 Inexact Rounded |
|
633 rdvx312 divide 12345 4.999 -> 2469.5 Inexact Rounded |
|
634 rdvx313 divide 12345 4.9999 -> 2469.0 Inexact Rounded |
|
635 rdvx314 divide 12345 5 -> 2469 |
|
636 rdvx315 divide 12345 5.0001 -> 2469.0 Inexact Rounded |
|
637 rdvx316 divide 12345 5.001 -> 2468.5 Inexact Rounded |
|
638 rdvx317 divide 12345 5.01 -> 2464.1 Inexact Rounded |
|
639 rdvx318 divide 12345 5.1 -> 2420.6 Inexact Rounded |
|
640 |
|
641 rounding: half_up |
|
642 rdvx401 divide 12345 1 -> 12345 |
|
643 rdvx402 divide 12345 1.0001 -> 12344 Inexact Rounded |
|
644 rdvx403 divide 12345 1.001 -> 12333 Inexact Rounded |
|
645 rdvx404 divide 12345 1.01 -> 12223 Inexact Rounded |
|
646 rdvx405 divide 12345 1.1 -> 11223 Inexact Rounded |
|
647 rdvx406 divide 12355 4 -> 3088.8 Inexact Rounded |
|
648 rdvx407 divide 12345 4 -> 3086.3 Inexact Rounded |
|
649 rdvx408 divide 12355 4.0001 -> 3088.7 Inexact Rounded |
|
650 rdvx409 divide 12345 4.0001 -> 3086.2 Inexact Rounded |
|
651 rdvx410 divide 12345 4.9 -> 2519.4 Inexact Rounded |
|
652 rdvx411 divide 12345 4.99 -> 2473.9 Inexact Rounded |
|
653 rdvx412 divide 12345 4.999 -> 2469.5 Inexact Rounded |
|
654 rdvx413 divide 12345 4.9999 -> 2469.0 Inexact Rounded |
|
655 rdvx414 divide 12345 5 -> 2469 |
|
656 rdvx415 divide 12345 5.0001 -> 2469.0 Inexact Rounded |
|
657 rdvx416 divide 12345 5.001 -> 2468.5 Inexact Rounded |
|
658 rdvx417 divide 12345 5.01 -> 2464.1 Inexact Rounded |
|
659 rdvx418 divide 12345 5.1 -> 2420.6 Inexact Rounded |
|
660 |
|
661 rounding: up |
|
662 rdvx501 divide 12345 1 -> 12345 |
|
663 rdvx502 divide 12345 1.0001 -> 12344 Inexact Rounded |
|
664 rdvx503 divide 12345 1.001 -> 12333 Inexact Rounded |
|
665 rdvx504 divide 12345 1.01 -> 12223 Inexact Rounded |
|
666 rdvx505 divide 12345 1.1 -> 11223 Inexact Rounded |
|
667 rdvx506 divide 12355 4 -> 3088.8 Inexact Rounded |
|
668 rdvx507 divide 12345 4 -> 3086.3 Inexact Rounded |
|
669 rdvx508 divide 12355 4.0001 -> 3088.7 Inexact Rounded |
|
670 rdvx509 divide 12345 4.0001 -> 3086.2 Inexact Rounded |
|
671 rdvx510 divide 12345 4.9 -> 2519.4 Inexact Rounded |
|
672 rdvx511 divide 12345 4.99 -> 2474.0 Inexact Rounded |
|
673 rdvx512 divide 12345 4.999 -> 2469.5 Inexact Rounded |
|
674 rdvx513 divide 12345 4.9999 -> 2469.1 Inexact Rounded |
|
675 rdvx514 divide 12345 5 -> 2469 |
|
676 rdvx515 divide 12345 5.0001 -> 2469.0 Inexact Rounded |
|
677 rdvx516 divide 12345 5.001 -> 2468.6 Inexact Rounded |
|
678 rdvx517 divide 12345 5.01 -> 2464.1 Inexact Rounded |
|
679 rdvx518 divide 12345 5.1 -> 2420.6 Inexact Rounded |
|
680 |
|
681 rounding: floor |
|
682 rdvx601 divide 12345 1 -> 12345 |
|
683 rdvx602 divide 12345 1.0001 -> 12343 Inexact Rounded |
|
684 rdvx603 divide 12345 1.001 -> 12332 Inexact Rounded |
|
685 rdvx604 divide 12345 1.01 -> 12222 Inexact Rounded |
|
686 rdvx605 divide 12345 1.1 -> 11222 Inexact Rounded |
|
687 rdvx606 divide 12355 4 -> 3088.7 Inexact Rounded |
|
688 rdvx607 divide 12345 4 -> 3086.2 Inexact Rounded |
|
689 rdvx608 divide 12355 4.0001 -> 3088.6 Inexact Rounded |
|
690 rdvx609 divide 12345 4.0001 -> 3086.1 Inexact Rounded |
|
691 rdvx610 divide 12345 4.9 -> 2519.3 Inexact Rounded |
|
692 rdvx611 divide 12345 4.99 -> 2473.9 Inexact Rounded |
|
693 rdvx612 divide 12345 4.999 -> 2469.4 Inexact Rounded |
|
694 rdvx613 divide 12345 4.9999 -> 2469.0 Inexact Rounded |
|
695 rdvx614 divide 12345 5 -> 2469 |
|
696 rdvx615 divide 12345 5.0001 -> 2468.9 Inexact Rounded |
|
697 rdvx616 divide 12345 5.001 -> 2468.5 Inexact Rounded |
|
698 rdvx617 divide 12345 5.01 -> 2464.0 Inexact Rounded |
|
699 rdvx618 divide 12345 5.1 -> 2420.5 Inexact Rounded |
|
700 |
|
701 rounding: ceiling |
|
702 rdvx701 divide 12345 1 -> 12345 |
|
703 rdvx702 divide 12345 1.0001 -> 12344 Inexact Rounded |
|
704 rdvx703 divide 12345 1.001 -> 12333 Inexact Rounded |
|
705 rdvx704 divide 12345 1.01 -> 12223 Inexact Rounded |
|
706 rdvx705 divide 12345 1.1 -> 11223 Inexact Rounded |
|
707 rdvx706 divide 12355 4 -> 3088.8 Inexact Rounded |
|
708 rdvx707 divide 12345 4 -> 3086.3 Inexact Rounded |
|
709 rdvx708 divide 12355 4.0001 -> 3088.7 Inexact Rounded |
|
710 rdvx709 divide 12345 4.0001 -> 3086.2 Inexact Rounded |
|
711 rdvx710 divide 12345 4.9 -> 2519.4 Inexact Rounded |
|
712 rdvx711 divide 12345 4.99 -> 2474.0 Inexact Rounded |
|
713 rdvx712 divide 12345 4.999 -> 2469.5 Inexact Rounded |
|
714 rdvx713 divide 12345 4.9999 -> 2469.1 Inexact Rounded |
|
715 rdvx714 divide 12345 5 -> 2469 |
|
716 rdvx715 divide 12345 5.0001 -> 2469.0 Inexact Rounded |
|
717 rdvx716 divide 12345 5.001 -> 2468.6 Inexact Rounded |
|
718 rdvx717 divide 12345 5.01 -> 2464.1 Inexact Rounded |
|
719 rdvx718 divide 12345 5.1 -> 2420.6 Inexact Rounded |
|
720 |
|
721 -- [divideInteger and remainder unaffected] |
|
722 |
|
723 -- Multiplication operator -------------------------------------------- |
|
724 |
|
725 rounding: down |
|
726 rmux101 multiply 12345 1 -> 12345 |
|
727 rmux102 multiply 12345 1.0001 -> 12346 Inexact Rounded |
|
728 rmux103 multiply 12345 1.001 -> 12357 Inexact Rounded |
|
729 rmux104 multiply 12345 1.01 -> 12468 Inexact Rounded |
|
730 rmux105 multiply 12345 1.1 -> 13579 Inexact Rounded |
|
731 rmux106 multiply 12345 4 -> 49380 |
|
732 rmux107 multiply 12345 4.0001 -> 49381 Inexact Rounded |
|
733 rmux108 multiply 12345 4.9 -> 60490 Inexact Rounded |
|
734 rmux109 multiply 12345 4.99 -> 61601 Inexact Rounded |
|
735 rmux110 multiply 12345 4.999 -> 61712 Inexact Rounded |
|
736 rmux111 multiply 12345 4.9999 -> 61723 Inexact Rounded |
|
737 rmux112 multiply 12345 5 -> 61725 |
|
738 rmux113 multiply 12345 5.0001 -> 61726 Inexact Rounded |
|
739 rmux114 multiply 12345 5.001 -> 61737 Inexact Rounded |
|
740 rmux115 multiply 12345 5.01 -> 61848 Inexact Rounded |
|
741 rmux116 multiply 12345 12 -> 1.4814E+5 Rounded |
|
742 rmux117 multiply 12345 13 -> 1.6048E+5 Inexact Rounded |
|
743 rmux118 multiply 12355 12 -> 1.4826E+5 Rounded |
|
744 rmux119 multiply 12355 13 -> 1.6061E+5 Inexact Rounded |
|
745 |
|
746 rounding: half_down |
|
747 rmux201 multiply 12345 1 -> 12345 |
|
748 rmux202 multiply 12345 1.0001 -> 12346 Inexact Rounded |
|
749 rmux203 multiply 12345 1.001 -> 12357 Inexact Rounded |
|
750 rmux204 multiply 12345 1.01 -> 12468 Inexact Rounded |
|
751 rmux205 multiply 12345 1.1 -> 13579 Inexact Rounded |
|
752 rmux206 multiply 12345 4 -> 49380 |
|
753 rmux207 multiply 12345 4.0001 -> 49381 Inexact Rounded |
|
754 rmux208 multiply 12345 4.9 -> 60490 Inexact Rounded |
|
755 rmux209 multiply 12345 4.99 -> 61602 Inexact Rounded |
|
756 rmux210 multiply 12345 4.999 -> 61713 Inexact Rounded |
|
757 rmux211 multiply 12345 4.9999 -> 61724 Inexact Rounded |
|
758 rmux212 multiply 12345 5 -> 61725 |
|
759 rmux213 multiply 12345 5.0001 -> 61726 Inexact Rounded |
|
760 rmux214 multiply 12345 5.001 -> 61737 Inexact Rounded |
|
761 rmux215 multiply 12345 5.01 -> 61848 Inexact Rounded |
|
762 rmux216 multiply 12345 12 -> 1.4814E+5 Rounded |
|
763 rmux217 multiply 12345 13 -> 1.6048E+5 Inexact Rounded |
|
764 rmux218 multiply 12355 12 -> 1.4826E+5 Rounded |
|
765 rmux219 multiply 12355 13 -> 1.6061E+5 Inexact Rounded |
|
766 |
|
767 rounding: half_even |
|
768 rmux301 multiply 12345 1 -> 12345 |
|
769 rmux302 multiply 12345 1.0001 -> 12346 Inexact Rounded |
|
770 rmux303 multiply 12345 1.001 -> 12357 Inexact Rounded |
|
771 rmux304 multiply 12345 1.01 -> 12468 Inexact Rounded |
|
772 rmux305 multiply 12345 1.1 -> 13580 Inexact Rounded |
|
773 rmux306 multiply 12345 4 -> 49380 |
|
774 rmux307 multiply 12345 4.0001 -> 49381 Inexact Rounded |
|
775 rmux308 multiply 12345 4.9 -> 60490 Inexact Rounded |
|
776 rmux309 multiply 12345 4.99 -> 61602 Inexact Rounded |
|
777 rmux310 multiply 12345 4.999 -> 61713 Inexact Rounded |
|
778 rmux311 multiply 12345 4.9999 -> 61724 Inexact Rounded |
|
779 rmux312 multiply 12345 5 -> 61725 |
|
780 rmux313 multiply 12345 5.0001 -> 61726 Inexact Rounded |
|
781 rmux314 multiply 12345 5.001 -> 61737 Inexact Rounded |
|
782 rmux315 multiply 12345 5.01 -> 61848 Inexact Rounded |
|
783 rmux316 multiply 12345 12 -> 1.4814E+5 Rounded |
|
784 rmux317 multiply 12345 13 -> 1.6048E+5 Inexact Rounded |
|
785 rmux318 multiply 12355 12 -> 1.4826E+5 Rounded |
|
786 rmux319 multiply 12355 13 -> 1.6062E+5 Inexact Rounded |
|
787 |
|
788 rounding: half_up |
|
789 rmux401 multiply 12345 1 -> 12345 |
|
790 rmux402 multiply 12345 1.0001 -> 12346 Inexact Rounded |
|
791 rmux403 multiply 12345 1.001 -> 12357 Inexact Rounded |
|
792 rmux404 multiply 12345 1.01 -> 12468 Inexact Rounded |
|
793 rmux405 multiply 12345 1.1 -> 13580 Inexact Rounded |
|
794 rmux406 multiply 12345 4 -> 49380 |
|
795 rmux407 multiply 12345 4.0001 -> 49381 Inexact Rounded |
|
796 rmux408 multiply 12345 4.9 -> 60491 Inexact Rounded |
|
797 rmux409 multiply 12345 4.99 -> 61602 Inexact Rounded |
|
798 rmux410 multiply 12345 4.999 -> 61713 Inexact Rounded |
|
799 rmux411 multiply 12345 4.9999 -> 61724 Inexact Rounded |
|
800 rmux412 multiply 12345 5 -> 61725 |
|
801 rmux413 multiply 12345 5.0001 -> 61726 Inexact Rounded |
|
802 rmux414 multiply 12345 5.001 -> 61737 Inexact Rounded |
|
803 rmux415 multiply 12345 5.01 -> 61848 Inexact Rounded |
|
804 rmux416 multiply 12345 12 -> 1.4814E+5 Rounded |
|
805 rmux417 multiply 12345 13 -> 1.6049E+5 Inexact Rounded |
|
806 rmux418 multiply 12355 12 -> 1.4826E+5 Rounded |
|
807 rmux419 multiply 12355 13 -> 1.6062E+5 Inexact Rounded |
|
808 |
|
809 rounding: up |
|
810 rmux501 multiply 12345 1 -> 12345 |
|
811 rmux502 multiply 12345 1.0001 -> 12347 Inexact Rounded |
|
812 rmux503 multiply 12345 1.001 -> 12358 Inexact Rounded |
|
813 rmux504 multiply 12345 1.01 -> 12469 Inexact Rounded |
|
814 rmux505 multiply 12345 1.1 -> 13580 Inexact Rounded |
|
815 rmux506 multiply 12345 4 -> 49380 |
|
816 rmux507 multiply 12345 4.0001 -> 49382 Inexact Rounded |
|
817 rmux508 multiply 12345 4.9 -> 60491 Inexact Rounded |
|
818 rmux509 multiply 12345 4.99 -> 61602 Inexact Rounded |
|
819 rmux510 multiply 12345 4.999 -> 61713 Inexact Rounded |
|
820 rmux511 multiply 12345 4.9999 -> 61724 Inexact Rounded |
|
821 rmux512 multiply 12345 5 -> 61725 |
|
822 rmux513 multiply 12345 5.0001 -> 61727 Inexact Rounded |
|
823 rmux514 multiply 12345 5.001 -> 61738 Inexact Rounded |
|
824 rmux515 multiply 12345 5.01 -> 61849 Inexact Rounded |
|
825 rmux516 multiply 12345 12 -> 1.4814E+5 Rounded |
|
826 rmux517 multiply 12345 13 -> 1.6049E+5 Inexact Rounded |
|
827 rmux518 multiply 12355 12 -> 1.4826E+5 Rounded |
|
828 rmux519 multiply 12355 13 -> 1.6062E+5 Inexact Rounded |
|
829 -- [rmux516 & rmux518] can surprise |
|
830 |
|
831 rounding: floor |
|
832 rmux601 multiply 12345 1 -> 12345 |
|
833 rmux602 multiply 12345 1.0001 -> 12346 Inexact Rounded |
|
834 rmux603 multiply 12345 1.001 -> 12357 Inexact Rounded |
|
835 rmux604 multiply 12345 1.01 -> 12468 Inexact Rounded |
|
836 rmux605 multiply 12345 1.1 -> 13579 Inexact Rounded |
|
837 rmux606 multiply 12345 4 -> 49380 |
|
838 rmux607 multiply 12345 4.0001 -> 49381 Inexact Rounded |
|
839 rmux608 multiply 12345 4.9 -> 60490 Inexact Rounded |
|
840 rmux609 multiply 12345 4.99 -> 61601 Inexact Rounded |
|
841 rmux610 multiply 12345 4.999 -> 61712 Inexact Rounded |
|
842 rmux611 multiply 12345 4.9999 -> 61723 Inexact Rounded |
|
843 rmux612 multiply 12345 5 -> 61725 |
|
844 rmux613 multiply 12345 5.0001 -> 61726 Inexact Rounded |
|
845 rmux614 multiply 12345 5.001 -> 61737 Inexact Rounded |
|
846 rmux615 multiply 12345 5.01 -> 61848 Inexact Rounded |
|
847 rmux616 multiply 12345 12 -> 1.4814E+5 Rounded |
|
848 rmux617 multiply 12345 13 -> 1.6048E+5 Inexact Rounded |
|
849 rmux618 multiply 12355 12 -> 1.4826E+5 Rounded |
|
850 rmux619 multiply 12355 13 -> 1.6061E+5 Inexact Rounded |
|
851 |
|
852 rounding: ceiling |
|
853 rmux701 multiply 12345 1 -> 12345 |
|
854 rmux702 multiply 12345 1.0001 -> 12347 Inexact Rounded |
|
855 rmux703 multiply 12345 1.001 -> 12358 Inexact Rounded |
|
856 rmux704 multiply 12345 1.01 -> 12469 Inexact Rounded |
|
857 rmux705 multiply 12345 1.1 -> 13580 Inexact Rounded |
|
858 rmux706 multiply 12345 4 -> 49380 |
|
859 rmux707 multiply 12345 4.0001 -> 49382 Inexact Rounded |
|
860 rmux708 multiply 12345 4.9 -> 60491 Inexact Rounded |
|
861 rmux709 multiply 12345 4.99 -> 61602 Inexact Rounded |
|
862 rmux710 multiply 12345 4.999 -> 61713 Inexact Rounded |
|
863 rmux711 multiply 12345 4.9999 -> 61724 Inexact Rounded |
|
864 rmux712 multiply 12345 5 -> 61725 |
|
865 rmux713 multiply 12345 5.0001 -> 61727 Inexact Rounded |
|
866 rmux714 multiply 12345 5.001 -> 61738 Inexact Rounded |
|
867 rmux715 multiply 12345 5.01 -> 61849 Inexact Rounded |
|
868 rmux716 multiply 12345 12 -> 1.4814E+5 Rounded |
|
869 rmux717 multiply 12345 13 -> 1.6049E+5 Inexact Rounded |
|
870 rmux718 multiply 12355 12 -> 1.4826E+5 Rounded |
|
871 rmux719 multiply 12355 13 -> 1.6062E+5 Inexact Rounded |
|
872 |
|
873 -- Power operator ----------------------------------------------------- |
|
874 |
|
875 rounding: down |
|
876 rpox101 power 12345 -5 -> 3.4877E-21 Inexact Rounded |
|
877 rpox102 power 12345 -4 -> 4.3056E-17 Inexact Rounded |
|
878 rpox103 power 12345 -3 -> 5.3152E-13 Inexact Rounded |
|
879 rpox104 power 12345 -2 -> 6.5617E-9 Inexact Rounded |
|
880 rpox105 power 12345 -1 -> 0.000081004 Inexact Rounded |
|
881 rpox106 power 12345 0 -> 1 |
|
882 rpox107 power 12345 1 -> 12345 |
|
883 rpox108 power 12345 2 -> 1.5239E+8 Inexact Rounded |
|
884 rpox109 power 12345 3 -> 1.8813E+12 Inexact Rounded |
|
885 rpox110 power 12345 4 -> 2.3225E+16 Inexact Rounded |
|
886 rpox111 power 12345 5 -> 2.8671E+20 Inexact Rounded |
|
887 rpox112 power 415 2 -> 1.7222E+5 Inexact Rounded |
|
888 rpox113 power 75 3 -> 4.2187E+5 Inexact Rounded |
|
889 |
|
890 rounding: half_down |
|
891 rpox201 power 12345 -5 -> 3.4877E-21 Inexact Rounded |
|
892 rpox202 power 12345 -4 -> 4.3056E-17 Inexact Rounded |
|
893 rpox203 power 12345 -3 -> 5.3153E-13 Inexact Rounded |
|
894 rpox204 power 12345 -2 -> 6.5617E-9 Inexact Rounded |
|
895 rpox205 power 12345 -1 -> 0.000081004 Inexact Rounded |
|
896 rpox206 power 12345 0 -> 1 |
|
897 rpox207 power 12345 1 -> 12345 |
|
898 rpox208 power 12345 2 -> 1.5240E+8 Inexact Rounded |
|
899 rpox209 power 12345 3 -> 1.8814E+12 Inexact Rounded |
|
900 rpox210 power 12345 4 -> 2.3225E+16 Inexact Rounded |
|
901 rpox211 power 12345 5 -> 2.8672E+20 Inexact Rounded |
|
902 rpox212 power 415 2 -> 1.7222E+5 Inexact Rounded |
|
903 rpox213 power 75 3 -> 4.2187E+5 Inexact Rounded |
|
904 |
|
905 rounding: half_even |
|
906 rpox301 power 12345 -5 -> 3.4877E-21 Inexact Rounded |
|
907 rpox302 power 12345 -4 -> 4.3056E-17 Inexact Rounded |
|
908 rpox303 power 12345 -3 -> 5.3153E-13 Inexact Rounded |
|
909 rpox304 power 12345 -2 -> 6.5617E-9 Inexact Rounded |
|
910 rpox305 power 12345 -1 -> 0.000081004 Inexact Rounded |
|
911 rpox306 power 12345 0 -> 1 |
|
912 rpox307 power 12345 1 -> 12345 |
|
913 rpox308 power 12345 2 -> 1.5240E+8 Inexact Rounded |
|
914 rpox309 power 12345 3 -> 1.8814E+12 Inexact Rounded |
|
915 rpox310 power 12345 4 -> 2.3225E+16 Inexact Rounded |
|
916 rpox311 power 12345 5 -> 2.8672E+20 Inexact Rounded |
|
917 rpox312 power 415 2 -> 1.7222E+5 Inexact Rounded |
|
918 rpox313 power 75 3 -> 4.2188E+5 Inexact Rounded |
|
919 |
|
920 rounding: half_up |
|
921 rpox401 power 12345 -5 -> 3.4877E-21 Inexact Rounded |
|
922 rpox402 power 12345 -4 -> 4.3056E-17 Inexact Rounded |
|
923 rpox403 power 12345 -3 -> 5.3153E-13 Inexact Rounded |
|
924 rpox404 power 12345 -2 -> 6.5617E-9 Inexact Rounded |
|
925 rpox405 power 12345 -1 -> 0.000081004 Inexact Rounded |
|
926 rpox406 power 12345 0 -> 1 |
|
927 rpox407 power 12345 1 -> 12345 |
|
928 rpox408 power 12345 2 -> 1.5240E+8 Inexact Rounded |
|
929 rpox409 power 12345 3 -> 1.8814E+12 Inexact Rounded |
|
930 rpox410 power 12345 4 -> 2.3225E+16 Inexact Rounded |
|
931 rpox411 power 12345 5 -> 2.8672E+20 Inexact Rounded |
|
932 rpox412 power 415 2 -> 1.7223E+5 Inexact Rounded |
|
933 rpox413 power 75 3 -> 4.2188E+5 Inexact Rounded |
|
934 |
|
935 rounding: up |
|
936 rpox501 power 12345 -5 -> 3.4878E-21 Inexact Rounded |
|
937 rpox502 power 12345 -4 -> 4.3057E-17 Inexact Rounded |
|
938 rpox503 power 12345 -3 -> 5.3153E-13 Inexact Rounded |
|
939 rpox504 power 12345 -2 -> 6.5618E-9 Inexact Rounded |
|
940 rpox505 power 12345 -1 -> 0.000081005 Inexact Rounded |
|
941 rpox506 power 12345 0 -> 1 |
|
942 rpox507 power 12345 1 -> 12345 |
|
943 rpox508 power 12345 2 -> 1.5240E+8 Inexact Rounded |
|
944 rpox509 power 12345 3 -> 1.8814E+12 Inexact Rounded |
|
945 rpox510 power 12345 4 -> 2.3226E+16 Inexact Rounded |
|
946 rpox511 power 12345 5 -> 2.8672E+20 Inexact Rounded |
|
947 rpox512 power 415 2 -> 1.7223E+5 Inexact Rounded |
|
948 rpox513 power 75 3 -> 4.2188E+5 Inexact Rounded |
|
949 |
|
950 rounding: floor |
|
951 rpox601 power 12345 -5 -> 3.4877E-21 Inexact Rounded |
|
952 rpox602 power 12345 -4 -> 4.3056E-17 Inexact Rounded |
|
953 rpox603 power 12345 -3 -> 5.3152E-13 Inexact Rounded |
|
954 rpox604 power 12345 -2 -> 6.5617E-9 Inexact Rounded |
|
955 rpox605 power 12345 -1 -> 0.000081004 Inexact Rounded |
|
956 rpox606 power 12345 0 -> 1 |
|
957 rpox607 power 12345 1 -> 12345 |
|
958 rpox608 power 12345 2 -> 1.5239E+8 Inexact Rounded |
|
959 rpox609 power 12345 3 -> 1.8813E+12 Inexact Rounded |
|
960 rpox610 power 12345 4 -> 2.3225E+16 Inexact Rounded |
|
961 rpox611 power 12345 5 -> 2.8671E+20 Inexact Rounded |
|
962 rpox612 power 415 2 -> 1.7222E+5 Inexact Rounded |
|
963 rpox613 power 75 3 -> 4.2187E+5 Inexact Rounded |
|
964 |
|
965 rounding: ceiling |
|
966 rpox701 power 12345 -5 -> 3.4878E-21 Inexact Rounded |
|
967 rpox702 power 12345 -4 -> 4.3057E-17 Inexact Rounded |
|
968 rpox703 power 12345 -3 -> 5.3153E-13 Inexact Rounded |
|
969 rpox704 power 12345 -2 -> 6.5618E-9 Inexact Rounded |
|
970 rpox705 power 12345 -1 -> 0.000081005 Inexact Rounded |
|
971 rpox706 power 12345 0 -> 1 |
|
972 rpox707 power 12345 1 -> 12345 |
|
973 rpox708 power 12345 2 -> 1.5240E+8 Inexact Rounded |
|
974 rpox709 power 12345 3 -> 1.8814E+12 Inexact Rounded |
|
975 rpox710 power 12345 4 -> 2.3226E+16 Inexact Rounded |
|
976 rpox711 power 12345 5 -> 2.8672E+20 Inexact Rounded |
|
977 rpox712 power 415 2 -> 1.7223E+5 Inexact Rounded |
|
978 rpox713 power 75 3 -> 4.2188E+5 Inexact Rounded |
|
979 |
|
980 -- Underflow Subnormal and overflow values vary with rounding mode and sign |
|
981 maxexponent: 999999999 |
|
982 minexponent: -999999999 |
|
983 rounding: down |
|
984 rovx100 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded |
|
985 rovx101 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded |
|
986 rovx102 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
987 rovx104 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
988 |
|
989 rounding: up |
|
990 rovx110 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded |
|
991 rovx111 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded |
|
992 rovx112 divide 1E-9 9E+999999999 -> 1E-1000000003 Underflow Subnormal Inexact Rounded |
|
993 rovx114 divide -1E-9 9E+999999999 -> -1E-1000000003 Underflow Subnormal Inexact Rounded |
|
994 |
|
995 rounding: ceiling |
|
996 rovx120 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded |
|
997 rovx121 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded |
|
998 rovx122 divide 1E-9 9E+999999999 -> 1E-1000000003 Underflow Subnormal Inexact Rounded |
|
999 rovx124 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1000 |
|
1001 rounding: floor |
|
1002 rovx130 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded |
|
1003 rovx131 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded |
|
1004 rovx132 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1005 rovx134 divide -1E-9 9E+999999999 -> -1E-1000000003 Underflow Subnormal Inexact Rounded |
|
1006 |
|
1007 rounding: half_up |
|
1008 rovx140 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded |
|
1009 rovx141 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded |
|
1010 rovx142 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1011 rovx144 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1012 |
|
1013 rounding: half_even |
|
1014 rovx150 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded |
|
1015 rovx151 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded |
|
1016 rovx152 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1017 rovx154 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1018 |
|
1019 rounding: half_down |
|
1020 rovx160 multiply 10 9E+999999999 -> Infinity Overflow Inexact Rounded |
|
1021 rovx161 multiply -10 9E+999999999 -> -Infinity Overflow Inexact Rounded |
|
1022 rovx162 divide 1E-9 9E+999999999 -> 0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1023 rovx164 divide -1E-9 9E+999999999 -> -0E-1000000003 Underflow Subnormal Inexact Rounded Clamped |
|
1024 |
|
1025 -- check maximum finite value over a range of precisions |
|
1026 rounding: down |
|
1027 precision: 1 |
|
1028 rovx200 multiply 10 9E+999999999 -> 9E+999999999 Overflow Inexact Rounded |
|
1029 rovx201 multiply -10 9E+999999999 -> -9E+999999999 Overflow Inexact Rounded |
|
1030 precision: 2 |
|
1031 rovx210 multiply 10 9E+999999999 -> 9.9E+999999999 Overflow Inexact Rounded |
|
1032 rovx211 multiply -10 9E+999999999 -> -9.9E+999999999 Overflow Inexact Rounded |
|
1033 precision: 3 |
|
1034 rovx220 multiply 10 9E+999999999 -> 9.99E+999999999 Overflow Inexact Rounded |
|
1035 rovx221 multiply -10 9E+999999999 -> -9.99E+999999999 Overflow Inexact Rounded |
|
1036 precision: 4 |
|
1037 rovx230 multiply 10 9E+999999999 -> 9.999E+999999999 Overflow Inexact Rounded |
|
1038 rovx231 multiply -10 9E+999999999 -> -9.999E+999999999 Overflow Inexact Rounded |
|
1039 precision: 5 |
|
1040 rovx240 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded |
|
1041 rovx241 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded |
|
1042 precision: 6 |
|
1043 rovx250 multiply 10 9E+999999999 -> 9.99999E+999999999 Overflow Inexact Rounded |
|
1044 rovx251 multiply -10 9E+999999999 -> -9.99999E+999999999 Overflow Inexact Rounded |
|
1045 precision: 7 |
|
1046 rovx260 multiply 10 9E+999999999 -> 9.999999E+999999999 Overflow Inexact Rounded |
|
1047 rovx261 multiply -10 9E+999999999 -> -9.999999E+999999999 Overflow Inexact Rounded |
|
1048 precision: 8 |
|
1049 rovx270 multiply 10 9E+999999999 -> 9.9999999E+999999999 Overflow Inexact Rounded |
|
1050 rovx271 multiply -10 9E+999999999 -> -9.9999999E+999999999 Overflow Inexact Rounded |
|
1051 precision: 9 |
|
1052 rovx280 multiply 10 9E+999999999 -> 9.99999999E+999999999 Overflow Inexact Rounded |
|
1053 rovx281 multiply -10 9E+999999999 -> -9.99999999E+999999999 Overflow Inexact Rounded |
|
1054 precision: 10 |
|
1055 rovx290 multiply 10 9E+999999999 -> 9.999999999E+999999999 Overflow Inexact Rounded |
|
1056 rovx291 multiply -10 9E+999999999 -> -9.999999999E+999999999 Overflow Inexact Rounded |
|
1057 |
|
1058 -- reprise rounding mode effect (using multiplies so precision directive used) |
|
1059 precision: 9 |
|
1060 maxexponent: 999999999 |
|
1061 rounding: half_up |
|
1062 rmex400 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded |
|
1063 rmex401 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded |
|
1064 rounding: half_down |
|
1065 rmex402 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded |
|
1066 rmex403 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded |
|
1067 rounding: half_even |
|
1068 rmex404 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded |
|
1069 rmex405 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded |
|
1070 rounding: floor |
|
1071 rmex406 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded |
|
1072 rmex407 multiply 9.999E+999999999 10 -> 9.99999999E+999999999 Overflow Inexact Rounded |
|
1073 rounding: ceiling |
|
1074 rmex408 multiply -9.999E+999999999 10 -> -9.99999999E+999999999 Overflow Inexact Rounded |
|
1075 rmex409 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded |
|
1076 rounding: up |
|
1077 rmex410 multiply -9.999E+999999999 10 -> -Infinity Overflow Inexact Rounded |
|
1078 rmex411 multiply 9.999E+999999999 10 -> Infinity Overflow Inexact Rounded |
|
1079 rounding: down |
|
1080 rmex412 multiply -9.999E+999999999 10 -> -9.99999999E+999999999 Overflow Inexact Rounded |
|
1081 rmex413 multiply 9.999E+999999999 10 -> 9.99999999E+999999999 Overflow Inexact Rounded |
|
1082 |
|
1083 ----- Round-for-reround ----- |
|
1084 rounding: 05up |
|
1085 precision: 5 -- for easier visual inspection |
|
1086 maxExponent: 999 |
|
1087 minexponent: -999 |
|
1088 |
|
1089 -- basic rounding; really is just 0 and 5 up |
|
1090 r05up001 add 12340 0.001 -> 12341 Inexact Rounded |
|
1091 r05up002 add 12341 0.001 -> 12341 Inexact Rounded |
|
1092 r05up003 add 12342 0.001 -> 12342 Inexact Rounded |
|
1093 r05up004 add 12343 0.001 -> 12343 Inexact Rounded |
|
1094 r05up005 add 12344 0.001 -> 12344 Inexact Rounded |
|
1095 r05up006 add 12345 0.001 -> 12346 Inexact Rounded |
|
1096 r05up007 add 12346 0.001 -> 12346 Inexact Rounded |
|
1097 r05up008 add 12347 0.001 -> 12347 Inexact Rounded |
|
1098 r05up009 add 12348 0.001 -> 12348 Inexact Rounded |
|
1099 r05up010 add 12349 0.001 -> 12349 Inexact Rounded |
|
1100 |
|
1101 r05up011 add 12340 0.000 -> 12340 Rounded |
|
1102 r05up012 add 12341 0.000 -> 12341 Rounded |
|
1103 r05up013 add 12342 0.000 -> 12342 Rounded |
|
1104 r05up014 add 12343 0.000 -> 12343 Rounded |
|
1105 r05up015 add 12344 0.000 -> 12344 Rounded |
|
1106 r05up016 add 12345 0.000 -> 12345 Rounded |
|
1107 r05up017 add 12346 0.000 -> 12346 Rounded |
|
1108 r05up018 add 12347 0.000 -> 12347 Rounded |
|
1109 r05up019 add 12348 0.000 -> 12348 Rounded |
|
1110 r05up020 add 12349 0.000 -> 12349 Rounded |
|
1111 |
|
1112 r05up021 add 12340 0.901 -> 12341 Inexact Rounded |
|
1113 r05up022 add 12341 0.901 -> 12341 Inexact Rounded |
|
1114 r05up023 add 12342 0.901 -> 12342 Inexact Rounded |
|
1115 r05up024 add 12343 0.901 -> 12343 Inexact Rounded |
|
1116 r05up025 add 12344 0.901 -> 12344 Inexact Rounded |
|
1117 r05up026 add 12345 0.901 -> 12346 Inexact Rounded |
|
1118 r05up027 add 12346 0.901 -> 12346 Inexact Rounded |
|
1119 r05up028 add 12347 0.901 -> 12347 Inexact Rounded |
|
1120 r05up029 add 12348 0.901 -> 12348 Inexact Rounded |
|
1121 r05up030 add 12349 0.901 -> 12349 Inexact Rounded |
|
1122 |
|
1123 r05up031 add -12340 -0.001 -> -12341 Inexact Rounded |
|
1124 r05up032 add -12341 -0.001 -> -12341 Inexact Rounded |
|
1125 r05up033 add -12342 -0.001 -> -12342 Inexact Rounded |
|
1126 r05up034 add -12343 -0.001 -> -12343 Inexact Rounded |
|
1127 r05up035 add -12344 -0.001 -> -12344 Inexact Rounded |
|
1128 r05up036 add -12345 -0.001 -> -12346 Inexact Rounded |
|
1129 r05up037 add -12346 -0.001 -> -12346 Inexact Rounded |
|
1130 r05up038 add -12347 -0.001 -> -12347 Inexact Rounded |
|
1131 r05up039 add -12348 -0.001 -> -12348 Inexact Rounded |
|
1132 r05up040 add -12349 -0.001 -> -12349 Inexact Rounded |
|
1133 |
|
1134 r05up041 add -12340 0.001 -> -12339 Inexact Rounded |
|
1135 r05up042 add -12341 0.001 -> -12341 Inexact Rounded |
|
1136 r05up043 add -12342 0.001 -> -12341 Inexact Rounded |
|
1137 r05up044 add -12343 0.001 -> -12342 Inexact Rounded |
|
1138 r05up045 add -12344 0.001 -> -12343 Inexact Rounded |
|
1139 r05up046 add -12345 0.001 -> -12344 Inexact Rounded |
|
1140 r05up047 add -12346 0.001 -> -12346 Inexact Rounded |
|
1141 r05up048 add -12347 0.001 -> -12346 Inexact Rounded |
|
1142 r05up049 add -12348 0.001 -> -12347 Inexact Rounded |
|
1143 r05up050 add -12349 0.001 -> -12348 Inexact Rounded |
|
1144 |
|
1145 -- Addition operators ------------------------------------------------- |
|
1146 -- [The first few of these check negative residue possibilities; these |
|
1147 -- cases may be implemented as a negative residue in fastpaths] |
|
1148 |
|
1149 r0adx100 add 12345 -0.1 -> 12344 Inexact Rounded |
|
1150 r0adx101 add 12345 -0.01 -> 12344 Inexact Rounded |
|
1151 r0adx102 add 12345 -0.001 -> 12344 Inexact Rounded |
|
1152 r0adx103 add 12345 -0.00001 -> 12344 Inexact Rounded |
|
1153 r0adx104 add 12345 -0.000001 -> 12344 Inexact Rounded |
|
1154 r0adx105 add 12345 -0.0000001 -> 12344 Inexact Rounded |
|
1155 r0adx106 add 12345 0 -> 12345 |
|
1156 r0adx107 add 12345 0.0000001 -> 12346 Inexact Rounded |
|
1157 r0adx108 add 12345 0.000001 -> 12346 Inexact Rounded |
|
1158 r0adx109 add 12345 0.00001 -> 12346 Inexact Rounded |
|
1159 r0adx110 add 12345 0.0001 -> 12346 Inexact Rounded |
|
1160 r0adx111 add 12345 0.001 -> 12346 Inexact Rounded |
|
1161 r0adx112 add 12345 0.01 -> 12346 Inexact Rounded |
|
1162 r0adx113 add 12345 0.1 -> 12346 Inexact Rounded |
|
1163 |
|
1164 r0adx115 add 12346 0.49999 -> 12346 Inexact Rounded |
|
1165 r0adx116 add 12346 0.5 -> 12346 Inexact Rounded |
|
1166 r0adx117 add 12346 0.50001 -> 12346 Inexact Rounded |
|
1167 |
|
1168 r0adx120 add 12345 0.4 -> 12346 Inexact Rounded |
|
1169 r0adx121 add 12345 0.49 -> 12346 Inexact Rounded |
|
1170 r0adx122 add 12345 0.499 -> 12346 Inexact Rounded |
|
1171 r0adx123 add 12345 0.49999 -> 12346 Inexact Rounded |
|
1172 r0adx124 add 12345 0.5 -> 12346 Inexact Rounded |
|
1173 r0adx125 add 12345 0.50001 -> 12346 Inexact Rounded |
|
1174 r0adx126 add 12345 0.5001 -> 12346 Inexact Rounded |
|
1175 r0adx127 add 12345 0.501 -> 12346 Inexact Rounded |
|
1176 r0adx128 add 12345 0.51 -> 12346 Inexact Rounded |
|
1177 r0adx129 add 12345 0.6 -> 12346 Inexact Rounded |
|
1178 |
|
1179 -- negatives... |
|
1180 |
|
1181 r0sux100 add -12345 -0.1 -> -12346 Inexact Rounded |
|
1182 r0sux101 add -12345 -0.01 -> -12346 Inexact Rounded |
|
1183 r0sux102 add -12345 -0.001 -> -12346 Inexact Rounded |
|
1184 r0sux103 add -12345 -0.00001 -> -12346 Inexact Rounded |
|
1185 r0sux104 add -12345 -0.000001 -> -12346 Inexact Rounded |
|
1186 r0sux105 add -12345 -0.0000001 -> -12346 Inexact Rounded |
|
1187 r0sux106 add -12345 0 -> -12345 |
|
1188 r0sux107 add -12345 0.0000001 -> -12344 Inexact Rounded |
|
1189 r0sux108 add -12345 0.000001 -> -12344 Inexact Rounded |
|
1190 r0sux109 add -12345 0.00001 -> -12344 Inexact Rounded |
|
1191 r0sux110 add -12345 0.0001 -> -12344 Inexact Rounded |
|
1192 r0sux111 add -12345 0.001 -> -12344 Inexact Rounded |
|
1193 r0sux112 add -12345 0.01 -> -12344 Inexact Rounded |
|
1194 r0sux113 add -12345 0.1 -> -12344 Inexact Rounded |
|
1195 |
|
1196 r0sux115 add -12346 0.49999 -> -12346 Inexact Rounded |
|
1197 r0sux116 add -12346 0.5 -> -12346 Inexact Rounded |
|
1198 r0sux117 add -12346 0.50001 -> -12346 Inexact Rounded |
|
1199 |
|
1200 r0sux120 add -12345 0.4 -> -12344 Inexact Rounded |
|
1201 r0sux121 add -12345 0.49 -> -12344 Inexact Rounded |
|
1202 r0sux122 add -12345 0.499 -> -12344 Inexact Rounded |
|
1203 r0sux123 add -12345 0.49999 -> -12344 Inexact Rounded |
|
1204 r0sux124 add -12345 0.5 -> -12344 Inexact Rounded |
|
1205 r0sux125 add -12345 0.50001 -> -12344 Inexact Rounded |
|
1206 r0sux126 add -12345 0.5001 -> -12344 Inexact Rounded |
|
1207 r0sux127 add -12345 0.501 -> -12344 Inexact Rounded |
|
1208 r0sux128 add -12345 0.51 -> -12344 Inexact Rounded |
|
1209 r0sux129 add -12345 0.6 -> -12344 Inexact Rounded |
|
1210 |
|
1211 -- Check cancellation subtractions |
|
1212 -- (The IEEE 854 'curious rule' in $6.3) |
|
1213 |
|
1214 r0zex001 add 0 0 -> 0 |
|
1215 r0zex002 add 0 -0 -> 0 |
|
1216 r0zex003 add -0 0 -> 0 |
|
1217 r0zex004 add -0 -0 -> -0 |
|
1218 r0zex005 add 1 -1 -> 0 |
|
1219 r0zex006 add -1 1 -> 0 |
|
1220 r0zex007 add 1.5 -1.5 -> 0.0 |
|
1221 r0zex008 add -1.5 1.5 -> 0.0 |
|
1222 r0zex009 add 2 -2 -> 0 |
|
1223 r0zex010 add -2 2 -> 0 |
|
1224 |
|
1225 |
|
1226 -- Division operators ------------------------------------------------- |
|
1227 |
|
1228 r0dvx101 divide 12345 1 -> 12345 |
|
1229 r0dvx102 divide 12345 1.0001 -> 12343 Inexact Rounded |
|
1230 r0dvx103 divide 12345 1.001 -> 12332 Inexact Rounded |
|
1231 r0dvx104 divide 12345 1.01 -> 12222 Inexact Rounded |
|
1232 r0dvx105 divide 12345 1.1 -> 11222 Inexact Rounded |
|
1233 r0dvx106 divide 12355 4 -> 3088.7 Inexact Rounded |
|
1234 r0dvx107 divide 12345 4 -> 3086.2 Inexact Rounded |
|
1235 r0dvx108 divide 12355 4.0001 -> 3088.6 Inexact Rounded |
|
1236 r0dvx109 divide 12345 4.0001 -> 3086.1 Inexact Rounded |
|
1237 r0dvx110 divide 12345 4.9 -> 2519.3 Inexact Rounded |
|
1238 r0dvx111 divide 12345 4.99 -> 2473.9 Inexact Rounded |
|
1239 r0dvx112 divide 12345 4.999 -> 2469.4 Inexact Rounded |
|
1240 r0dvx113 divide 12345 4.9999 -> 2469.1 Inexact Rounded |
|
1241 r0dvx114 divide 12345 5 -> 2469 |
|
1242 r0dvx115 divide 12345 5.0001 -> 2468.9 Inexact Rounded |
|
1243 r0dvx116 divide 12345 5.001 -> 2468.6 Inexact Rounded |
|
1244 r0dvx117 divide 12345 5.01 -> 2464.1 Inexact Rounded |
|
1245 r0dvx118 divide 12345 5.1 -> 2420.6 Inexact Rounded |
|
1246 |
|
1247 -- [divideInteger and remainder unaffected] |
|
1248 |
|
1249 -- Multiplication operator -------------------------------------------- |
|
1250 |
|
1251 r0mux101 multiply 12345 1 -> 12345 |
|
1252 r0mux102 multiply 12345 1.0001 -> 12346 Inexact Rounded |
|
1253 r0mux103 multiply 12345 1.001 -> 12357 Inexact Rounded |
|
1254 r0mux104 multiply 12345 1.01 -> 12468 Inexact Rounded |
|
1255 r0mux105 multiply 12345 1.1 -> 13579 Inexact Rounded |
|
1256 r0mux106 multiply 12345 4 -> 49380 |
|
1257 r0mux107 multiply 12345 4.0001 -> 49381 Inexact Rounded |
|
1258 r0mux108 multiply 12345 4.9 -> 60491 Inexact Rounded |
|
1259 r0mux109 multiply 12345 4.99 -> 61601 Inexact Rounded |
|
1260 r0mux110 multiply 12345 4.999 -> 61712 Inexact Rounded |
|
1261 r0mux111 multiply 12345 4.9999 -> 61723 Inexact Rounded |
|
1262 r0mux112 multiply 12345 5 -> 61725 |
|
1263 r0mux113 multiply 12345 5.0001 -> 61726 Inexact Rounded |
|
1264 r0mux114 multiply 12345 5.001 -> 61737 Inexact Rounded |
|
1265 r0mux115 multiply 12345 5.01 -> 61848 Inexact Rounded |
|
1266 r0mux116 multiply 12345 12 -> 1.4814E+5 Rounded |
|
1267 r0mux117 multiply 12345 13 -> 1.6048E+5 Inexact Rounded |
|
1268 r0mux118 multiply 12355 12 -> 1.4826E+5 Rounded |
|
1269 r0mux119 multiply 12355 13 -> 1.6061E+5 Inexact Rounded |
|
1270 |
|
1271 |
|
1272 -- Power operator ----------------------------------------------------- |
|
1273 |
|
1274 r0pox101 power 12345 -5 -> 3.4877E-21 Inexact Rounded |
|
1275 r0pox102 power 12345 -4 -> 4.3056E-17 Inexact Rounded |
|
1276 r0pox103 power 12345 -3 -> 5.3152E-13 Inexact Rounded |
|
1277 r0pox104 power 12345 -2 -> 6.5617E-9 Inexact Rounded |
|
1278 r0pox105 power 12345 -1 -> 0.000081004 Inexact Rounded |
|
1279 r0pox106 power 12345 0 -> 1 |
|
1280 r0pox107 power 12345 1 -> 12345 |
|
1281 r0pox108 power 12345 2 -> 1.5239E+8 Inexact Rounded |
|
1282 r0pox109 power 12345 3 -> 1.8813E+12 Inexact Rounded |
|
1283 r0pox110 power 12345 4 -> 2.3226E+16 Inexact Rounded |
|
1284 r0pox111 power 12345 5 -> 2.8671E+20 Inexact Rounded |
|
1285 r0pox112 power 415 2 -> 1.7222E+5 Inexact Rounded |
|
1286 r0pox113 power 75 3 -> 4.2187E+5 Inexact Rounded |
|
1287 |
|
1288 |
|
1289 -- Underflow Subnormal and overflow values vary with rounding mode and sign |
|
1290 maxexponent: 999999999 |
|
1291 minexponent: -999999999 |
|
1292 -- [round down gives Nmax on first two and .0E... on the next two] |
|
1293 r0ovx100 multiply 10 9E+999999999 -> 9.9999E+999999999 Overflow Inexact Rounded |
|
1294 r0ovx101 multiply -10 9E+999999999 -> -9.9999E+999999999 Overflow Inexact Rounded |
|
1295 r0ovx102 divide 1E-9 9E+999999999 -> 1E-1000000003 Underflow Subnormal Inexact Rounded |
|
1296 r0ovx104 divide -1E-9 9E+999999999 -> -1E-1000000003 Underflow Subnormal Inexact Rounded |
|
1297 |
|
1298 -- reprise rounding mode effect (using multiplies so precision directive used) |
|
1299 precision: 9 |
|
1300 maxexponent: 999999999 |
|
1301 r0mex412 multiply -9.999E+999999999 10 -> -9.99999999E+999999999 Overflow Inexact Rounded |
|
1302 r0mex413 multiply 9.999E+999999999 10 -> 9.99999999E+999999999 Overflow Inexact Rounded |
|
1303 |