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