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