Home | History | Annotate | Download | only in decimaltestdata
      1 ------------------------------------------------------------------------
      2 -- ddQuantize.decTest -- decDouble 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 (a] uk.ibm.com                                                   --
     19 ------------------------------------------------------------------------
     20 version: 2.59
     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 precision:   16
     27 maxExponent: 384
     28 minExponent: -383
     29 extended:    1
     30 clamp:       1
     31 rounding:    half_even
     32 
     33 -- sanity checks
     34 ddqua001 quantize 0       1e0   -> 0
     35 ddqua002 quantize 1       1e0   -> 1
     36 ddqua003 quantize 0.1    1e+2   -> 0E+2 Inexact Rounded
     37 ddqua005 quantize 0.1    1e+1   -> 0E+1 Inexact Rounded
     38 ddqua006 quantize 0.1     1e0   -> 0 Inexact Rounded
     39 ddqua007 quantize 0.1    1e-1   -> 0.1
     40 ddqua008 quantize 0.1    1e-2   -> 0.10
     41 ddqua009 quantize 0.1    1e-3   -> 0.100
     42 ddqua010 quantize 0.9    1e+2   -> 0E+2 Inexact Rounded
     43 ddqua011 quantize 0.9    1e+1   -> 0E+1 Inexact Rounded
     44 ddqua012 quantize 0.9    1e+0   -> 1 Inexact Rounded
     45 ddqua013 quantize 0.9    1e-1   -> 0.9
     46 ddqua014 quantize 0.9    1e-2   -> 0.90
     47 ddqua015 quantize 0.9    1e-3   -> 0.900
     48 -- negatives
     49 ddqua021 quantize -0      1e0   -> -0
     50 ddqua022 quantize -1      1e0   -> -1
     51 ddqua023 quantize -0.1   1e+2   -> -0E+2 Inexact Rounded
     52 ddqua025 quantize -0.1   1e+1   -> -0E+1 Inexact Rounded
     53 ddqua026 quantize -0.1    1e0   -> -0 Inexact Rounded
     54 ddqua027 quantize -0.1   1e-1   -> -0.1
     55 ddqua028 quantize -0.1   1e-2   -> -0.10
     56 ddqua029 quantize -0.1   1e-3   -> -0.100
     57 ddqua030 quantize -0.9   1e+2   -> -0E+2 Inexact Rounded
     58 ddqua031 quantize -0.9   1e+1   -> -0E+1 Inexact Rounded
     59 ddqua032 quantize -0.9   1e+0   -> -1 Inexact Rounded
     60 ddqua033 quantize -0.9   1e-1   -> -0.9
     61 ddqua034 quantize -0.9   1e-2   -> -0.90
     62 ddqua035 quantize -0.9   1e-3   -> -0.900
     63 ddqua036 quantize -0.5   1e+2   -> -0E+2 Inexact Rounded
     64 ddqua037 quantize -0.5   1e+1   -> -0E+1 Inexact Rounded
     65 ddqua038 quantize -0.5   1e+0   -> -0 Inexact Rounded
     66 ddqua039 quantize -0.5   1e-1   -> -0.5
     67 ddqua040 quantize -0.5   1e-2   -> -0.50
     68 ddqua041 quantize -0.5   1e-3   -> -0.500
     69 ddqua042 quantize -0.9   1e+2   -> -0E+2 Inexact Rounded
     70 ddqua043 quantize -0.9   1e+1   -> -0E+1 Inexact Rounded
     71 ddqua044 quantize -0.9   1e+0   -> -1 Inexact Rounded
     72 ddqua045 quantize -0.9   1e-1   -> -0.9
     73 ddqua046 quantize -0.9   1e-2   -> -0.90
     74 ddqua047 quantize -0.9   1e-3   -> -0.900
     75 
     76 -- examples from Specification
     77 ddqua060 quantize 2.17   0.001  -> 2.170
     78 ddqua061 quantize 2.17   0.01   -> 2.17
     79 ddqua062 quantize 2.17   0.1    -> 2.2 Inexact Rounded
     80 ddqua063 quantize 2.17   1e+0   -> 2 Inexact Rounded
     81 ddqua064 quantize 2.17   1e+1   -> 0E+1 Inexact Rounded
     82 ddqua065 quantize -Inf    Inf   -> -Infinity
     83 ddqua066 quantize 2       Inf   -> NaN Invalid_operation
     84 ddqua067 quantize -0.1    1     -> -0 Inexact Rounded
     85 ddqua068 quantize -0      1e+5     -> -0E+5
     86 ddqua069 quantize +123456789012345.6 1e-2 -> NaN Invalid_operation
     87 ddqua070 quantize -987654335236450.6 1e-2 -> NaN Invalid_operation
     88 ddqua071 quantize 217    1e-1   -> 217.0
     89 ddqua072 quantize 217    1e+0   -> 217
     90 ddqua073 quantize 217    1e+1   -> 2.2E+2 Inexact Rounded
     91 ddqua074 quantize 217    1e+2   -> 2E+2 Inexact Rounded
     92 
     93 -- general tests ..
     94 ddqua089 quantize 12     1e+4   -> 0E+4 Inexact Rounded
     95 ddqua090 quantize 12     1e+3   -> 0E+3 Inexact Rounded
     96 ddqua091 quantize 12     1e+2   -> 0E+2 Inexact Rounded
     97 ddqua092 quantize 12     1e+1   -> 1E+1 Inexact Rounded
     98 ddqua093 quantize 1.2345 1e-2   -> 1.23 Inexact Rounded
     99 ddqua094 quantize 1.2355 1e-2   -> 1.24 Inexact Rounded
    100 ddqua095 quantize 1.2345 1e-6   -> 1.234500
    101 ddqua096 quantize 9.9999 1e-2   -> 10.00 Inexact Rounded
    102 ddqua097 quantize 0.0001 1e-2   -> 0.00 Inexact Rounded
    103 ddqua098 quantize 0.001  1e-2   -> 0.00 Inexact Rounded
    104 ddqua099 quantize 0.009  1e-2   -> 0.01 Inexact Rounded
    105 ddqua100 quantize 92     1e+2   -> 1E+2 Inexact Rounded
    106 
    107 ddqua101 quantize -1      1e0   ->  -1
    108 ddqua102 quantize -1     1e-1   ->  -1.0
    109 ddqua103 quantize -1     1e-2   ->  -1.00
    110 ddqua104 quantize  0      1e0   ->  0
    111 ddqua105 quantize  0     1e-1   ->  0.0
    112 ddqua106 quantize  0     1e-2   ->  0.00
    113 ddqua107 quantize  0.00   1e0   ->  0
    114 ddqua108 quantize  0     1e+1   ->  0E+1
    115 ddqua109 quantize  0     1e+2   ->  0E+2
    116 ddqua110 quantize +1      1e0   ->  1
    117 ddqua111 quantize +1     1e-1   ->  1.0
    118 ddqua112 quantize +1     1e-2   ->  1.00
    119 
    120 ddqua120 quantize   1.04  1e-3 ->  1.040
    121 ddqua121 quantize   1.04  1e-2 ->  1.04
    122 ddqua122 quantize   1.04  1e-1 ->  1.0 Inexact Rounded
    123 ddqua123 quantize   1.04   1e0 ->  1 Inexact Rounded
    124 ddqua124 quantize   1.05  1e-3 ->  1.050
    125 ddqua125 quantize   1.05  1e-2 ->  1.05
    126 ddqua126 quantize   1.05  1e-1 ->  1.0 Inexact Rounded
    127 ddqua131 quantize   1.05   1e0 ->  1 Inexact Rounded
    128 ddqua132 quantize   1.06  1e-3 ->  1.060
    129 ddqua133 quantize   1.06  1e-2 ->  1.06
    130 ddqua134 quantize   1.06  1e-1 ->  1.1 Inexact Rounded
    131 ddqua135 quantize   1.06   1e0 ->  1 Inexact Rounded
    132 
    133 ddqua140 quantize   -10    1e-2  ->  -10.00
    134 ddqua141 quantize   +1     1e-2  ->  1.00
    135 ddqua142 quantize   +10    1e-2  ->  10.00
    136 ddqua143 quantize   1E+17  1e-2  ->  NaN Invalid_operation
    137 ddqua144 quantize   1E-17  1e-2  ->  0.00 Inexact Rounded
    138 ddqua145 quantize   1E-3   1e-2  ->  0.00 Inexact Rounded
    139 ddqua146 quantize   1E-2   1e-2  ->  0.01
    140 ddqua147 quantize   1E-1   1e-2  ->  0.10
    141 ddqua148 quantize   0E-17  1e-2  ->  0.00
    142 
    143 ddqua150 quantize   1.0600 1e-5 ->  1.06000
    144 ddqua151 quantize   1.0600 1e-4 ->  1.0600
    145 ddqua152 quantize   1.0600 1e-3 ->  1.060 Rounded
    146 ddqua153 quantize   1.0600 1e-2 ->  1.06 Rounded
    147 ddqua154 quantize   1.0600 1e-1 ->  1.1 Inexact Rounded
    148 ddqua155 quantize   1.0600  1e0 ->  1 Inexact Rounded
    149 
    150 -- a couple where rounding was different in base tests
    151 rounding:    half_up
    152 ddqua157 quantize -0.5   1e+0   -> -1 Inexact Rounded
    153 ddqua158 quantize   1.05  1e-1 ->  1.1 Inexact Rounded
    154 ddqua159 quantize   1.06   1e0 ->  1 Inexact Rounded
    155 rounding:    half_even
    156 
    157 -- base tests with non-1 coefficients
    158 ddqua161 quantize 0      -9e0   -> 0
    159 ddqua162 quantize 1      -7e0   -> 1
    160 ddqua163 quantize 0.1   -1e+2   -> 0E+2 Inexact Rounded
    161 ddqua165 quantize 0.1    0e+1   -> 0E+1 Inexact Rounded
    162 ddqua166 quantize 0.1     2e0   -> 0 Inexact Rounded
    163 ddqua167 quantize 0.1    3e-1   -> 0.1
    164 ddqua168 quantize 0.1   44e-2   -> 0.10
    165 ddqua169 quantize 0.1  555e-3   -> 0.100
    166 ddqua170 quantize 0.9 6666e+2   -> 0E+2 Inexact Rounded
    167 ddqua171 quantize 0.9 -777e+1   -> 0E+1 Inexact Rounded
    168 ddqua172 quantize 0.9  -88e+0   -> 1 Inexact Rounded
    169 ddqua173 quantize 0.9   -9e-1   -> 0.9
    170 ddqua174 quantize 0.9    0e-2   -> 0.90
    171 ddqua175 quantize 0.9  1.1e-3   -> 0.9000
    172 -- negatives
    173 ddqua181 quantize -0    1.1e0   -> -0.0
    174 ddqua182 quantize -1     -1e0   -> -1
    175 ddqua183 quantize -0.1  11e+2   -> -0E+2 Inexact Rounded
    176 ddqua185 quantize -0.1 111e+1   -> -0E+1 Inexact Rounded
    177 ddqua186 quantize -0.1   71e0   -> -0 Inexact Rounded
    178 ddqua187 quantize -0.1 -91e-1   -> -0.1
    179 ddqua188 quantize -0.1 -.1e-2   -> -0.100
    180 ddqua189 quantize -0.1  -1e-3   -> -0.100
    181 ddqua190 quantize -0.9   0e+2   -> -0E+2 Inexact Rounded
    182 ddqua191 quantize -0.9  -0e+1   -> -0E+1 Inexact Rounded
    183 ddqua192 quantize -0.9 -10e+0   -> -1 Inexact Rounded
    184 ddqua193 quantize -0.9 100e-1   -> -0.9
    185 ddqua194 quantize -0.9 999e-2   -> -0.90
    186 
    187 -- +ve exponents ..
    188 ddqua201 quantize   -1   1e+0 ->  -1
    189 ddqua202 quantize   -1   1e+1 ->  -0E+1 Inexact Rounded
    190 ddqua203 quantize   -1   1e+2 ->  -0E+2 Inexact Rounded
    191 ddqua204 quantize    0   1e+0 ->  0
    192 ddqua205 quantize    0   1e+1 ->  0E+1
    193 ddqua206 quantize    0   1e+2 ->  0E+2
    194 ddqua207 quantize   +1   1e+0 ->  1
    195 ddqua208 quantize   +1   1e+1 ->  0E+1 Inexact Rounded
    196 ddqua209 quantize   +1   1e+2 ->  0E+2 Inexact Rounded
    197 
    198 ddqua220 quantize   1.04 1e+3 ->  0E+3 Inexact Rounded
    199 ddqua221 quantize   1.04 1e+2 ->  0E+2 Inexact Rounded
    200 ddqua222 quantize   1.04 1e+1 ->  0E+1 Inexact Rounded
    201 ddqua223 quantize   1.04 1e+0 ->  1 Inexact Rounded
    202 ddqua224 quantize   1.05 1e+3 ->  0E+3 Inexact Rounded
    203 ddqua225 quantize   1.05 1e+2 ->  0E+2 Inexact Rounded
    204 ddqua226 quantize   1.05 1e+1 ->  0E+1 Inexact Rounded
    205 ddqua227 quantize   1.05 1e+0 ->  1 Inexact Rounded
    206 ddqua228 quantize   1.05 1e+3 ->  0E+3 Inexact Rounded
    207 ddqua229 quantize   1.05 1e+2 ->  0E+2 Inexact Rounded
    208 ddqua230 quantize   1.05 1e+1 ->  0E+1 Inexact Rounded
    209 ddqua231 quantize   1.05 1e+0 ->  1 Inexact Rounded
    210 ddqua232 quantize   1.06 1e+3 ->  0E+3 Inexact Rounded
    211 ddqua233 quantize   1.06 1e+2 ->  0E+2 Inexact Rounded
    212 ddqua234 quantize   1.06 1e+1 ->  0E+1 Inexact Rounded
    213 ddqua235 quantize   1.06 1e+0 ->  1 Inexact Rounded
    214 
    215 ddqua240 quantize   -10   1e+1  ->  -1E+1 Rounded
    216 ddqua241 quantize   +1    1e+1  ->  0E+1 Inexact Rounded
    217 ddqua242 quantize   +10   1e+1  ->  1E+1 Rounded
    218 ddqua243 quantize   1E+1  1e+1  ->  1E+1          -- underneath this is E+1
    219 ddqua244 quantize   1E+2  1e+1  ->  1.0E+2        -- underneath this is E+1
    220 ddqua245 quantize   1E+3  1e+1  ->  1.00E+3       -- underneath this is E+1
    221 ddqua246 quantize   1E+4  1e+1  ->  1.000E+4      -- underneath this is E+1
    222 ddqua247 quantize   1E+5  1e+1  ->  1.0000E+5     -- underneath this is E+1
    223 ddqua248 quantize   1E+6  1e+1  ->  1.00000E+6    -- underneath this is E+1
    224 ddqua249 quantize   1E+7  1e+1  ->  1.000000E+7   -- underneath this is E+1
    225 ddqua250 quantize   1E+8  1e+1  ->  1.0000000E+8  -- underneath this is E+1
    226 ddqua251 quantize   1E+9  1e+1  ->  1.00000000E+9 -- underneath this is E+1
    227 -- next one tries to add 9 zeros
    228 ddqua252 quantize   1E+17 1e+1  ->  NaN Invalid_operation
    229 ddqua253 quantize   1E-17 1e+1  ->  0E+1 Inexact Rounded
    230 ddqua254 quantize   1E-2  1e+1  ->  0E+1 Inexact Rounded
    231 ddqua255 quantize   0E-17 1e+1  ->  0E+1
    232 ddqua256 quantize  -0E-17 1e+1  -> -0E+1
    233 ddqua257 quantize  -0E-1  1e+1  -> -0E+1
    234 ddqua258 quantize  -0     1e+1  -> -0E+1
    235 ddqua259 quantize  -0E+1  1e+1  -> -0E+1
    236 
    237 ddqua260 quantize   -10   1e+2  ->  -0E+2 Inexact Rounded
    238 ddqua261 quantize   +1    1e+2  ->  0E+2 Inexact Rounded
    239 ddqua262 quantize   +10   1e+2  ->  0E+2 Inexact Rounded
    240 ddqua263 quantize   1E+1  1e+2  ->  0E+2 Inexact Rounded
    241 ddqua264 quantize   1E+2  1e+2  ->  1E+2
    242 ddqua265 quantize   1E+3  1e+2  ->  1.0E+3
    243 ddqua266 quantize   1E+4  1e+2  ->  1.00E+4
    244 ddqua267 quantize   1E+5  1e+2  ->  1.000E+5
    245 ddqua268 quantize   1E+6  1e+2  ->  1.0000E+6
    246 ddqua269 quantize   1E+7  1e+2  ->  1.00000E+7
    247 ddqua270 quantize   1E+8  1e+2  ->  1.000000E+8
    248 ddqua271 quantize   1E+9  1e+2  ->  1.0000000E+9
    249 ddqua272 quantize   1E+10 1e+2  ->  1.00000000E+10
    250 ddqua273 quantize   1E-10 1e+2  ->  0E+2 Inexact Rounded
    251 ddqua274 quantize   1E-2  1e+2  ->  0E+2 Inexact Rounded
    252 ddqua275 quantize   0E-10 1e+2  ->  0E+2
    253 
    254 ddqua280 quantize   -10   1e+3  ->  -0E+3 Inexact Rounded
    255 ddqua281 quantize   +1    1e+3  ->  0E+3 Inexact Rounded
    256 ddqua282 quantize   +10   1e+3  ->  0E+3 Inexact Rounded
    257 ddqua283 quantize   1E+1  1e+3  ->  0E+3 Inexact Rounded
    258 ddqua284 quantize   1E+2  1e+3  ->  0E+3 Inexact Rounded
    259 ddqua285 quantize   1E+3  1e+3  ->  1E+3
    260 ddqua286 quantize   1E+4  1e+3  ->  1.0E+4
    261 ddqua287 quantize   1E+5  1e+3  ->  1.00E+5
    262 ddqua288 quantize   1E+6  1e+3  ->  1.000E+6
    263 ddqua289 quantize   1E+7  1e+3  ->  1.0000E+7
    264 ddqua290 quantize   1E+8  1e+3  ->  1.00000E+8
    265 ddqua291 quantize   1E+9  1e+3  ->  1.000000E+9
    266 ddqua292 quantize   1E+10 1e+3  ->  1.0000000E+10
    267 ddqua293 quantize   1E-10 1e+3  ->  0E+3 Inexact Rounded
    268 ddqua294 quantize   1E-2  1e+3  ->  0E+3 Inexact Rounded
    269 ddqua295 quantize   0E-10 1e+3  ->  0E+3
    270 
    271 -- round up from below [sign wrong in JIT compiler once]
    272 ddqua300 quantize   0.0078 1e-5 ->  0.00780
    273 ddqua301 quantize   0.0078 1e-4 ->  0.0078
    274 ddqua302 quantize   0.0078 1e-3 ->  0.008 Inexact Rounded
    275 ddqua303 quantize   0.0078 1e-2 ->  0.01 Inexact Rounded
    276 ddqua304 quantize   0.0078 1e-1 ->  0.0 Inexact Rounded
    277 ddqua305 quantize   0.0078  1e0 ->  0 Inexact Rounded
    278 ddqua306 quantize   0.0078 1e+1 ->  0E+1 Inexact Rounded
    279 ddqua307 quantize   0.0078 1e+2 ->  0E+2 Inexact Rounded
    280 
    281 ddqua310 quantize  -0.0078 1e-5 -> -0.00780
    282 ddqua311 quantize  -0.0078 1e-4 -> -0.0078
    283 ddqua312 quantize  -0.0078 1e-3 -> -0.008 Inexact Rounded
    284 ddqua313 quantize  -0.0078 1e-2 -> -0.01 Inexact Rounded
    285 ddqua314 quantize  -0.0078 1e-1 -> -0.0 Inexact Rounded
    286 ddqua315 quantize  -0.0078  1e0 -> -0 Inexact Rounded
    287 ddqua316 quantize  -0.0078 1e+1 -> -0E+1 Inexact Rounded
    288 ddqua317 quantize  -0.0078 1e+2 -> -0E+2 Inexact Rounded
    289 
    290 ddqua320 quantize   0.078 1e-5 ->  0.07800
    291 ddqua321 quantize   0.078 1e-4 ->  0.0780
    292 ddqua322 quantize   0.078 1e-3 ->  0.078
    293 ddqua323 quantize   0.078 1e-2 ->  0.08 Inexact Rounded
    294 ddqua324 quantize   0.078 1e-1 ->  0.1 Inexact Rounded
    295 ddqua325 quantize   0.078  1e0 ->  0 Inexact Rounded
    296 ddqua326 quantize   0.078 1e+1 ->  0E+1 Inexact Rounded
    297 ddqua327 quantize   0.078 1e+2 ->  0E+2 Inexact Rounded
    298 
    299 ddqua330 quantize  -0.078 1e-5 -> -0.07800
    300 ddqua331 quantize  -0.078 1e-4 -> -0.0780
    301 ddqua332 quantize  -0.078 1e-3 -> -0.078
    302 ddqua333 quantize  -0.078 1e-2 -> -0.08 Inexact Rounded
    303 ddqua334 quantize  -0.078 1e-1 -> -0.1 Inexact Rounded
    304 ddqua335 quantize  -0.078  1e0 -> -0 Inexact Rounded
    305 ddqua336 quantize  -0.078 1e+1 -> -0E+1 Inexact Rounded
    306 ddqua337 quantize  -0.078 1e+2 -> -0E+2 Inexact Rounded
    307 
    308 ddqua340 quantize   0.78 1e-5 ->  0.78000
    309 ddqua341 quantize   0.78 1e-4 ->  0.7800
    310 ddqua342 quantize   0.78 1e-3 ->  0.780
    311 ddqua343 quantize   0.78 1e-2 ->  0.78
    312 ddqua344 quantize   0.78 1e-1 ->  0.8 Inexact Rounded
    313 ddqua345 quantize   0.78  1e0 ->  1 Inexact Rounded
    314 ddqua346 quantize   0.78 1e+1 ->  0E+1 Inexact Rounded
    315 ddqua347 quantize   0.78 1e+2 ->  0E+2 Inexact Rounded
    316 
    317 ddqua350 quantize  -0.78 1e-5 -> -0.78000
    318 ddqua351 quantize  -0.78 1e-4 -> -0.7800
    319 ddqua352 quantize  -0.78 1e-3 -> -0.780
    320 ddqua353 quantize  -0.78 1e-2 -> -0.78
    321 ddqua354 quantize  -0.78 1e-1 -> -0.8 Inexact Rounded
    322 ddqua355 quantize  -0.78  1e0 -> -1 Inexact Rounded
    323 ddqua356 quantize  -0.78 1e+1 -> -0E+1 Inexact Rounded
    324 ddqua357 quantize  -0.78 1e+2 -> -0E+2 Inexact Rounded
    325 
    326 ddqua360 quantize   7.8 1e-5 ->  7.80000
    327 ddqua361 quantize   7.8 1e-4 ->  7.8000
    328 ddqua362 quantize   7.8 1e-3 ->  7.800
    329 ddqua363 quantize   7.8 1e-2 ->  7.80
    330 ddqua364 quantize   7.8 1e-1 ->  7.8
    331 ddqua365 quantize   7.8  1e0 ->  8 Inexact Rounded
    332 ddqua366 quantize   7.8 1e+1 ->  1E+1 Inexact Rounded
    333 ddqua367 quantize   7.8 1e+2 ->  0E+2 Inexact Rounded
    334 ddqua368 quantize   7.8 1e+3 ->  0E+3 Inexact Rounded
    335 
    336 ddqua370 quantize  -7.8 1e-5 -> -7.80000
    337 ddqua371 quantize  -7.8 1e-4 -> -7.8000
    338 ddqua372 quantize  -7.8 1e-3 -> -7.800
    339 ddqua373 quantize  -7.8 1e-2 -> -7.80
    340 ddqua374 quantize  -7.8 1e-1 -> -7.8
    341 ddqua375 quantize  -7.8  1e0 -> -8 Inexact Rounded
    342 ddqua376 quantize  -7.8 1e+1 -> -1E+1 Inexact Rounded
    343 ddqua377 quantize  -7.8 1e+2 -> -0E+2 Inexact Rounded
    344 ddqua378 quantize  -7.8 1e+3 -> -0E+3 Inexact Rounded
    345 
    346 -- some individuals
    347 ddqua380 quantize   1234567352364.506 1e-2 -> 1234567352364.51 Inexact Rounded
    348 ddqua381 quantize   12345673523645.06 1e-2 -> 12345673523645.06
    349 ddqua382 quantize   123456735236450.6 1e-2 -> NaN Invalid_operation
    350 ddqua383 quantize   1234567352364506  1e-2 -> NaN Invalid_operation
    351 ddqua384 quantize  -1234567352364.506 1e-2 -> -1234567352364.51 Inexact Rounded
    352 ddqua385 quantize  -12345673523645.06 1e-2 -> -12345673523645.06
    353 ddqua386 quantize  -123456735236450.6 1e-2 -> NaN Invalid_operation
    354 ddqua387 quantize  -1234567352364506  1e-2 -> NaN Invalid_operation
    355 
    356 rounding: down
    357 ddqua389 quantize   123456735236450.6 1e-2 -> NaN Invalid_operation
    358 -- ? should that one instead have been:
    359 -- ddqua389 quantize   123456735236450.6 1e-2 -> NaN Invalid_operation
    360 rounding: half_up
    361 
    362 -- and a few more from e-mail discussions
    363 ddqua391 quantize  12345678912.34567  1e-3 -> 12345678912.346   Inexact Rounded
    364 ddqua392 quantize  123456789123.4567  1e-3 -> 123456789123.457  Inexact Rounded
    365 ddqua393 quantize  1234567891234.567  1e-3 -> 1234567891234.567
    366 ddqua394 quantize  12345678912345.67  1e-3 -> NaN Invalid_operation
    367 ddqua395 quantize  123456789123456.7  1e-3 -> NaN Invalid_operation
    368 ddqua396 quantize  1234567891234567.  1e-3 -> NaN Invalid_operation
    369 
    370 -- some 9999 round-up cases
    371 ddqua400 quantize   9.999        1e-5  ->  9.99900
    372 ddqua401 quantize   9.999        1e-4  ->  9.9990
    373 ddqua402 quantize   9.999        1e-3  ->  9.999
    374 ddqua403 quantize   9.999        1e-2  -> 10.00     Inexact Rounded
    375 ddqua404 quantize   9.999        1e-1  -> 10.0      Inexact Rounded
    376 ddqua405 quantize   9.999         1e0  -> 10        Inexact Rounded
    377 ddqua406 quantize   9.999         1e1  -> 1E+1      Inexact Rounded
    378 ddqua407 quantize   9.999         1e2  -> 0E+2      Inexact Rounded
    379 
    380 ddqua410 quantize   0.999        1e-5  ->  0.99900
    381 ddqua411 quantize   0.999        1e-4  ->  0.9990
    382 ddqua412 quantize   0.999        1e-3  ->  0.999
    383 ddqua413 quantize   0.999        1e-2  ->  1.00     Inexact Rounded
    384 ddqua414 quantize   0.999        1e-1  ->  1.0      Inexact Rounded
    385 ddqua415 quantize   0.999         1e0  ->  1        Inexact Rounded
    386 ddqua416 quantize   0.999         1e1  -> 0E+1      Inexact Rounded
    387 
    388 ddqua420 quantize   0.0999       1e-5  ->  0.09990
    389 ddqua421 quantize   0.0999       1e-4  ->  0.0999
    390 ddqua422 quantize   0.0999       1e-3  ->  0.100    Inexact Rounded
    391 ddqua423 quantize   0.0999       1e-2  ->  0.10     Inexact Rounded
    392 ddqua424 quantize   0.0999       1e-1  ->  0.1      Inexact Rounded
    393 ddqua425 quantize   0.0999        1e0  ->  0        Inexact Rounded
    394 ddqua426 quantize   0.0999        1e1  -> 0E+1      Inexact Rounded
    395 
    396 ddqua430 quantize   0.00999      1e-5  ->  0.00999
    397 ddqua431 quantize   0.00999      1e-4  ->  0.0100   Inexact Rounded
    398 ddqua432 quantize   0.00999      1e-3  ->  0.010    Inexact Rounded
    399 ddqua433 quantize   0.00999      1e-2  ->  0.01     Inexact Rounded
    400 ddqua434 quantize   0.00999      1e-1  ->  0.0      Inexact Rounded
    401 ddqua435 quantize   0.00999       1e0  ->  0        Inexact Rounded
    402 ddqua436 quantize   0.00999       1e1  -> 0E+1      Inexact Rounded
    403 
    404 ddqua440 quantize   0.000999     1e-5  ->  0.00100  Inexact Rounded
    405 ddqua441 quantize   0.000999     1e-4  ->  0.0010   Inexact Rounded
    406 ddqua442 quantize   0.000999     1e-3  ->  0.001    Inexact Rounded
    407 ddqua443 quantize   0.000999     1e-2  ->  0.00     Inexact Rounded
    408 ddqua444 quantize   0.000999     1e-1  ->  0.0      Inexact Rounded
    409 ddqua445 quantize   0.000999      1e0  ->  0        Inexact Rounded
    410 ddqua446 quantize   0.000999      1e1  -> 0E+1      Inexact Rounded
    411 
    412 ddqua1001 quantize  0.000        0.001 ->  0.000
    413 ddqua1002 quantize  0.001        0.001 ->  0.001
    414 ddqua1003 quantize  0.0012       0.001 ->  0.001     Inexact Rounded
    415 ddqua1004 quantize  0.0018       0.001 ->  0.002     Inexact Rounded
    416 ddqua1005 quantize  0.501        0.001 ->  0.501
    417 ddqua1006 quantize  0.5012       0.001 ->  0.501     Inexact Rounded
    418 ddqua1007 quantize  0.5018       0.001 ->  0.502     Inexact Rounded
    419 ddqua1008 quantize  0.999        0.001 ->  0.999
    420 
    421 ddqua481 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
    422 ddqua482 quantize 1234567800  1e+1 -> 1.23456780E+9 Rounded
    423 ddqua483 quantize 1234567890  1e+1 -> 1.23456789E+9 Rounded
    424 ddqua484 quantize 1234567891  1e+1 -> 1.23456789E+9 Inexact Rounded
    425 ddqua485 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
    426 ddqua486 quantize 1234567896  1e+1 -> 1.23456790E+9 Inexact Rounded
    427 -- a potential double-round
    428 ddqua487 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
    429 ddqua488 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
    430 
    431 ddqua491 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
    432 ddqua492 quantize 1234567800  1e+1 -> 1.23456780E+9 Rounded
    433 ddqua493 quantize 1234567890  1e+1 -> 1.23456789E+9 Rounded
    434 ddqua494 quantize 1234567891  1e+1 -> 1.23456789E+9 Inexact Rounded
    435 ddqua495 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
    436 ddqua496 quantize 1234567896  1e+1 -> 1.23456790E+9 Inexact Rounded
    437 ddqua497 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
    438 ddqua498 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
    439 
    440 -- Zeros
    441 ddqua500 quantize   0     1e1 ->  0E+1
    442 ddqua501 quantize   0     1e0 ->  0
    443 ddqua502 quantize   0    1e-1 ->  0.0
    444 ddqua503 quantize   0.0  1e-1 ->  0.0
    445 ddqua504 quantize   0.0   1e0 ->  0
    446 ddqua505 quantize   0.0  1e+1 ->  0E+1
    447 ddqua506 quantize   0E+1 1e-1 ->  0.0
    448 ddqua507 quantize   0E+1  1e0 ->  0
    449 ddqua508 quantize   0E+1 1e+1 ->  0E+1
    450 ddqua509 quantize  -0     1e1 -> -0E+1
    451 ddqua510 quantize  -0     1e0 -> -0
    452 ddqua511 quantize  -0    1e-1 -> -0.0
    453 ddqua512 quantize  -0.0  1e-1 -> -0.0
    454 ddqua513 quantize  -0.0   1e0 -> -0
    455 ddqua514 quantize  -0.0  1e+1 -> -0E+1
    456 ddqua515 quantize  -0E+1 1e-1 -> -0.0
    457 ddqua516 quantize  -0E+1  1e0 -> -0
    458 ddqua517 quantize  -0E+1 1e+1 -> -0E+1
    459 
    460 -- Suspicious RHS values
    461 ddqua520 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
    462 ddqua521 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
    463 ddqua522 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
    464 ddqua523 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
    465 -- next four are "won't fit" overfl
    466 ddqua526 quantize   1.234   1e-299 -> NaN Invalid_operation
    467 ddqua527 quantize 123.456   1e-299 -> NaN Invalid_operation
    468 ddqua528 quantize   1.234   1e-299 -> NaN Invalid_operation
    469 ddqua529 quantize 123.456   1e-299 -> NaN Invalid_operation
    470 
    471 ddqua532 quantize   1.234E+299    1e299 -> 1E+299    Inexact Rounded
    472 ddqua533 quantize   1.234E+298    1e299 -> 0E+299    Inexact Rounded
    473 ddqua534 quantize   1.234         1e299 -> 0E+299    Inexact Rounded
    474 ddqua537 quantize   0            1e-299 -> 0E-299
    475 -- next two are "won't fit" overflows
    476 ddqua538 quantize   1.234        1e-299 -> NaN Invalid_operation
    477 ddqua539 quantize   1.234        1e-300 -> NaN Invalid_operation
    478 -- [more below]
    479 
    480 -- Specials
    481 ddqua580 quantize  Inf    -Inf   ->  Infinity
    482 ddqua581 quantize  Inf  1e-299   ->  NaN  Invalid_operation
    483 ddqua582 quantize  Inf  1e-1     ->  NaN  Invalid_operation
    484 ddqua583 quantize  Inf   1e0     ->  NaN  Invalid_operation
    485 ddqua584 quantize  Inf   1e1     ->  NaN  Invalid_operation
    486 ddqua585 quantize  Inf   1e299   ->  NaN  Invalid_operation
    487 ddqua586 quantize  Inf     Inf   ->  Infinity
    488 ddqua587 quantize -1000    Inf   ->  NaN  Invalid_operation
    489 ddqua588 quantize -Inf     Inf   ->  -Infinity
    490 ddqua589 quantize -1       Inf   ->  NaN  Invalid_operation
    491 ddqua590 quantize  0       Inf   ->  NaN  Invalid_operation
    492 ddqua591 quantize  1       Inf   ->  NaN  Invalid_operation
    493 ddqua592 quantize  1000    Inf   ->  NaN  Invalid_operation
    494 ddqua593 quantize  Inf     Inf   ->  Infinity
    495 ddqua594 quantize  Inf  1e-0     ->  NaN  Invalid_operation
    496 ddqua595 quantize -0       Inf   ->  NaN  Invalid_operation
    497 
    498 ddqua600 quantize -Inf    -Inf   ->  -Infinity
    499 ddqua601 quantize -Inf  1e-299   ->  NaN  Invalid_operation
    500 ddqua602 quantize -Inf  1e-1     ->  NaN  Invalid_operation
    501 ddqua603 quantize -Inf   1e0     ->  NaN  Invalid_operation
    502 ddqua604 quantize -Inf   1e1     ->  NaN  Invalid_operation
    503 ddqua605 quantize -Inf   1e299   ->  NaN  Invalid_operation
    504 ddqua606 quantize -Inf     Inf   ->  -Infinity
    505 ddqua607 quantize -1000    Inf   ->  NaN  Invalid_operation
    506 ddqua608 quantize -Inf    -Inf   ->  -Infinity
    507 ddqua609 quantize -1      -Inf   ->  NaN  Invalid_operation
    508 ddqua610 quantize  0      -Inf   ->  NaN  Invalid_operation
    509 ddqua611 quantize  1      -Inf   ->  NaN  Invalid_operation
    510 ddqua612 quantize  1000   -Inf   ->  NaN  Invalid_operation
    511 ddqua613 quantize  Inf    -Inf   ->  Infinity
    512 ddqua614 quantize -Inf  1e-0     ->  NaN  Invalid_operation
    513 ddqua615 quantize -0      -Inf   ->  NaN  Invalid_operation
    514 
    515 ddqua621 quantize  NaN   -Inf    ->  NaN
    516 ddqua622 quantize  NaN 1e-299    ->  NaN
    517 ddqua623 quantize  NaN 1e-1      ->  NaN
    518 ddqua624 quantize  NaN  1e0      ->  NaN
    519 ddqua625 quantize  NaN  1e1      ->  NaN
    520 ddqua626 quantize  NaN  1e299    ->  NaN
    521 ddqua627 quantize  NaN    Inf    ->  NaN
    522 ddqua628 quantize  NaN    NaN    ->  NaN
    523 ddqua629 quantize -Inf    NaN    ->  NaN
    524 ddqua630 quantize -1000   NaN    ->  NaN
    525 ddqua631 quantize -1      NaN    ->  NaN
    526 ddqua632 quantize  0      NaN    ->  NaN
    527 ddqua633 quantize  1      NaN    ->  NaN
    528 ddqua634 quantize  1000   NaN    ->  NaN
    529 ddqua635 quantize  Inf    NaN    ->  NaN
    530 ddqua636 quantize  NaN 1e-0      ->  NaN
    531 ddqua637 quantize -0      NaN    ->  NaN
    532 
    533 ddqua641 quantize  sNaN   -Inf   ->  NaN  Invalid_operation
    534 ddqua642 quantize  sNaN 1e-299   ->  NaN  Invalid_operation
    535 ddqua643 quantize  sNaN 1e-1     ->  NaN  Invalid_operation
    536 ddqua644 quantize  sNaN  1e0     ->  NaN  Invalid_operation
    537 ddqua645 quantize  sNaN  1e1     ->  NaN  Invalid_operation
    538 ddqua646 quantize  sNaN  1e299   ->  NaN  Invalid_operation
    539 ddqua647 quantize  sNaN    NaN   ->  NaN  Invalid_operation
    540 ddqua648 quantize  sNaN   sNaN   ->  NaN  Invalid_operation
    541 ddqua649 quantize  NaN    sNaN   ->  NaN  Invalid_operation
    542 ddqua650 quantize -Inf    sNaN   ->  NaN  Invalid_operation
    543 ddqua651 quantize -1000   sNaN   ->  NaN  Invalid_operation
    544 ddqua652 quantize -1      sNaN   ->  NaN  Invalid_operation
    545 ddqua653 quantize  0      sNaN   ->  NaN  Invalid_operation
    546 ddqua654 quantize  1      sNaN   ->  NaN  Invalid_operation
    547 ddqua655 quantize  1000   sNaN   ->  NaN  Invalid_operation
    548 ddqua656 quantize  Inf    sNaN   ->  NaN  Invalid_operation
    549 ddqua657 quantize  NaN    sNaN   ->  NaN  Invalid_operation
    550 ddqua658 quantize  sNaN 1e-0     ->  NaN  Invalid_operation
    551 ddqua659 quantize -0      sNaN   ->  NaN  Invalid_operation
    552 
    553 -- propagating NaNs
    554 ddqua661 quantize  NaN9 -Inf   ->  NaN9
    555 ddqua662 quantize  NaN8  919   ->  NaN8
    556 ddqua663 quantize  NaN71 Inf   ->  NaN71
    557 ddqua664 quantize  NaN6  NaN5  ->  NaN6
    558 ddqua665 quantize -Inf   NaN4  ->  NaN4
    559 ddqua666 quantize -919   NaN31 ->  NaN31
    560 ddqua667 quantize  Inf   NaN2  ->  NaN2
    561 
    562 ddqua671 quantize  sNaN99 -Inf    ->  NaN99 Invalid_operation
    563 ddqua672 quantize  sNaN98 -11     ->  NaN98 Invalid_operation
    564 ddqua673 quantize  sNaN97  NaN    ->  NaN97 Invalid_operation
    565 ddqua674 quantize  sNaN16 sNaN94  ->  NaN16 Invalid_operation
    566 ddqua675 quantize  NaN95  sNaN93  ->  NaN93 Invalid_operation
    567 ddqua676 quantize -Inf    sNaN92  ->  NaN92 Invalid_operation
    568 ddqua677 quantize  088    sNaN91  ->  NaN91 Invalid_operation
    569 ddqua678 quantize  Inf    sNaN90  ->  NaN90 Invalid_operation
    570 ddqua679 quantize  NaN    sNaN88  ->  NaN88 Invalid_operation
    571 
    572 ddqua681 quantize -NaN9 -Inf   -> -NaN9
    573 ddqua682 quantize -NaN8  919   -> -NaN8
    574 ddqua683 quantize -NaN71 Inf   -> -NaN71
    575 ddqua684 quantize -NaN6 -NaN5  -> -NaN6
    576 ddqua685 quantize -Inf  -NaN4  -> -NaN4
    577 ddqua686 quantize -919  -NaN31 -> -NaN31
    578 ddqua687 quantize  Inf  -NaN2  -> -NaN2
    579 
    580 ddqua691 quantize -sNaN99 -Inf    -> -NaN99 Invalid_operation
    581 ddqua692 quantize -sNaN98 -11     -> -NaN98 Invalid_operation
    582 ddqua693 quantize -sNaN97  NaN    -> -NaN97 Invalid_operation
    583 ddqua694 quantize -sNaN16 sNaN94  -> -NaN16 Invalid_operation
    584 ddqua695 quantize -NaN95 -sNaN93  -> -NaN93 Invalid_operation
    585 ddqua696 quantize -Inf   -sNaN92  -> -NaN92 Invalid_operation
    586 ddqua697 quantize  088   -sNaN91  -> -NaN91 Invalid_operation
    587 ddqua698 quantize  Inf   -sNaN90  -> -NaN90 Invalid_operation
    588 ddqua699 quantize  NaN   -sNaN88  -> -NaN88 Invalid_operation
    589 
    590 -- subnormals and underflow
    591 ddqua710 quantize  1.00E-383    1e-383  ->   1E-383    Rounded
    592 ddqua711 quantize  0.1E-383    2e-384  ->   1E-384   Subnormal
    593 ddqua712 quantize  0.10E-383   3e-384  ->   1E-384   Subnormal Rounded
    594 ddqua713 quantize  0.100E-383  4e-384  ->   1E-384   Subnormal Rounded
    595 ddqua714 quantize  0.01E-383   5e-385  ->   1E-385   Subnormal
    596 -- next is rounded to Emin
    597 ddqua715 quantize  0.999E-383   1e-383  ->   1E-383    Inexact Rounded
    598 ddqua716 quantize  0.099E-383 10e-384  ->   1E-384   Inexact Rounded Subnormal
    599 
    600 ddqua717 quantize  0.009E-383  1e-385  ->   1E-385   Inexact Rounded Subnormal
    601 ddqua718 quantize  0.001E-383  1e-385  ->   0E-385   Inexact Rounded
    602 ddqua719 quantize  0.0009E-383 1e-385  ->   0E-385   Inexact Rounded
    603 ddqua720 quantize  0.0001E-383 1e-385  ->   0E-385   Inexact Rounded
    604 
    605 ddqua730 quantize -1.00E-383   1e-383  ->  -1E-383     Rounded
    606 ddqua731 quantize -0.1E-383    1e-383  ->  -0E-383     Rounded Inexact
    607 ddqua732 quantize -0.10E-383   1e-383  ->  -0E-383     Rounded Inexact
    608 ddqua733 quantize -0.100E-383  1e-383  ->  -0E-383     Rounded Inexact
    609 ddqua734 quantize -0.01E-383   1e-383  ->  -0E-383     Inexact Rounded
    610 -- next is rounded to Emin
    611 ddqua735 quantize -0.999E-383 90e-383  ->  -1E-383     Inexact Rounded
    612 ddqua736 quantize -0.099E-383 -1e-383  ->  -0E-383     Inexact Rounded
    613 ddqua737 quantize -0.009E-383 -1e-383  ->  -0E-383     Inexact Rounded
    614 ddqua738 quantize -0.001E-383 -0e-383  ->  -0E-383     Inexact Rounded
    615 ddqua739 quantize -0.0001E-383 0e-383  ->  -0E-383     Inexact Rounded
    616 
    617 ddqua740 quantize -1.00E-383   1e-384 ->  -1.0E-383   Rounded
    618 ddqua741 quantize -0.1E-383    1e-384 ->  -1E-384    Subnormal
    619 ddqua742 quantize -0.10E-383   1e-384 ->  -1E-384    Subnormal Rounded
    620 ddqua743 quantize -0.100E-383  1e-384 ->  -1E-384    Subnormal Rounded
    621 ddqua744 quantize -0.01E-383   1e-384 ->  -0E-384    Inexact Rounded
    622 -- next is rounded to Emin
    623 ddqua745 quantize -0.999E-383  1e-384 ->  -1.0E-383   Inexact Rounded
    624 ddqua746 quantize -0.099E-383  1e-384 ->  -1E-384    Inexact Rounded Subnormal
    625 ddqua747 quantize -0.009E-383  1e-384 ->  -0E-384    Inexact Rounded
    626 ddqua748 quantize -0.001E-383  1e-384 ->  -0E-384    Inexact Rounded
    627 ddqua749 quantize -0.0001E-383 1e-384 ->  -0E-384    Inexact Rounded
    628 
    629 ddqua750 quantize -1.00E-383   1e-385 ->  -1.00E-383
    630 ddqua751 quantize -0.1E-383    1e-385 ->  -1.0E-384  Subnormal
    631 ddqua752 quantize -0.10E-383   1e-385 ->  -1.0E-384  Subnormal
    632 ddqua753 quantize -0.100E-383  1e-385 ->  -1.0E-384  Subnormal Rounded
    633 ddqua754 quantize -0.01E-383   1e-385 ->  -1E-385    Subnormal
    634 -- next is rounded to Emin
    635 ddqua755 quantize -0.999E-383  1e-385 ->  -1.00E-383  Inexact Rounded
    636 ddqua756 quantize -0.099E-383  1e-385 ->  -1.0E-384  Inexact Rounded Subnormal
    637 ddqua757 quantize -0.009E-383  1e-385 ->  -1E-385    Inexact Rounded Subnormal
    638 ddqua758 quantize -0.001E-383  1e-385 ->  -0E-385    Inexact Rounded
    639 ddqua759 quantize -0.0001E-383 1e-385 ->  -0E-385    Inexact Rounded
    640 
    641 ddqua760 quantize -1.00E-383   1e-386 ->  -1.000E-383
    642 ddqua761 quantize -0.1E-383    1e-386 ->  -1.00E-384  Subnormal
    643 ddqua762 quantize -0.10E-383   1e-386 ->  -1.00E-384  Subnormal
    644 ddqua763 quantize -0.100E-383  1e-386 ->  -1.00E-384  Subnormal
    645 ddqua764 quantize -0.01E-383   1e-386 ->  -1.0E-385   Subnormal
    646 ddqua765 quantize -0.999E-383  1e-386 ->  -9.99E-384  Subnormal
    647 ddqua766 quantize -0.099E-383  1e-386 ->  -9.9E-385   Subnormal
    648 ddqua767 quantize -0.009E-383  1e-386 ->  -9E-386     Subnormal
    649 ddqua768 quantize -0.001E-383  1e-386 ->  -1E-386     Subnormal
    650 ddqua769 quantize -0.0001E-383 1e-386 ->  -0E-386     Inexact Rounded
    651 
    652 -- More from Fung Lee
    653 ddqua1021 quantize  8.666666666666000E+384  1.000000000000000E+384 ->  8.666666666666000E+384
    654 ddqua1022 quantize -8.666666666666000E+384  1.000000000000000E+384 -> -8.666666666666000E+384
    655 ddqua1027 quantize 8.666666666666000E+323  1E+31    -> NaN Invalid_operation
    656 ddqua1029 quantize 8.66666666E+3           1E+3     -> 9E+3 Inexact Rounded
    657 
    658 
    659 --ddqua1030 quantize 8.666666666666000E+384 1E+384   -> 9.000000000000000E+384 Rounded Inexact
    660 --ddqua1031 quantize 8.666666666666000E+384 1E+384   -> 8.666666666666000E+384 Rounded
    661 --ddqua1032 quantize 8.666666666666000E+384 1E+383   -> 8.666666666666000E+384 Rounded
    662 --ddqua1033 quantize 8.666666666666000E+384 1E+382   -> 8.666666666666000E+384 Rounded
    663 --ddqua1034 quantize 8.666666666666000E+384 1E+381   -> 8.666666666666000E+384 Rounded
    664 --ddqua1035 quantize 8.666666666666000E+384 1E+380   -> 8.666666666666000E+384 Rounded
    665 
    666 -- Int and uInt32 edge values for testing conversions
    667 ddqua1040 quantize -2147483646     0 -> -2147483646
    668 ddqua1041 quantize -2147483647     0 -> -2147483647
    669 ddqua1042 quantize -2147483648     0 -> -2147483648
    670 ddqua1043 quantize -2147483649     0 -> -2147483649
    671 ddqua1044 quantize  2147483646     0 ->  2147483646
    672 ddqua1045 quantize  2147483647     0 ->  2147483647
    673 ddqua1046 quantize  2147483648     0 ->  2147483648
    674 ddqua1047 quantize  2147483649     0 ->  2147483649
    675 ddqua1048 quantize  4294967294     0 ->  4294967294
    676 ddqua1049 quantize  4294967295     0 ->  4294967295
    677 ddqua1050 quantize  4294967296     0 ->  4294967296
    678 ddqua1051 quantize  4294967297     0 ->  4294967297
    679 
    680 -- Rounding swathe
    681 rounding: half_even
    682 ddqua1100 quantize  1.2300    1.00    ->  1.23  Rounded
    683 ddqua1101 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
    684 ddqua1102 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
    685 ddqua1103 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
    686 ddqua1104 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
    687 ddqua1105 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
    688 ddqua1106 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
    689 ddqua1107 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
    690 ddqua1108 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
    691 ddqua1109 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
    692 
    693 rounding: half_up
    694 ddqua1200 quantize  1.2300    1.00    ->  1.23  Rounded
    695 ddqua1201 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
    696 ddqua1202 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
    697 ddqua1203 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
    698 ddqua1204 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
    699 ddqua1205 quantize  1.2450    1.00    ->  1.25  Inexact Rounded
    700 ddqua1206 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
    701 ddqua1207 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
    702 ddqua1208 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
    703 ddqua1209 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
    704 
    705 rounding: half_down
    706 ddqua1300 quantize  1.2300    1.00    ->  1.23  Rounded
    707 ddqua1301 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
    708 ddqua1302 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
    709 ddqua1303 quantize  1.2350    1.00    ->  1.23  Inexact Rounded
    710 ddqua1304 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
    711 ddqua1305 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
    712 ddqua1306 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
    713 ddqua1307 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
    714 ddqua1308 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
    715 ddqua1309 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
    716 
    717 rounding: up
    718 ddqua1400 quantize  1.2300    1.00    ->  1.23  Rounded
    719 ddqua1401 quantize  1.2301    1.00    ->  1.24  Inexact Rounded
    720 ddqua1402 quantize  1.2310    1.00    ->  1.24  Inexact Rounded
    721 ddqua1403 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
    722 ddqua1404 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
    723 ddqua1405 quantize  1.2450    1.00    ->  1.25  Inexact Rounded
    724 ddqua1406 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
    725 ddqua1407 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
    726 ddqua1408 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
    727 ddqua1409 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
    728 ddqua1411 quantize -1.2399    1.00    -> -1.24  Inexact Rounded
    729 
    730 rounding: down
    731 ddqua1500 quantize  1.2300    1.00    ->  1.23  Rounded
    732 ddqua1501 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
    733 ddqua1502 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
    734 ddqua1503 quantize  1.2350    1.00    ->  1.23  Inexact Rounded
    735 ddqua1504 quantize  1.2351    1.00    ->  1.23  Inexact Rounded
    736 ddqua1505 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
    737 ddqua1506 quantize  1.2451    1.00    ->  1.24  Inexact Rounded
    738 ddqua1507 quantize  1.2360    1.00    ->  1.23  Inexact Rounded
    739 ddqua1508 quantize  1.2370    1.00    ->  1.23  Inexact Rounded
    740 ddqua1509 quantize  1.2399    1.00    ->  1.23  Inexact Rounded
    741 ddqua1511 quantize -1.2399    1.00    -> -1.23  Inexact Rounded
    742 
    743 rounding: ceiling
    744 ddqua1600 quantize  1.2300    1.00    ->  1.23  Rounded
    745 ddqua1601 quantize  1.2301    1.00    ->  1.24  Inexact Rounded
    746 ddqua1602 quantize  1.2310    1.00    ->  1.24  Inexact Rounded
    747 ddqua1603 quantize  1.2350    1.00    ->  1.24  Inexact Rounded
    748 ddqua1604 quantize  1.2351    1.00    ->  1.24  Inexact Rounded
    749 ddqua1605 quantize  1.2450    1.00    ->  1.25  Inexact Rounded
    750 ddqua1606 quantize  1.2451    1.00    ->  1.25  Inexact Rounded
    751 ddqua1607 quantize  1.2360    1.00    ->  1.24  Inexact Rounded
    752 ddqua1608 quantize  1.2370    1.00    ->  1.24  Inexact Rounded
    753 ddqua1609 quantize  1.2399    1.00    ->  1.24  Inexact Rounded
    754 ddqua1611 quantize -1.2399    1.00    -> -1.23  Inexact Rounded
    755 
    756 rounding: floor
    757 ddqua1700 quantize  1.2300    1.00    ->  1.23  Rounded
    758 ddqua1701 quantize  1.2301    1.00    ->  1.23  Inexact Rounded
    759 ddqua1702 quantize  1.2310    1.00    ->  1.23  Inexact Rounded
    760 ddqua1703 quantize  1.2350    1.00    ->  1.23  Inexact Rounded
    761 ddqua1704 quantize  1.2351    1.00    ->  1.23  Inexact Rounded
    762 ddqua1705 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
    763 ddqua1706 quantize  1.2451    1.00    ->  1.24  Inexact Rounded
    764 ddqua1707 quantize  1.2360    1.00    ->  1.23  Inexact Rounded
    765 ddqua1708 quantize  1.2370    1.00    ->  1.23  Inexact Rounded
    766 ddqua1709 quantize  1.2399    1.00    ->  1.23  Inexact Rounded
    767 ddqua1711 quantize -1.2399    1.00    -> -1.24  Inexact Rounded
    768 
    769 rounding: 05up
    770 ddqua1800 quantize  1.2000    1.00    ->  1.20  Rounded
    771 ddqua1801 quantize  1.2001    1.00    ->  1.21  Inexact Rounded
    772 ddqua1802 quantize  1.2010    1.00    ->  1.21  Inexact Rounded
    773 ddqua1803 quantize  1.2050    1.00    ->  1.21  Inexact Rounded
    774 ddqua1804 quantize  1.2051    1.00    ->  1.21  Inexact Rounded
    775 ddqua1807 quantize  1.2060    1.00    ->  1.21  Inexact Rounded
    776 ddqua1808 quantize  1.2070    1.00    ->  1.21  Inexact Rounded
    777 ddqua1809 quantize  1.2099    1.00    ->  1.21  Inexact Rounded
    778 ddqua1811 quantize -1.2099    1.00    -> -1.21  Inexact Rounded
    779 
    780 ddqua1900 quantize  1.2100    1.00    ->  1.21  Rounded
    781 ddqua1901 quantize  1.2101    1.00    ->  1.21  Inexact Rounded
    782 ddqua1902 quantize  1.2110    1.00    ->  1.21  Inexact Rounded
    783 ddqua1903 quantize  1.2150    1.00    ->  1.21  Inexact Rounded
    784 ddqua1904 quantize  1.2151    1.00    ->  1.21  Inexact Rounded
    785 ddqua1907 quantize  1.2160    1.00    ->  1.21  Inexact Rounded
    786 ddqua1908 quantize  1.2170    1.00    ->  1.21  Inexact Rounded
    787 ddqua1909 quantize  1.2199    1.00    ->  1.21  Inexact Rounded
    788 ddqua1911 quantize -1.2199    1.00    -> -1.21  Inexact Rounded
    789 
    790 ddqua2000 quantize  1.2400    1.00    ->  1.24  Rounded
    791 ddqua2001 quantize  1.2401    1.00    ->  1.24  Inexact Rounded
    792 ddqua2002 quantize  1.2410    1.00    ->  1.24  Inexact Rounded
    793 ddqua2003 quantize  1.2450    1.00    ->  1.24  Inexact Rounded
    794 ddqua2004 quantize  1.2451    1.00    ->  1.24  Inexact Rounded
    795 ddqua2007 quantize  1.2460    1.00    ->  1.24  Inexact Rounded
    796 ddqua2008 quantize  1.2470    1.00    ->  1.24  Inexact Rounded
    797 ddqua2009 quantize  1.2499    1.00    ->  1.24  Inexact Rounded
    798 ddqua2011 quantize -1.2499    1.00    -> -1.24  Inexact Rounded
    799 
    800 ddqua2100 quantize  1.2500    1.00    ->  1.25  Rounded
    801 ddqua2101 quantize  1.2501    1.00    ->  1.26  Inexact Rounded
    802 ddqua2102 quantize  1.2510    1.00    ->  1.26  Inexact Rounded
    803 ddqua2103 quantize  1.2550    1.00    ->  1.26  Inexact Rounded
    804 ddqua2104 quantize  1.2551    1.00    ->  1.26  Inexact Rounded
    805 ddqua2107 quantize  1.2560    1.00    ->  1.26  Inexact Rounded
    806 ddqua2108 quantize  1.2570    1.00    ->  1.26  Inexact Rounded
    807 ddqua2109 quantize  1.2599    1.00    ->  1.26  Inexact Rounded
    808 ddqua2111 quantize -1.2599    1.00    -> -1.26  Inexact Rounded
    809 
    810 ddqua2200 quantize  1.2600    1.00    ->  1.26  Rounded
    811 ddqua2201 quantize  1.2601    1.00    ->  1.26  Inexact Rounded
    812 ddqua2202 quantize  1.2610    1.00    ->  1.26  Inexact Rounded
    813 ddqua2203 quantize  1.2650    1.00    ->  1.26  Inexact Rounded
    814 ddqua2204 quantize  1.2651    1.00    ->  1.26  Inexact Rounded
    815 ddqua2207 quantize  1.2660    1.00    ->  1.26  Inexact Rounded
    816 ddqua2208 quantize  1.2670    1.00    ->  1.26  Inexact Rounded
    817 ddqua2209 quantize  1.2699    1.00    ->  1.26  Inexact Rounded
    818 ddqua2211 quantize -1.2699    1.00    -> -1.26  Inexact Rounded
    819 
    820 ddqua2300 quantize  1.2900    1.00    ->  1.29  Rounded
    821 ddqua2301 quantize  1.2901    1.00    ->  1.29  Inexact Rounded
    822 ddqua2302 quantize  1.2910    1.00    ->  1.29  Inexact Rounded
    823 ddqua2303 quantize  1.2950    1.00    ->  1.29  Inexact Rounded
    824 ddqua2304 quantize  1.2951    1.00    ->  1.29  Inexact Rounded
    825 ddqua2307 quantize  1.2960    1.00    ->  1.29  Inexact Rounded
    826 ddqua2308 quantize  1.2970    1.00    ->  1.29  Inexact Rounded
    827 ddqua2309 quantize  1.2999    1.00    ->  1.29  Inexact Rounded
    828 ddqua2311 quantize -1.2999    1.00    -> -1.29  Inexact Rounded
    829 
    830 -- Null tests
    831 rounding:    half_even
    832 ddqua998 quantize 10    # -> NaN Invalid_operation
    833 ddqua999 quantize  # 1e10 -> NaN Invalid_operation
    834