PageRenderTime 367ms CodeModel.GetById 162ms app.highlight 16ms RepoModel.GetById 104ms app.codeStats 0ms

/Lib/test/decimaltestdata/dqQuantize.decTest

http://unladen-swallow.googlecode.com/
Unknown | 838 lines | 769 code | 69 blank | 0 comment | 0 complexity | 1a30f1fce7157b048a1ed91286f14dce MD5 | raw file
  1------------------------------------------------------------------------
  2-- dqQuantize.decTest -- decQuad quantize operation                   --
  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.58
 21
 22-- Most of the tests here assume a "regular pattern", where the
 23-- sign and coefficient are +1.
 24-- 2004.03.15 Underflow for quantize is suppressed
 25-- 2005.06.08 More extensive tests for 'does not fit'
 26-- [Forked from quantize.decTest 2006.11.25]
 27
 28extended:    1
 29clamp:       1
 30precision:   34
 31maxExponent: 6144
 32minExponent: -6143
 33rounding:    half_even
 34
 35-- sanity checks
 36dqqua001 quantize 0       1e0   -> 0
 37dqqua002 quantize 1       1e0   -> 1
 38dqqua003 quantize 0.1    1e+2   -> 0E+2 Inexact Rounded
 39dqqua005 quantize 0.1    1e+1   -> 0E+1 Inexact Rounded
 40dqqua006 quantize 0.1     1e0   -> 0 Inexact Rounded
 41dqqua007 quantize 0.1    1e-1   -> 0.1
 42dqqua008 quantize 0.1    1e-2   -> 0.10
 43dqqua009 quantize 0.1    1e-3   -> 0.100
 44dqqua010 quantize 0.9    1e+2   -> 0E+2 Inexact Rounded
 45dqqua011 quantize 0.9    1e+1   -> 0E+1 Inexact Rounded
 46dqqua012 quantize 0.9    1e+0   -> 1 Inexact Rounded
 47dqqua013 quantize 0.9    1e-1   -> 0.9
 48dqqua014 quantize 0.9    1e-2   -> 0.90
 49dqqua015 quantize 0.9    1e-3   -> 0.900
 50-- negatives
 51dqqua021 quantize -0      1e0   -> -0
 52dqqua022 quantize -1      1e0   -> -1
 53dqqua023 quantize -0.1   1e+2   -> -0E+2 Inexact Rounded
 54dqqua025 quantize -0.1   1e+1   -> -0E+1 Inexact Rounded
 55dqqua026 quantize -0.1    1e0   -> -0 Inexact Rounded
 56dqqua027 quantize -0.1   1e-1   -> -0.1
 57dqqua028 quantize -0.1   1e-2   -> -0.10
 58dqqua029 quantize -0.1   1e-3   -> -0.100
 59dqqua030 quantize -0.9   1e+2   -> -0E+2 Inexact Rounded
 60dqqua031 quantize -0.9   1e+1   -> -0E+1 Inexact Rounded
 61dqqua032 quantize -0.9   1e+0   -> -1 Inexact Rounded
 62dqqua033 quantize -0.9   1e-1   -> -0.9
 63dqqua034 quantize -0.9   1e-2   -> -0.90
 64dqqua035 quantize -0.9   1e-3   -> -0.900
 65dqqua036 quantize -0.5   1e+2   -> -0E+2 Inexact Rounded
 66dqqua037 quantize -0.5   1e+1   -> -0E+1 Inexact Rounded
 67dqqua038 quantize -0.5   1e+0   -> -0 Inexact Rounded
 68dqqua039 quantize -0.5   1e-1   -> -0.5
 69dqqua040 quantize -0.5   1e-2   -> -0.50
 70dqqua041 quantize -0.5   1e-3   -> -0.500
 71dqqua042 quantize -0.9   1e+2   -> -0E+2 Inexact Rounded
 72dqqua043 quantize -0.9   1e+1   -> -0E+1 Inexact Rounded
 73dqqua044 quantize -0.9   1e+0   -> -1 Inexact Rounded
 74dqqua045 quantize -0.9   1e-1   -> -0.9
 75dqqua046 quantize -0.9   1e-2   -> -0.90
 76dqqua047 quantize -0.9   1e-3   -> -0.900
 77
 78-- examples from Specification
 79dqqua060 quantize 2.17   0.001  -> 2.170
 80dqqua061 quantize 2.17   0.01   -> 2.17
 81dqqua062 quantize 2.17   0.1    -> 2.2 Inexact Rounded
 82dqqua063 quantize 2.17   1e+0   -> 2 Inexact Rounded
 83dqqua064 quantize 2.17   1e+1   -> 0E+1 Inexact Rounded
 84dqqua065 quantize -Inf    Inf   -> -Infinity
 85dqqua066 quantize 2       Inf   -> NaN Invalid_operation
 86dqqua067 quantize -0.1    1     -> -0 Inexact Rounded
 87dqqua068 quantize -0      1e+5     -> -0E+5
 88dqqua069 quantize +123451234567899876543216789012345.6 1e-2 -> NaN Invalid_operation
 89dqqua070 quantize -987651234567899876543214335236450.6 1e-2 -> NaN Invalid_operation
 90dqqua071 quantize 217    1e-1   -> 217.0
 91dqqua072 quantize 217    1e+0   -> 217
 92dqqua073 quantize 217    1e+1   -> 2.2E+2 Inexact Rounded
 93dqqua074 quantize 217    1e+2   -> 2E+2 Inexact Rounded
 94
 95-- general tests ..
 96dqqua089 quantize 12     1e+4   -> 0E+4 Inexact Rounded
 97dqqua090 quantize 12     1e+3   -> 0E+3 Inexact Rounded
 98dqqua091 quantize 12     1e+2   -> 0E+2 Inexact Rounded
 99dqqua092 quantize 12     1e+1   -> 1E+1 Inexact Rounded
100dqqua093 quantize 1.2345 1e-2   -> 1.23 Inexact Rounded
101dqqua094 quantize 1.2355 1e-2   -> 1.24 Inexact Rounded
102dqqua095 quantize 1.2345 1e-6   -> 1.234500
103dqqua096 quantize 9.9999 1e-2   -> 10.00 Inexact Rounded
104dqqua097 quantize 0.0001 1e-2   -> 0.00 Inexact Rounded
105dqqua098 quantize 0.001  1e-2   -> 0.00 Inexact Rounded
106dqqua099 quantize 0.009  1e-2   -> 0.01 Inexact Rounded
107dqqua100 quantize 92     1e+2   -> 1E+2 Inexact Rounded
108
109dqqua101 quantize -1      1e0   ->  -1
110dqqua102 quantize -1     1e-1   ->  -1.0
111dqqua103 quantize -1     1e-2   ->  -1.00
112dqqua104 quantize  0      1e0   ->  0
113dqqua105 quantize  0     1e-1   ->  0.0
114dqqua106 quantize  0     1e-2   ->  0.00
115dqqua107 quantize  0.00   1e0   ->  0
116dqqua108 quantize  0     1e+1   ->  0E+1
117dqqua109 quantize  0     1e+2   ->  0E+2
118dqqua110 quantize +1      1e0   ->  1
119dqqua111 quantize +1     1e-1   ->  1.0
120dqqua112 quantize +1     1e-2   ->  1.00
121
122dqqua120 quantize   1.04  1e-3 ->  1.040
123dqqua121 quantize   1.04  1e-2 ->  1.04
124dqqua122 quantize   1.04  1e-1 ->  1.0 Inexact Rounded
125dqqua123 quantize   1.04   1e0 ->  1 Inexact Rounded
126dqqua124 quantize   1.05  1e-3 ->  1.050
127dqqua125 quantize   1.05  1e-2 ->  1.05
128dqqua126 quantize   1.05  1e-1 ->  1.0 Inexact Rounded
129dqqua131 quantize   1.05   1e0 ->  1 Inexact Rounded
130dqqua132 quantize   1.06  1e-3 ->  1.060
131dqqua133 quantize   1.06  1e-2 ->  1.06
132dqqua134 quantize   1.06  1e-1 ->  1.1 Inexact Rounded
133dqqua135 quantize   1.06   1e0 ->  1 Inexact Rounded
134
135dqqua140 quantize   -10    1e-2  ->  -10.00
136dqqua141 quantize   +1     1e-2  ->  1.00
137dqqua142 quantize   +10    1e-2  ->  10.00
138dqqua143 quantize   1E+37  1e-2  ->  NaN Invalid_operation
139dqqua144 quantize   1E-37  1e-2  ->  0.00 Inexact Rounded
140dqqua145 quantize   1E-3   1e-2  ->  0.00 Inexact Rounded
141dqqua146 quantize   1E-2   1e-2  ->  0.01
142dqqua147 quantize   1E-1   1e-2  ->  0.10
143dqqua148 quantize   0E-37  1e-2  ->  0.00
144
145dqqua150 quantize   1.0600 1e-5 ->  1.06000
146dqqua151 quantize   1.0600 1e-4 ->  1.0600
147dqqua152 quantize   1.0600 1e-3 ->  1.060 Rounded
148dqqua153 quantize   1.0600 1e-2 ->  1.06 Rounded
149dqqua154 quantize   1.0600 1e-1 ->  1.1 Inexact Rounded
150dqqua155 quantize   1.0600  1e0 ->  1 Inexact Rounded
151
152-- a couple where rounding was different in base tests
153rounding:    half_up
154dqqua157 quantize -0.5   1e+0   -> -1 Inexact Rounded
155dqqua158 quantize   1.05  1e-1 ->  1.1 Inexact Rounded
156dqqua159 quantize   1.06   1e0 ->  1 Inexact Rounded
157rounding:    half_even
158
159-- base tests with non-1 coefficients
160dqqua161 quantize 0      -9e0   -> 0
161dqqua162 quantize 1      -7e0   -> 1
162dqqua163 quantize 0.1   -1e+2   -> 0E+2 Inexact Rounded
163dqqua165 quantize 0.1    0e+1   -> 0E+1 Inexact Rounded
164dqqua166 quantize 0.1     2e0   -> 0 Inexact Rounded
165dqqua167 quantize 0.1    3e-1   -> 0.1
166dqqua168 quantize 0.1   44e-2   -> 0.10
167dqqua169 quantize 0.1  555e-3   -> 0.100
168dqqua170 quantize 0.9 6666e+2   -> 0E+2 Inexact Rounded
169dqqua171 quantize 0.9 -777e+1   -> 0E+1 Inexact Rounded
170dqqua172 quantize 0.9  -88e+0   -> 1 Inexact Rounded
171dqqua173 quantize 0.9   -9e-1   -> 0.9
172dqqua174 quantize 0.9    0e-2   -> 0.90
173dqqua175 quantize 0.9  1.1e-3   -> 0.9000
174-- negatives
175dqqua181 quantize -0    1.1e0   -> -0.0
176dqqua182 quantize -1     -1e0   -> -1
177dqqua183 quantize -0.1  11e+2   -> -0E+2 Inexact Rounded
178dqqua185 quantize -0.1 111e+1   -> -0E+1 Inexact Rounded
179dqqua186 quantize -0.1   71e0   -> -0 Inexact Rounded
180dqqua187 quantize -0.1 -91e-1   -> -0.1
181dqqua188 quantize -0.1 -.1e-2   -> -0.100
182dqqua189 quantize -0.1  -1e-3   -> -0.100
183dqqua190 quantize -0.9   0e+2   -> -0E+2 Inexact Rounded
184dqqua191 quantize -0.9  -0e+1   -> -0E+1 Inexact Rounded
185dqqua192 quantize -0.9 -10e+0   -> -1 Inexact Rounded
186dqqua193 quantize -0.9 100e-1   -> -0.9
187dqqua194 quantize -0.9 999e-2   -> -0.90
188
189-- +ve exponents ..
190dqqua201 quantize   -1   1e+0 ->  -1
191dqqua202 quantize   -1   1e+1 ->  -0E+1 Inexact Rounded
192dqqua203 quantize   -1   1e+2 ->  -0E+2 Inexact Rounded
193dqqua204 quantize    0   1e+0 ->  0
194dqqua205 quantize    0   1e+1 ->  0E+1
195dqqua206 quantize    0   1e+2 ->  0E+2
196dqqua207 quantize   +1   1e+0 ->  1
197dqqua208 quantize   +1   1e+1 ->  0E+1 Inexact Rounded
198dqqua209 quantize   +1   1e+2 ->  0E+2 Inexact Rounded
199
200dqqua220 quantize   1.04 1e+3 ->  0E+3 Inexact Rounded
201dqqua221 quantize   1.04 1e+2 ->  0E+2 Inexact Rounded
202dqqua222 quantize   1.04 1e+1 ->  0E+1 Inexact Rounded
203dqqua223 quantize   1.04 1e+0 ->  1 Inexact Rounded
204dqqua224 quantize   1.05 1e+3 ->  0E+3 Inexact Rounded
205dqqua225 quantize   1.05 1e+2 ->  0E+2 Inexact Rounded
206dqqua226 quantize   1.05 1e+1 ->  0E+1 Inexact Rounded
207dqqua227 quantize   1.05 1e+0 ->  1 Inexact Rounded
208dqqua228 quantize   1.05 1e+3 ->  0E+3 Inexact Rounded
209dqqua229 quantize   1.05 1e+2 ->  0E+2 Inexact Rounded
210dqqua230 quantize   1.05 1e+1 ->  0E+1 Inexact Rounded
211dqqua231 quantize   1.05 1e+0 ->  1 Inexact Rounded
212dqqua232 quantize   1.06 1e+3 ->  0E+3 Inexact Rounded
213dqqua233 quantize   1.06 1e+2 ->  0E+2 Inexact Rounded
214dqqua234 quantize   1.06 1e+1 ->  0E+1 Inexact Rounded
215dqqua235 quantize   1.06 1e+0 ->  1 Inexact Rounded
216
217dqqua240 quantize   -10   1e+1  ->  -1E+1 Rounded
218dqqua241 quantize   +1    1e+1  ->  0E+1 Inexact Rounded
219dqqua242 quantize   +10   1e+1  ->  1E+1 Rounded
220dqqua243 quantize   1E+1  1e+1  ->  1E+1          -- underneath this is E+1
221dqqua244 quantize   1E+2  1e+1  ->  1.0E+2        -- underneath this is E+1
222dqqua245 quantize   1E+3  1e+1  ->  1.00E+3       -- underneath this is E+1
223dqqua246 quantize   1E+4  1e+1  ->  1.000E+4      -- underneath this is E+1
224dqqua247 quantize   1E+5  1e+1  ->  1.0000E+5     -- underneath this is E+1
225dqqua248 quantize   1E+6  1e+1  ->  1.00000E+6    -- underneath this is E+1
226dqqua249 quantize   1E+7  1e+1  ->  1.000000E+7   -- underneath this is E+1
227dqqua250 quantize   1E+8  1e+1  ->  1.0000000E+8  -- underneath this is E+1
228dqqua251 quantize   1E+9  1e+1  ->  1.00000000E+9 -- underneath this is E+1
229-- next one tries to add 9 zeros
230dqqua252 quantize   1E+37 1e+1  ->  NaN Invalid_operation
231dqqua253 quantize   1E-37 1e+1  ->  0E+1 Inexact Rounded
232dqqua254 quantize   1E-2  1e+1  ->  0E+1 Inexact Rounded
233dqqua255 quantize   0E-37 1e+1  ->  0E+1
234dqqua256 quantize  -0E-37 1e+1  -> -0E+1
235dqqua257 quantize  -0E-1  1e+1  -> -0E+1
236dqqua258 quantize  -0     1e+1  -> -0E+1
237dqqua259 quantize  -0E+1  1e+1  -> -0E+1
238
239dqqua260 quantize   -10   1e+2  ->  -0E+2 Inexact Rounded
240dqqua261 quantize   +1    1e+2  ->  0E+2 Inexact Rounded
241dqqua262 quantize   +10   1e+2  ->  0E+2 Inexact Rounded
242dqqua263 quantize   1E+1  1e+2  ->  0E+2 Inexact Rounded
243dqqua264 quantize   1E+2  1e+2  ->  1E+2
244dqqua265 quantize   1E+3  1e+2  ->  1.0E+3
245dqqua266 quantize   1E+4  1e+2  ->  1.00E+4
246dqqua267 quantize   1E+5  1e+2  ->  1.000E+5
247dqqua268 quantize   1E+6  1e+2  ->  1.0000E+6
248dqqua269 quantize   1E+7  1e+2  ->  1.00000E+7
249dqqua270 quantize   1E+8  1e+2  ->  1.000000E+8
250dqqua271 quantize   1E+9  1e+2  ->  1.0000000E+9
251dqqua272 quantize   1E+10 1e+2  ->  1.00000000E+10
252dqqua273 quantize   1E-10 1e+2  ->  0E+2 Inexact Rounded
253dqqua274 quantize   1E-2  1e+2  ->  0E+2 Inexact Rounded
254dqqua275 quantize   0E-10 1e+2  ->  0E+2
255
256dqqua280 quantize   -10   1e+3  ->  -0E+3 Inexact Rounded
257dqqua281 quantize   +1    1e+3  ->  0E+3 Inexact Rounded
258dqqua282 quantize   +10   1e+3  ->  0E+3 Inexact Rounded
259dqqua283 quantize   1E+1  1e+3  ->  0E+3 Inexact Rounded
260dqqua284 quantize   1E+2  1e+3  ->  0E+3 Inexact Rounded
261dqqua285 quantize   1E+3  1e+3  ->  1E+3
262dqqua286 quantize   1E+4  1e+3  ->  1.0E+4
263dqqua287 quantize   1E+5  1e+3  ->  1.00E+5
264dqqua288 quantize   1E+6  1e+3  ->  1.000E+6
265dqqua289 quantize   1E+7  1e+3  ->  1.0000E+7
266dqqua290 quantize   1E+8  1e+3  ->  1.00000E+8
267dqqua291 quantize   1E+9  1e+3  ->  1.000000E+9
268dqqua292 quantize   1E+10 1e+3  ->  1.0000000E+10
269dqqua293 quantize   1E-10 1e+3  ->  0E+3 Inexact Rounded
270dqqua294 quantize   1E-2  1e+3  ->  0E+3 Inexact Rounded
271dqqua295 quantize   0E-10 1e+3  ->  0E+3
272
273-- round up from below [sign wrong in JIT compiler once]
274dqqua300 quantize   0.0078 1e-5 ->  0.00780
275dqqua301 quantize   0.0078 1e-4 ->  0.0078
276dqqua302 quantize   0.0078 1e-3 ->  0.008 Inexact Rounded
277dqqua303 quantize   0.0078 1e-2 ->  0.01 Inexact Rounded
278dqqua304 quantize   0.0078 1e-1 ->  0.0 Inexact Rounded
279dqqua305 quantize   0.0078  1e0 ->  0 Inexact Rounded
280dqqua306 quantize   0.0078 1e+1 ->  0E+1 Inexact Rounded
281dqqua307 quantize   0.0078 1e+2 ->  0E+2 Inexact Rounded
282
283dqqua310 quantize  -0.0078 1e-5 -> -0.00780
284dqqua311 quantize  -0.0078 1e-4 -> -0.0078
285dqqua312 quantize  -0.0078 1e-3 -> -0.008 Inexact Rounded
286dqqua313 quantize  -0.0078 1e-2 -> -0.01 Inexact Rounded
287dqqua314 quantize  -0.0078 1e-1 -> -0.0 Inexact Rounded
288dqqua315 quantize  -0.0078  1e0 -> -0 Inexact Rounded
289dqqua316 quantize  -0.0078 1e+1 -> -0E+1 Inexact Rounded
290dqqua317 quantize  -0.0078 1e+2 -> -0E+2 Inexact Rounded
291
292dqqua320 quantize   0.078 1e-5 ->  0.07800
293dqqua321 quantize   0.078 1e-4 ->  0.0780
294dqqua322 quantize   0.078 1e-3 ->  0.078
295dqqua323 quantize   0.078 1e-2 ->  0.08 Inexact Rounded
296dqqua324 quantize   0.078 1e-1 ->  0.1 Inexact Rounded
297dqqua325 quantize   0.078  1e0 ->  0 Inexact Rounded
298dqqua326 quantize   0.078 1e+1 ->  0E+1 Inexact Rounded
299dqqua327 quantize   0.078 1e+2 ->  0E+2 Inexact Rounded
300
301dqqua330 quantize  -0.078 1e-5 -> -0.07800
302dqqua331 quantize  -0.078 1e-4 -> -0.0780
303dqqua332 quantize  -0.078 1e-3 -> -0.078
304dqqua333 quantize  -0.078 1e-2 -> -0.08 Inexact Rounded
305dqqua334 quantize  -0.078 1e-1 -> -0.1 Inexact Rounded
306dqqua335 quantize  -0.078  1e0 -> -0 Inexact Rounded
307dqqua336 quantize  -0.078 1e+1 -> -0E+1 Inexact Rounded
308dqqua337 quantize  -0.078 1e+2 -> -0E+2 Inexact Rounded
309
310dqqua340 quantize   0.78 1e-5 ->  0.78000
311dqqua341 quantize   0.78 1e-4 ->  0.7800
312dqqua342 quantize   0.78 1e-3 ->  0.780
313dqqua343 quantize   0.78 1e-2 ->  0.78
314dqqua344 quantize   0.78 1e-1 ->  0.8 Inexact Rounded
315dqqua345 quantize   0.78  1e0 ->  1 Inexact Rounded
316dqqua346 quantize   0.78 1e+1 ->  0E+1 Inexact Rounded
317dqqua347 quantize   0.78 1e+2 ->  0E+2 Inexact Rounded
318
319dqqua350 quantize  -0.78 1e-5 -> -0.78000
320dqqua351 quantize  -0.78 1e-4 -> -0.7800
321dqqua352 quantize  -0.78 1e-3 -> -0.780
322dqqua353 quantize  -0.78 1e-2 -> -0.78
323dqqua354 quantize  -0.78 1e-1 -> -0.8 Inexact Rounded
324dqqua355 quantize  -0.78  1e0 -> -1 Inexact Rounded
325dqqua356 quantize  -0.78 1e+1 -> -0E+1 Inexact Rounded
326dqqua357 quantize  -0.78 1e+2 -> -0E+2 Inexact Rounded
327
328dqqua360 quantize   7.8 1e-5 ->  7.80000
329dqqua361 quantize   7.8 1e-4 ->  7.8000
330dqqua362 quantize   7.8 1e-3 ->  7.800
331dqqua363 quantize   7.8 1e-2 ->  7.80
332dqqua364 quantize   7.8 1e-1 ->  7.8
333dqqua365 quantize   7.8  1e0 ->  8 Inexact Rounded
334dqqua366 quantize   7.8 1e+1 ->  1E+1 Inexact Rounded
335dqqua367 quantize   7.8 1e+2 ->  0E+2 Inexact Rounded
336dqqua368 quantize   7.8 1e+3 ->  0E+3 Inexact Rounded
337
338dqqua370 quantize  -7.8 1e-5 -> -7.80000
339dqqua371 quantize  -7.8 1e-4 -> -7.8000
340dqqua372 quantize  -7.8 1e-3 -> -7.800
341dqqua373 quantize  -7.8 1e-2 -> -7.80
342dqqua374 quantize  -7.8 1e-1 -> -7.8
343dqqua375 quantize  -7.8  1e0 -> -8 Inexact Rounded
344dqqua376 quantize  -7.8 1e+1 -> -1E+1 Inexact Rounded
345dqqua377 quantize  -7.8 1e+2 -> -0E+2 Inexact Rounded
346dqqua378 quantize  -7.8 1e+3 -> -0E+3 Inexact Rounded
347
348-- some individuals
349dqqua380 quantize   1122334455667788991234567352364.506 1e-2 -> 1122334455667788991234567352364.51 Inexact Rounded
350dqqua381 quantize   11223344556677889912345673523645.06 1e-2 -> 11223344556677889912345673523645.06
351dqqua382 quantize   112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
352dqqua383 quantize   1122334455667788991234567352364506  1e-2 -> NaN Invalid_operation
353dqqua384 quantize  -1122334455667788991234567352364.506 1e-2 -> -1122334455667788991234567352364.51 Inexact Rounded
354dqqua385 quantize  -11223344556677889912345673523645.06 1e-2 -> -11223344556677889912345673523645.06
355dqqua386 quantize  -112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
356dqqua387 quantize  -1122334455667788991234567352364506  1e-2 -> NaN Invalid_operation
357
358rounding: down
359dqqua389 quantize   112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
360-- ? should that one instead have been:
361-- dqqua389 quantize   112233445566778899123456735236450.6 1e-2 -> NaN Invalid_operation
362rounding: half_up
363
364-- and a few more from e-mail discussions
365dqqua391 quantize  11223344556677889912345678912.34567  1e-3 -> 11223344556677889912345678912.346   Inexact Rounded
366dqqua392 quantize  112233445566778899123456789123.4567  1e-3 -> 112233445566778899123456789123.457  Inexact Rounded
367dqqua393 quantize  1122334455667788991234567891234567.  1e-3 -> NaN Invalid_operation
368
369-- some 9999 round-up cases
370dqqua400 quantize   9.999        1e-5  ->  9.99900
371dqqua401 quantize   9.999        1e-4  ->  9.9990
372dqqua402 quantize   9.999        1e-3  ->  9.999
373dqqua403 quantize   9.999        1e-2  -> 10.00     Inexact Rounded
374dqqua404 quantize   9.999        1e-1  -> 10.0      Inexact Rounded
375dqqua405 quantize   9.999         1e0  -> 10        Inexact Rounded
376dqqua406 quantize   9.999         1e1  -> 1E+1      Inexact Rounded
377dqqua407 quantize   9.999         1e2  -> 0E+2      Inexact Rounded
378
379dqqua410 quantize   0.999        1e-5  ->  0.99900
380dqqua411 quantize   0.999        1e-4  ->  0.9990
381dqqua412 quantize   0.999        1e-3  ->  0.999
382dqqua413 quantize   0.999        1e-2  ->  1.00     Inexact Rounded
383dqqua414 quantize   0.999        1e-1  ->  1.0      Inexact Rounded
384dqqua415 quantize   0.999         1e0  ->  1        Inexact Rounded
385dqqua416 quantize   0.999         1e1  -> 0E+1      Inexact Rounded
386
387dqqua420 quantize   0.0999       1e-5  ->  0.09990
388dqqua421 quantize   0.0999       1e-4  ->  0.0999
389dqqua422 quantize   0.0999       1e-3  ->  0.100    Inexact Rounded
390dqqua423 quantize   0.0999       1e-2  ->  0.10     Inexact Rounded
391dqqua424 quantize   0.0999       1e-1  ->  0.1      Inexact Rounded
392dqqua425 quantize   0.0999        1e0  ->  0        Inexact Rounded
393dqqua426 quantize   0.0999        1e1  -> 0E+1      Inexact Rounded
394
395dqqua430 quantize   0.00999      1e-5  ->  0.00999
396dqqua431 quantize   0.00999      1e-4  ->  0.0100   Inexact Rounded
397dqqua432 quantize   0.00999      1e-3  ->  0.010    Inexact Rounded
398dqqua433 quantize   0.00999      1e-2  ->  0.01     Inexact Rounded
399dqqua434 quantize   0.00999      1e-1  ->  0.0      Inexact Rounded
400dqqua435 quantize   0.00999       1e0  ->  0        Inexact Rounded
401dqqua436 quantize   0.00999       1e1  -> 0E+1      Inexact Rounded
402
403dqqua440 quantize   0.000999     1e-5  ->  0.00100  Inexact Rounded
404dqqua441 quantize   0.000999     1e-4  ->  0.0010   Inexact Rounded
405dqqua442 quantize   0.000999     1e-3  ->  0.001    Inexact Rounded
406dqqua443 quantize   0.000999     1e-2  ->  0.00     Inexact Rounded
407dqqua444 quantize   0.000999     1e-1  ->  0.0      Inexact Rounded
408dqqua445 quantize   0.000999      1e0  ->  0        Inexact Rounded
409dqqua446 quantize   0.000999      1e1  -> 0E+1      Inexact Rounded
410
411dqqua1001 quantize  0.000        0.001 ->  0.000
412dqqua1002 quantize  0.001        0.001 ->  0.001
413dqqua1003 quantize  0.0012       0.001 ->  0.001     Inexact Rounded
414dqqua1004 quantize  0.0018       0.001 ->  0.002     Inexact Rounded
415dqqua1005 quantize  0.501        0.001 ->  0.501
416dqqua1006 quantize  0.5012       0.001 ->  0.501     Inexact Rounded
417dqqua1007 quantize  0.5018       0.001 ->  0.502     Inexact Rounded
418dqqua1008 quantize  0.999        0.001 ->  0.999
419
420dqqua481 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
421dqqua482 quantize 1234567800  1e+1 -> 1.23456780E+9 Rounded
422dqqua483 quantize 1234567890  1e+1 -> 1.23456789E+9 Rounded
423dqqua484 quantize 1234567891  1e+1 -> 1.23456789E+9 Inexact Rounded
424dqqua485 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
425dqqua486 quantize 1234567896  1e+1 -> 1.23456790E+9 Inexact Rounded
426-- a potential double-round
427dqqua487 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
428dqqua488 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
429
430dqqua491 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
431dqqua492 quantize 1234567800  1e+1 -> 1.23456780E+9 Rounded
432dqqua493 quantize 1234567890  1e+1 -> 1.23456789E+9 Rounded
433dqqua494 quantize 1234567891  1e+1 -> 1.23456789E+9 Inexact Rounded
434dqqua495 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
435dqqua496 quantize 1234567896  1e+1 -> 1.23456790E+9 Inexact Rounded
436dqqua497 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
437dqqua498 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
438
439-- Zeros
440dqqua500 quantize   0     1e1 ->  0E+1
441dqqua501 quantize   0     1e0 ->  0
442dqqua502 quantize   0    1e-1 ->  0.0
443dqqua503 quantize   0.0  1e-1 ->  0.0
444dqqua504 quantize   0.0   1e0 ->  0
445dqqua505 quantize   0.0  1e+1 ->  0E+1
446dqqua506 quantize   0E+1 1e-1 ->  0.0
447dqqua507 quantize   0E+1  1e0 ->  0
448dqqua508 quantize   0E+1 1e+1 ->  0E+1
449dqqua509 quantize  -0     1e1 -> -0E+1
450dqqua510 quantize  -0     1e0 -> -0
451dqqua511 quantize  -0    1e-1 -> -0.0
452dqqua512 quantize  -0.0  1e-1 -> -0.0
453dqqua513 quantize  -0.0   1e0 -> -0
454dqqua514 quantize  -0.0  1e+1 -> -0E+1
455dqqua515 quantize  -0E+1 1e-1 -> -0.0
456dqqua516 quantize  -0E+1  1e0 -> -0
457dqqua517 quantize  -0E+1 1e+1 -> -0E+1
458-- #519 here once a problem
459dqqua518 quantize  0    0E-3  -> 0.000
460dqqua519 quantize  0    0E-33 -> 0E-33
461dqqua520 quantize  0.00000000000000000000000000000000   0E-33 -> 0E-33
462dqqua521 quantize  0.000000000000000000000000000000000  0E-33 -> 0E-33
463
464-- Some non-zeros with lots of padding on the right
465dqqua523 quantize   1   0E-33 -> 1.000000000000000000000000000000000
466dqqua524 quantize  12   0E-32 -> 12.00000000000000000000000000000000
467dqqua525 quantize 123   0E-31 -> 123.0000000000000000000000000000000
468dqqua526 quantize 123   0E-32 -> NaN Invalid_operation
469dqqua527 quantize 123.4 0E-31 -> 123.4000000000000000000000000000000
470dqqua528 quantize 123.4 0E-32 -> NaN Invalid_operation
471
472-- Suspicious RHS values
473dqqua530 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
474dqqua531 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
475dqqua532 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
476dqqua533 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
477-- next four are "won't fit" overflows
478dqqua536 quantize   1.234   1e-299 -> NaN Invalid_operation
479dqqua537 quantize 123.456   1e-299 -> NaN Invalid_operation
480dqqua538 quantize   1.234   1e-299 -> NaN Invalid_operation
481dqqua539 quantize 123.456   1e-299 -> NaN Invalid_operation
482
483dqqua542 quantize   1.234E+299    1e299 -> 1E+299    Inexact Rounded
484dqqua543 quantize   1.234E+298    1e299 -> 0E+299    Inexact Rounded
485dqqua544 quantize   1.234         1e299 -> 0E+299    Inexact Rounded
486dqqua547 quantize   0            1e-299 -> 0E-299
487-- next two are "won't fit" overflows
488dqqua548 quantize   1.234        1e-299 -> NaN Invalid_operation
489dqqua549 quantize   1.234        1e-300 -> NaN Invalid_operation
490-- [more below]
491
492-- Specials
493dqqua580 quantize  Inf    -Inf   ->  Infinity
494dqqua581 quantize  Inf  1e-299   ->  NaN  Invalid_operation
495dqqua582 quantize  Inf  1e-1     ->  NaN  Invalid_operation
496dqqua583 quantize  Inf   1e0     ->  NaN  Invalid_operation
497dqqua584 quantize  Inf   1e1     ->  NaN  Invalid_operation
498dqqua585 quantize  Inf   1e299   ->  NaN  Invalid_operation
499dqqua586 quantize  Inf     Inf   ->  Infinity
500dqqua587 quantize -1000    Inf   ->  NaN  Invalid_operation
501dqqua588 quantize -Inf     Inf   ->  -Infinity
502dqqua589 quantize -1       Inf   ->  NaN  Invalid_operation
503dqqua590 quantize  0       Inf   ->  NaN  Invalid_operation
504dqqua591 quantize  1       Inf   ->  NaN  Invalid_operation
505dqqua592 quantize  1000    Inf   ->  NaN  Invalid_operation
506dqqua593 quantize  Inf     Inf   ->  Infinity
507dqqua594 quantize  Inf  1e-0     ->  NaN  Invalid_operation
508dqqua595 quantize -0       Inf   ->  NaN  Invalid_operation
509
510dqqua600 quantize -Inf    -Inf   ->  -Infinity
511dqqua601 quantize -Inf  1e-299   ->  NaN  Invalid_operation
512dqqua602 quantize -Inf  1e-1     ->  NaN  Invalid_operation
513dqqua603 quantize -Inf   1e0     ->  NaN  Invalid_operation
514dqqua604 quantize -Inf   1e1     ->  NaN  Invalid_operation
515dqqua605 quantize -Inf   1e299   ->  NaN  Invalid_operation
516dqqua606 quantize -Inf     Inf   ->  -Infinity
517dqqua607 quantize -1000    Inf   ->  NaN  Invalid_operation
518dqqua608 quantize -Inf    -Inf   ->  -Infinity
519dqqua609 quantize -1      -Inf   ->  NaN  Invalid_operation
520dqqua610 quantize  0      -Inf   ->  NaN  Invalid_operation
521dqqua611 quantize  1      -Inf   ->  NaN  Invalid_operation
522dqqua612 quantize  1000   -Inf   ->  NaN  Invalid_operation
523dqqua613 quantize  Inf    -Inf   ->  Infinity
524dqqua614 quantize -Inf  1e-0     ->  NaN  Invalid_operation
525dqqua615 quantize -0      -Inf   ->  NaN  Invalid_operation
526
527dqqua621 quantize  NaN   -Inf    ->  NaN
528dqqua622 quantize  NaN 1e-299    ->  NaN
529dqqua623 quantize  NaN 1e-1      ->  NaN
530dqqua624 quantize  NaN  1e0      ->  NaN
531dqqua625 quantize  NaN  1e1      ->  NaN
532dqqua626 quantize  NaN  1e299    ->  NaN
533dqqua627 quantize  NaN    Inf    ->  NaN
534dqqua628 quantize  NaN    NaN    ->  NaN
535dqqua629 quantize -Inf    NaN    ->  NaN
536dqqua630 quantize -1000   NaN    ->  NaN
537dqqua631 quantize -1      NaN    ->  NaN
538dqqua632 quantize  0      NaN    ->  NaN
539dqqua633 quantize  1      NaN    ->  NaN
540dqqua634 quantize  1000   NaN    ->  NaN
541dqqua635 quantize  Inf    NaN    ->  NaN
542dqqua636 quantize  NaN 1e-0      ->  NaN
543dqqua637 quantize -0      NaN    ->  NaN
544
545dqqua641 quantize  sNaN   -Inf   ->  NaN  Invalid_operation
546dqqua642 quantize  sNaN 1e-299   ->  NaN  Invalid_operation
547dqqua643 quantize  sNaN 1e-1     ->  NaN  Invalid_operation
548dqqua644 quantize  sNaN  1e0     ->  NaN  Invalid_operation
549dqqua645 quantize  sNaN  1e1     ->  NaN  Invalid_operation
550dqqua646 quantize  sNaN  1e299   ->  NaN  Invalid_operation
551dqqua647 quantize  sNaN    NaN   ->  NaN  Invalid_operation
552dqqua648 quantize  sNaN   sNaN   ->  NaN  Invalid_operation
553dqqua649 quantize  NaN    sNaN   ->  NaN  Invalid_operation
554dqqua650 quantize -Inf    sNaN   ->  NaN  Invalid_operation
555dqqua651 quantize -1000   sNaN   ->  NaN  Invalid_operation
556dqqua652 quantize -1      sNaN   ->  NaN  Invalid_operation
557dqqua653 quantize  0      sNaN   ->  NaN  Invalid_operation
558dqqua654 quantize  1      sNaN   ->  NaN  Invalid_operation
559dqqua655 quantize  1000   sNaN   ->  NaN  Invalid_operation
560dqqua656 quantize  Inf    sNaN   ->  NaN  Invalid_operation
561dqqua657 quantize  NaN    sNaN   ->  NaN  Invalid_operation
562dqqua658 quantize  sNaN 1e-0     ->  NaN  Invalid_operation
563dqqua659 quantize -0      sNaN   ->  NaN  Invalid_operation
564
565-- propagating NaNs
566dqqua661 quantize  NaN9 -Inf   ->  NaN9
567dqqua662 quantize  NaN8  919   ->  NaN8
568dqqua663 quantize  NaN71 Inf   ->  NaN71
569dqqua664 quantize  NaN6  NaN5  ->  NaN6
570dqqua665 quantize -Inf   NaN4  ->  NaN4
571dqqua666 quantize -919   NaN31 ->  NaN31
572dqqua667 quantize  Inf   NaN2  ->  NaN2
573
574dqqua671 quantize  sNaN99 -Inf    ->  NaN99 Invalid_operation
575dqqua672 quantize  sNaN98 -11     ->  NaN98 Invalid_operation
576dqqua673 quantize  sNaN97  NaN    ->  NaN97 Invalid_operation
577dqqua674 quantize  sNaN16 sNaN94  ->  NaN16 Invalid_operation
578dqqua675 quantize  NaN95  sNaN93  ->  NaN93 Invalid_operation
579dqqua676 quantize -Inf    sNaN92  ->  NaN92 Invalid_operation
580dqqua677 quantize  088    sNaN91  ->  NaN91 Invalid_operation
581dqqua678 quantize  Inf    sNaN90  ->  NaN90 Invalid_operation
582dqqua679 quantize  NaN    sNaN88  ->  NaN88 Invalid_operation
583
584dqqua681 quantize -NaN9 -Inf   -> -NaN9
585dqqua682 quantize -NaN8  919   -> -NaN8
586dqqua683 quantize -NaN71 Inf   -> -NaN71
587dqqua684 quantize -NaN6 -NaN5  -> -NaN6
588dqqua685 quantize -Inf  -NaN4  -> -NaN4
589dqqua686 quantize -919  -NaN31 -> -NaN31
590dqqua687 quantize  Inf  -NaN2  -> -NaN2
591
592dqqua691 quantize -sNaN99 -Inf    -> -NaN99 Invalid_operation
593dqqua692 quantize -sNaN98 -11     -> -NaN98 Invalid_operation
594dqqua693 quantize -sNaN97  NaN    -> -NaN97 Invalid_operation
595dqqua694 quantize -sNaN16 sNaN94  -> -NaN16 Invalid_operation
596dqqua695 quantize -NaN95 -sNaN93  -> -NaN93 Invalid_operation
597dqqua696 quantize -Inf   -sNaN92  -> -NaN92 Invalid_operation
598dqqua697 quantize  088   -sNaN91  -> -NaN91 Invalid_operation
599dqqua698 quantize  Inf   -sNaN90  -> -NaN90 Invalid_operation
600dqqua699 quantize  NaN   -sNaN88  -> -NaN88 Invalid_operation
601
602-- subnormals and underflow
603dqqua710 quantize  1.00E-6143   1e-6143  ->   1E-6143   Rounded
604dqqua711 quantize  0.1E-6143    2e-6144  ->   1E-6144   Subnormal
605dqqua712 quantize  0.10E-6143   3e-6144  ->   1E-6144   Subnormal Rounded
606dqqua713 quantize  0.100E-6143  4e-6144  ->   1E-6144   Subnormal Rounded
607dqqua714 quantize  0.01E-6143   5e-6145  ->   1E-6145   Subnormal
608-- next is rounded to Emin
609dqqua715 quantize  0.999E-6143  1e-6143  ->   1E-6143   Inexact Rounded
610dqqua716 quantize  0.099E-6143 10e-6144  ->   1E-6144   Inexact Rounded Subnormal
611
612dqqua717 quantize  0.009E-6143  1e-6145  ->   1E-6145   Inexact Rounded Subnormal
613dqqua718 quantize  0.001E-6143  1e-6145  ->   0E-6145   Inexact Rounded
614dqqua719 quantize  0.0009E-6143 1e-6145  ->   0E-6145   Inexact Rounded
615dqqua720 quantize  0.0001E-6143 1e-6145  ->   0E-6145   Inexact Rounded
616
617dqqua730 quantize -1.00E-6143   1e-6143  ->  -1E-6143     Rounded
618dqqua731 quantize -0.1E-6143    1e-6143  ->  -0E-6143     Rounded Inexact
619dqqua732 quantize -0.10E-6143   1e-6143  ->  -0E-6143     Rounded Inexact
620dqqua733 quantize -0.100E-6143  1e-6143  ->  -0E-6143     Rounded Inexact
621dqqua734 quantize -0.01E-6143   1e-6143  ->  -0E-6143     Inexact Rounded
622-- next is rounded to Emin
623dqqua735 quantize -0.999E-6143 90e-6143  ->  -1E-6143     Inexact Rounded
624dqqua736 quantize -0.099E-6143 -1e-6143  ->  -0E-6143     Inexact Rounded
625dqqua737 quantize -0.009E-6143 -1e-6143  ->  -0E-6143     Inexact Rounded
626dqqua738 quantize -0.001E-6143 -0e-6143  ->  -0E-6143     Inexact Rounded
627dqqua739 quantize -0.0001E-6143 0e-6143  ->  -0E-6143     Inexact Rounded
628
629dqqua740 quantize -1.00E-6143   1e-6144 ->  -1.0E-6143   Rounded
630dqqua741 quantize -0.1E-6143    1e-6144 ->  -1E-6144    Subnormal
631dqqua742 quantize -0.10E-6143   1e-6144 ->  -1E-6144    Subnormal Rounded
632dqqua743 quantize -0.100E-6143  1e-6144 ->  -1E-6144    Subnormal Rounded
633dqqua744 quantize -0.01E-6143   1e-6144 ->  -0E-6144    Inexact Rounded
634-- next is rounded to Emin
635dqqua745 quantize -0.999E-6143  1e-6144 ->  -1.0E-6143   Inexact Rounded
636dqqua746 quantize -0.099E-6143  1e-6144 ->  -1E-6144    Inexact Rounded Subnormal
637dqqua747 quantize -0.009E-6143  1e-6144 ->  -0E-6144    Inexact Rounded
638dqqua748 quantize -0.001E-6143  1e-6144 ->  -0E-6144    Inexact Rounded
639dqqua749 quantize -0.0001E-6143 1e-6144 ->  -0E-6144    Inexact Rounded
640
641dqqua750 quantize -1.00E-6143   1e-6145 ->  -1.00E-6143
642dqqua751 quantize -0.1E-6143    1e-6145 ->  -1.0E-6144  Subnormal
643dqqua752 quantize -0.10E-6143   1e-6145 ->  -1.0E-6144  Subnormal
644dqqua753 quantize -0.100E-6143  1e-6145 ->  -1.0E-6144  Subnormal Rounded
645dqqua754 quantize -0.01E-6143   1e-6145 ->  -1E-6145    Subnormal
646-- next is rounded to Emin
647dqqua755 quantize -0.999E-6143  1e-6145 ->  -1.00E-6143  Inexact Rounded
648dqqua756 quantize -0.099E-6143  1e-6145 ->  -1.0E-6144  Inexact Rounded Subnormal
649dqqua757 quantize -0.009E-6143  1e-6145 ->  -1E-6145    Inexact Rounded Subnormal
650dqqua758 quantize -0.001E-6143  1e-6145 ->  -0E-6145    Inexact Rounded
651dqqua759 quantize -0.0001E-6143 1e-6145 ->  -0E-6145    Inexact Rounded
652
653dqqua760 quantize -1.00E-6143   1e-6146 ->  -1.000E-6143
654dqqua761 quantize -0.1E-6143    1e-6146 ->  -1.00E-6144  Subnormal
655dqqua762 quantize -0.10E-6143   1e-6146 ->  -1.00E-6144  Subnormal
656dqqua763 quantize -0.100E-6143  1e-6146 ->  -1.00E-6144  Subnormal
657dqqua764 quantize -0.01E-6143   1e-6146 ->  -1.0E-6145   Subnormal
658dqqua765 quantize -0.999E-6143  1e-6146 ->  -9.99E-6144  Subnormal
659dqqua766 quantize -0.099E-6143  1e-6146 ->  -9.9E-6145   Subnormal
660dqqua767 quantize -0.009E-6143  1e-6146 ->  -9E-6146     Subnormal
661dqqua768 quantize -0.001E-6143  1e-6146 ->  -1E-6146     Subnormal
662dqqua769 quantize -0.0001E-6143 1e-6146 ->  -0E-6146     Inexact Rounded
663
664-- More from Fung Lee
665-- the next four would appear to be in error, but they are misleading (the
666-- operands will be clamped to a lower exponent) and so are omitted
667-- dqqua1021 quantize  8.666666666666000E+6144  1.000000000000000E+6144 ->  8.666666666666000000000000000000000E+6144  Clamped
668-- dqqua1022 quantize -8.666666666666000E+6144  1.000000000000000E+6144 -> -8.666666666666000000000000000000000E+6144  Clamped
669-- dqqua1027 quantize 8.666666666666000E+323  1E+31    -> NaN Invalid_operation
670-- dqqua1030 quantize 8.66666666E+3           1E+3     -> 9E+3 Inexact Rounded
671
672-- Int and uInt32 edge values for testing conversions
673dqqua1040 quantize -2147483646     0 -> -2147483646
674dqqua1041 quantize -2147483647     0 -> -2147483647
675dqqua1042 quantize -2147483648     0 -> -2147483648
676dqqua1043 quantize -2147483649     0 -> -2147483649
677dqqua1044 quantize  2147483646     0 ->  2147483646
678dqqua1045 quantize  2147483647     0 ->  2147483647
679dqqua1046 quantize  2147483648     0 ->  2147483648
680dqqua1047 quantize  2147483649     0 ->  2147483649
681dqqua1048 quantize  4294967294     0 ->  4294967294
682dqqua1049 quantize  4294967295     0 ->  4294967295
683dqqua1050 quantize  4294967296     0 ->  4294967296
684dqqua1051 quantize  4294967297     0 ->  4294967297
685
686-- Rounding swathe
687rounding: half_even
688dqqua1100 quantize  1.2300    1.00    ->  1.23  Rounded
689dqqua1101 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
690dqqua1102 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
691dqqua1103 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
692dqqua1104 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
693dqqua1105 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
694dqqua1106 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
695dqqua1107 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
696dqqua1108 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
697dqqua1109 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
698
699rounding: half_up
700dqqua1200 quantize  1.2300    1.00    ->  1.23  Rounded
701dqqua1201 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
702dqqua1202 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
703dqqua1203 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
704dqqua1204 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
705dqqua1205 quantize  1.2450    1.00    ->  1.25  Inexact Rounded
706dqqua1206 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
707dqqua1207 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
708dqqua1208 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
709dqqua1209 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
710
711rounding: half_down
712dqqua1300 quantize  1.2300    1.00    ->  1.23  Rounded
713dqqua1301 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
714dqqua1302 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
715dqqua1303 quantize  1.2350    1.00    ->  1.23  Inexact Rounded
716dqqua1304 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
717dqqua1305 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
718dqqua1306 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
719dqqua1307 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
720dqqua1308 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
721dqqua1309 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
722
723rounding: up
724dqqua1400 quantize  1.2300    1.00    ->  1.23  Rounded
725dqqua1401 quantize  1.2301    1.00    ->  1.24  Inexact Rounded
726dqqua1402 quantize  1.2310    1.00    ->  1.24  Inexact Rounded
727dqqua1403 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
728dqqua1404 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
729dqqua1405 quantize  1.2450    1.00    ->  1.25  Inexact Rounded
730dqqua1406 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
731dqqua1407 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
732dqqua1408 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
733dqqua1409 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
734dqqua1411 quantize -1.2399    1.00    -> -1.24  Inexact Rounded
735
736rounding: down
737dqqua1500 quantize  1.2300    1.00    ->  1.23  Rounded
738dqqua1501 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
739dqqua1502 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
740dqqua1503 quantize  1.2350    1.00    ->  1.23  Inexact Rounded
741dqqua1504 quantize  1.2351    1.00    ->  1.23  Inexact Rounded
742dqqua1505 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
743dqqua1506 quantize  1.2451    1.00    ->  1.24  Inexact Rounded
744dqqua1507 quantize  1.2360    1.00    ->  1.23  Inexact Rounded
745dqqua1508 quantize  1.2370    1.00    ->  1.23  Inexact Rounded
746dqqua1509 quantize  1.2399    1.00    ->  1.23  Inexact Rounded
747dqqua1511 quantize -1.2399    1.00    -> -1.23  Inexact Rounded
748
749rounding: ceiling
750dqqua1600 quantize  1.2300    1.00    ->  1.23  Rounded
751dqqua1601 quantize  1.2301    1.00    ->  1.24  Inexact Rounded
752dqqua1602 quantize  1.2310    1.00    ->  1.24  Inexact Rounded
753dqqua1603 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
754dqqua1604 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
755dqqua1605 quantize  1.2450    1.00    ->  1.25  Inexact Rounded
756dqqua1606 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
757dqqua1607 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
758dqqua1608 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
759dqqua1609 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
760dqqua1611 quantize -1.2399    1.00    -> -1.23  Inexact Rounded
761
762rounding: floor
763dqqua1700 quantize  1.2300    1.00    ->  1.23  Rounded
764dqqua1701 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
765dqqua1702 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
766dqqua1703 quantize  1.2350    1.00    ->  1.23  Inexact Rounded
767dqqua1704 quantize  1.2351    1.00    ->  1.23  Inexact Rounded
768dqqua1705 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
769dqqua1706 quantize  1.2451    1.00    ->  1.24  Inexact Rounded
770dqqua1707 quantize  1.2360    1.00    ->  1.23  Inexact Rounded
771dqqua1708 quantize  1.2370    1.00    ->  1.23  Inexact Rounded
772dqqua1709 quantize  1.2399    1.00    ->  1.23  Inexact Rounded
773dqqua1711 quantize -1.2399    1.00    -> -1.24  Inexact Rounded
774
775rounding: 05up
776dqqua1800 quantize  1.2000    1.00    ->  1.20  Rounded
777dqqua1801 quantize  1.2001    1.00    ->  1.21  Inexact Rounded
778dqqua1802 quantize  1.2010    1.00    ->  1.21  Inexact Rounded
779dqqua1803 quantize  1.2050    1.00    ->  1.21  Inexact Rounded
780dqqua1804 quantize  1.2051    1.00    ->  1.21  Inexact Rounded
781dqqua1807 quantize  1.2060    1.00    ->  1.21  Inexact Rounded
782dqqua1808 quantize  1.2070    1.00    ->  1.21  Inexact Rounded
783dqqua1809 quantize  1.2099    1.00    ->  1.21  Inexact Rounded
784dqqua1811 quantize -1.2099    1.00    -> -1.21  Inexact Rounded
785
786dqqua1900 quantize  1.2100    1.00    ->  1.21  Rounded
787dqqua1901 quantize  1.2101    1.00    ->  1.21  Inexact Rounded
788dqqua1902 quantize  1.2110    1.00    ->  1.21  Inexact Rounded
789dqqua1903 quantize  1.2150    1.00    ->  1.21  Inexact Rounded
790dqqua1904 quantize  1.2151    1.00    ->  1.21  Inexact Rounded
791dqqua1907 quantize  1.2160    1.00    ->  1.21  Inexact Rounded
792dqqua1908 quantize  1.2170    1.00    ->  1.21  Inexact Rounded
793dqqua1909 quantize  1.2199    1.00    ->  1.21  Inexact Rounded
794dqqua1911 quantize -1.2199    1.00    -> -1.21  Inexact Rounded
795
796dqqua2000 quantize  1.2400    1.00    ->  1.24  Rounded
797dqqua2001 quantize  1.2401    1.00    ->  1.24  Inexact Rounded
798dqqua2002 quantize  1.2410    1.00    ->  1.24  Inexact Rounded
799dqqua2003 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
800dqqua2004 quantize  1.2451    1.00    ->  1.24  Inexact Rounded
801dqqua2007 quantize  1.2460    1.00    ->  1.24  Inexact Rounded
802dqqua2008 quantize  1.2470    1.00    ->  1.24  Inexact Rounded
803dqqua2009 quantize  1.2499    1.00    ->  1.24  Inexact Rounded
804dqqua2011 quantize -1.2499    1.00    -> -1.24  Inexact Rounded
805
806dqqua2100 quantize  1.2500    1.00    ->  1.25  Rounded
807dqqua2101 quantize  1.2501    1.00    ->  1.26  Inexact Rounded
808dqqua2102 quantize  1.2510    1.00    ->  1.26  Inexact Rounded
809dqqua2103 quantize  1.2550    1.00    ->  1.26  Inexact Rounded
810dqqua2104 quantize  1.2551    1.00    ->  1.26  Inexact Rounded
811dqqua2107 quantize  1.2560    1.00    ->  1.26  Inexact Rounded
812dqqua2108 quantize  1.2570    1.00    ->  1.26  Inexact Rounded
813dqqua2109 quantize  1.2599    1.00    ->  1.26  Inexact Rounded
814dqqua2111 quantize -1.2599    1.00    -> -1.26  Inexact Rounded
815
816dqqua2200 quantize  1.2600    1.00    ->  1.26  Rounded
817dqqua2201 quantize  1.2601    1.00    ->  1.26  Inexact Rounded
818dqqua2202 quantize  1.2610    1.00    ->  1.26  Inexact Rounded
819dqqua2203 quantize  1.2650    1.00    ->  1.26  Inexact Rounded
820dqqua2204 quantize  1.2651    1.00    ->  1.26  Inexact Rounded
821dqqua2207 quantize  1.2660    1.00    ->  1.26  Inexact Rounded
822dqqua2208 quantize  1.2670    1.00    ->  1.26  Inexact Rounded
823dqqua2209 quantize  1.2699    1.00    ->  1.26  Inexact Rounded
824dqqua2211 quantize -1.2699    1.00    -> -1.26  Inexact Rounded
825
826dqqua2300 quantize  1.2900    1.00    ->  1.29  Rounded
827dqqua2301 quantize  1.2901    1.00    ->  1.29  Inexact Rounded
828dqqua2302 quantize  1.2910    1.00    ->  1.29  Inexact Rounded
829dqqua2303 quantize  1.2950    1.00    ->  1.29  Inexact Rounded
830dqqua2304 quantize  1.2951    1.00    ->  1.29  Inexact Rounded
831dqqua2307 quantize  1.2960    1.00    ->  1.29  Inexact Rounded
832dqqua2308 quantize  1.2970    1.00    ->  1.29  Inexact Rounded
833dqqua2309 quantize  1.2999    1.00    ->  1.29  Inexact Rounded
834dqqua2311 quantize -1.2999    1.00    -> -1.29  Inexact Rounded
835
836-- Null tests
837dqqua998 quantize 10    # -> NaN Invalid_operation
838dqqua999 quantize  # 1e10 -> NaN Invalid_operation