Home | History | Annotate | Download | only in decimaltestdata
      1 ------------------------------------------------------------------------
      2 -- dsBase.decTest -- base decSingle <--> string conversions           --
      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 -- This file tests base conversions from string to a decimal number
     23 -- and back to a string (in Scientific form)
     24 
     25 -- Note that unlike other operations the operand is subject to rounding
     26 -- to conform to emax and precision settings (that is, numbers will
     27 -- conform to rules and exponent will be in permitted range).  The
     28 -- 'left hand side', therefore, may have numbers that cannot be
     29 -- represented in a decSingle.  Some testcases go to the limit of the
     30 -- next-wider format, and hence these testcases may also be used to
     31 -- test narrowing and widening operations.
     32 
     33 extended:    1
     34 clamp:       1
     35 precision:   7
     36 maxExponent: 96
     37 minExponent: -95
     38 rounding:    half_even
     39 
     40 dsbas001 toSci       0 -> 0
     41 dsbas002 toSci       1 -> 1
     42 dsbas003 toSci     1.0 -> 1.0
     43 dsbas004 toSci    1.00 -> 1.00
     44 dsbas005 toSci      10 -> 10
     45 dsbas006 toSci    1000 -> 1000
     46 dsbas007 toSci    10.0 -> 10.0
     47 dsbas008 toSci    10.1 -> 10.1
     48 dsbas009 toSci    10.4 -> 10.4
     49 dsbas010 toSci    10.5 -> 10.5
     50 dsbas011 toSci    10.6 -> 10.6
     51 dsbas012 toSci    10.9 -> 10.9
     52 dsbas013 toSci    11.0 -> 11.0
     53 dsbas014 toSci  1.234 -> 1.234
     54 dsbas015 toSci  0.123 -> 0.123
     55 dsbas016 toSci  0.012 -> 0.012
     56 dsbas017 toSci  -0    -> -0
     57 dsbas018 toSci  -0.0  -> -0.0
     58 dsbas019 toSci -00.00 -> -0.00
     59 
     60 dsbas021 toSci     -1 -> -1
     61 dsbas022 toSci   -1.0 -> -1.0
     62 dsbas023 toSci   -0.1 -> -0.1
     63 dsbas024 toSci   -9.1 -> -9.1
     64 dsbas025 toSci   -9.11 -> -9.11
     65 dsbas026 toSci   -9.119 -> -9.119
     66 dsbas027 toSci   -9.999 -> -9.999
     67 
     68 dsbas030 toSci  '1234.567'   -> '1234.567'
     69 dsbas031 toSci  '1234.000'   -> '1234.000'
     70 dsbas032 toSci   '1234912'   -> '1234912'
     71 dsbas033 toSci   '0.00001234567'   -> '0.00001234567'
     72 dsbas034 toSci  '0.000001234567'   -> '0.000001234567'
     73 dsbas035 toSci '0.0000001234567'   -> '1.234567E-7'
     74 dsbas036 toSci '0.00000001234567'  -> '1.234567E-8'
     75 
     76 dsbas037 toSci '0.1234564'   -> '0.1234564'
     77 dsbas038 toSci '0.1234565'   -> '0.1234565'
     78 
     79 -- test finite bounds (Negs of, then 0, Ntiny, Nmin, other, Nmax)
     80 dsbsn001 toSci -9.999999E+96 -> -9.999999E+96
     81 dsbsn002 toSci -1E-95 -> -1E-95
     82 dsbsn003 toSci -1E-101 -> -1E-101 Subnormal
     83 dsbsn004 toSci -0 -> -0
     84 dsbsn005 toSci +0 ->  0
     85 dsbsn006 toSci +1E-101 ->  1E-101 Subnormal
     86 dsbsn007 toSci +1E-95 ->  1E-95
     87 dsbsn008 toSci +9.999999E+96 ->  9.999999E+96
     88 
     89 -- String [many more examples are implicitly tested elsewhere]
     90 -- strings without E cannot generate E in result
     91 dsbas040 toSci "12"        -> '12'
     92 dsbas041 toSci "-76"       -> '-76'
     93 dsbas042 toSci "12.76"     -> '12.76'
     94 dsbas043 toSci "+12.76"    -> '12.76'
     95 dsbas044 toSci "012.76"    -> '12.76'
     96 dsbas045 toSci "+0.003"    -> '0.003'
     97 dsbas046 toSci "17."       -> '17'
     98 dsbas047 toSci ".5"        -> '0.5'
     99 dsbas048 toSci "044"       -> '44'
    100 dsbas049 toSci "0044"      -> '44'
    101 dsbas050 toSci "0.0005"      -> '0.0005'
    102 dsbas051 toSci "00.00005"    -> '0.00005'
    103 dsbas052 toSci "0.000005"    -> '0.000005'
    104 dsbas053 toSci "0.0000050"   -> '0.0000050'
    105 dsbas054 toSci "0.0000005"   -> '5E-7'
    106 dsbas055 toSci "0.00000005"  -> '5E-8'
    107 dsbas056 toSci "12678.54" -> '12678.54'
    108 dsbas057 toSci "2678.543" -> '2678.543'
    109 dsbas058 toSci "345678.5" -> '345678.5'
    110 dsbas059 toSci "0678.5432" -> '678.5432'
    111 dsbas060 toSci "678.5432" -> '678.5432'
    112 dsbas061 toSci "+678.5432" -> '678.5432'
    113 dsbas062 toSci "+0678.5432" -> '678.5432'
    114 dsbas063 toSci "+00678.5432" -> '678.5432'
    115 dsbas064 toSci "-678.5432"  -> '-678.5432'
    116 dsbas065 toSci "-0678.5432"  -> '-678.5432'
    117 dsbas066 toSci "-00678.5432"  -> '-678.5432'
    118 -- examples
    119 dsbas067 toSci "5E-6"        -> '0.000005'
    120 dsbas068 toSci "50E-7"       -> '0.0000050'
    121 dsbas069 toSci "5E-7"        -> '5E-7'
    122 
    123 -- [No exotics as no Unicode]
    124 
    125 -- rounded with dots in all (including edge) places
    126 dsbas071 toSci  .1234567890123456  -> 0.1234568 Inexact Rounded
    127 dsbas072 toSci  1.234567890123456  -> 1.234568 Inexact Rounded
    128 dsbas073 toSci  12.34567890123456  -> 12.34568 Inexact Rounded
    129 dsbas074 toSci  123.4567890123456  -> 123.4568 Inexact Rounded
    130 dsbas075 toSci  1234.567890123456  -> 1234.568 Inexact Rounded
    131 dsbas076 toSci  12345.67890123456  -> 12345.68 Inexact Rounded
    132 dsbas077 toSci  123456.7890123456  -> 123456.8 Inexact Rounded
    133 dsbas078 toSci  1234567.890123456  -> 1234568  Inexact Rounded
    134 dsbas079 toSci  12345678.90123456  -> 1.234568E+7 Inexact Rounded
    135 dsbas080 toSci  123456789.0123456  -> 1.234568E+8 Inexact Rounded
    136 dsbas081 toSci  1234567890.123456  -> 1.234568E+9 Inexact Rounded
    137 dsbas082 toSci  12345678901.23456  -> 1.234568E+10 Inexact Rounded
    138 dsbas083 toSci  123456789012.3456  -> 1.234568E+11 Inexact Rounded
    139 dsbas084 toSci  1234567890123.456  -> 1.234568E+12 Inexact Rounded
    140 dsbas085 toSci  12345678901234.56  -> 1.234568E+13 Inexact Rounded
    141 dsbas086 toSci  123456789012345.6  -> 1.234568E+14 Inexact Rounded
    142 dsbas087 toSci  1234567890123456.  -> 1.234568E+15 Inexact Rounded
    143 dsbas088 toSci  1234567890123456   -> 1.234568E+15 Inexact Rounded
    144 
    145 -- Numbers with E
    146 dsbas130 toSci "0.000E-1"  -> '0.0000'
    147 dsbas131 toSci "0.000E-2"  -> '0.00000'
    148 dsbas132 toSci "0.000E-3"  -> '0.000000'
    149 dsbas133 toSci "0.000E-4"  -> '0E-7'
    150 dsbas134 toSci "0.00E-2"   -> '0.0000'
    151 dsbas135 toSci "0.00E-3"   -> '0.00000'
    152 dsbas136 toSci "0.00E-4"   -> '0.000000'
    153 dsbas137 toSci "0.00E-5"   -> '0E-7'
    154 dsbas138 toSci "+0E+9"     -> '0E+9'
    155 dsbas139 toSci "-0E+9"     -> '-0E+9'
    156 dsbas140 toSci "1E+9"      -> '1E+9'
    157 dsbas141 toSci "1e+09"     -> '1E+9'
    158 dsbas142 toSci "1E+90"     -> '1E+90'
    159 dsbas143 toSci "+1E+009"   -> '1E+9'
    160 dsbas144 toSci "0E+9"      -> '0E+9'
    161 dsbas145 toSci "1E+9"      -> '1E+9'
    162 dsbas146 toSci "1E+09"     -> '1E+9'
    163 dsbas147 toSci "1e+90"     -> '1E+90'
    164 dsbas148 toSci "1E+009"    -> '1E+9'
    165 dsbas149 toSci "000E+9"    -> '0E+9'
    166 dsbas150 toSci "1E9"       -> '1E+9'
    167 dsbas151 toSci "1e09"      -> '1E+9'
    168 dsbas152 toSci "1E90"      -> '1E+90'
    169 dsbas153 toSci "1E009"     -> '1E+9'
    170 dsbas154 toSci "0E9"       -> '0E+9'
    171 dsbas155 toSci "0.000e+0"  -> '0.000'
    172 dsbas156 toSci "0.000E-1"  -> '0.0000'
    173 dsbas157 toSci "4E+9"      -> '4E+9'
    174 dsbas158 toSci "44E+9"     -> '4.4E+10'
    175 dsbas159 toSci "0.73e-7"   -> '7.3E-8'
    176 dsbas160 toSci "00E+9"     -> '0E+9'
    177 dsbas161 toSci "00E-9"     -> '0E-9'
    178 dsbas162 toSci "10E+9"     -> '1.0E+10'
    179 dsbas163 toSci "10E+09"    -> '1.0E+10'
    180 dsbas164 toSci "10e+90"    -> '1.0E+91'
    181 dsbas165 toSci "10E+009"   -> '1.0E+10'
    182 dsbas166 toSci "100e+9"    -> '1.00E+11'
    183 dsbas167 toSci "100e+09"   -> '1.00E+11'
    184 dsbas168 toSci "100E+90"   -> '1.00E+92'
    185 dsbas169 toSci "100e+009"  -> '1.00E+11'
    186 
    187 dsbas170 toSci "1.265"     -> '1.265'
    188 dsbas171 toSci "1.265E-20" -> '1.265E-20'
    189 dsbas172 toSci "1.265E-8"  -> '1.265E-8'
    190 dsbas173 toSci "1.265E-4"  -> '0.0001265'
    191 dsbas174 toSci "1.265E-3"  -> '0.001265'
    192 dsbas175 toSci "1.265E-2"  -> '0.01265'
    193 dsbas176 toSci "1.265E-1"  -> '0.1265'
    194 dsbas177 toSci "1.265E-0"  -> '1.265'
    195 dsbas178 toSci "1.265E+1"  -> '12.65'
    196 dsbas179 toSci "1.265E+2"  -> '126.5'
    197 dsbas180 toSci "1.265E+3"  -> '1265'
    198 dsbas181 toSci "1.265E+4"  -> '1.265E+4'
    199 dsbas182 toSci "1.265E+8"  -> '1.265E+8'
    200 dsbas183 toSci "1.265E+20" -> '1.265E+20'
    201 
    202 dsbas190 toSci "12.65"     -> '12.65'
    203 dsbas191 toSci "12.65E-20" -> '1.265E-19'
    204 dsbas192 toSci "12.65E-8"  -> '1.265E-7'
    205 dsbas193 toSci "12.65E-4"  -> '0.001265'
    206 dsbas194 toSci "12.65E-3"  -> '0.01265'
    207 dsbas195 toSci "12.65E-2"  -> '0.1265'
    208 dsbas196 toSci "12.65E-1"  -> '1.265'
    209 dsbas197 toSci "12.65E-0"  -> '12.65'
    210 dsbas198 toSci "12.65E+1"  -> '126.5'
    211 dsbas199 toSci "12.65E+2"  -> '1265'
    212 dsbas200 toSci "12.65E+3"  -> '1.265E+4'
    213 dsbas201 toSci "12.65E+4"  -> '1.265E+5'
    214 dsbas202 toSci "12.65E+8"  -> '1.265E+9'
    215 dsbas203 toSci "12.65E+20" -> '1.265E+21'
    216 
    217 dsbas210 toSci "126.5"     -> '126.5'
    218 dsbas211 toSci "126.5E-20" -> '1.265E-18'
    219 dsbas212 toSci "126.5E-8"  -> '0.000001265'
    220 dsbas213 toSci "126.5E-4"  -> '0.01265'
    221 dsbas214 toSci "126.5E-3"  -> '0.1265'
    222 dsbas215 toSci "126.5E-2"  -> '1.265'
    223 dsbas216 toSci "126.5E-1"  -> '12.65'
    224 dsbas217 toSci "126.5E-0"  -> '126.5'
    225 dsbas218 toSci "126.5E+1"  -> '1265'
    226 dsbas219 toSci "126.5E+2"  -> '1.265E+4'
    227 dsbas220 toSci "126.5E+3"  -> '1.265E+5'
    228 dsbas221 toSci "126.5E+4"  -> '1.265E+6'
    229 dsbas222 toSci "126.5E+8"  -> '1.265E+10'
    230 dsbas223 toSci "126.5E+20" -> '1.265E+22'
    231 
    232 dsbas230 toSci "1265"     -> '1265'
    233 dsbas231 toSci "1265E-20" -> '1.265E-17'
    234 dsbas232 toSci "1265E-8"  -> '0.00001265'
    235 dsbas233 toSci "1265E-4"  -> '0.1265'
    236 dsbas234 toSci "1265E-3"  -> '1.265'
    237 dsbas235 toSci "1265E-2"  -> '12.65'
    238 dsbas236 toSci "1265E-1"  -> '126.5'
    239 dsbas237 toSci "1265E-0"  -> '1265'
    240 dsbas238 toSci "1265E+1"  -> '1.265E+4'
    241 dsbas239 toSci "1265E+2"  -> '1.265E+5'
    242 dsbas240 toSci "1265E+3"  -> '1.265E+6'
    243 dsbas241 toSci "1265E+4"  -> '1.265E+7'
    244 dsbas242 toSci "1265E+8"  -> '1.265E+11'
    245 dsbas243 toSci "1265E+20" -> '1.265E+23'
    246 
    247 dsbas250 toSci "0.1265"     -> '0.1265'
    248 dsbas251 toSci "0.1265E-20" -> '1.265E-21'
    249 dsbas252 toSci "0.1265E-8"  -> '1.265E-9'
    250 dsbas253 toSci "0.1265E-4"  -> '0.00001265'
    251 dsbas254 toSci "0.1265E-3"  -> '0.0001265'
    252 dsbas255 toSci "0.1265E-2"  -> '0.001265'
    253 dsbas256 toSci "0.1265E-1"  -> '0.01265'
    254 dsbas257 toSci "0.1265E-0"  -> '0.1265'
    255 dsbas258 toSci "0.1265E+1"  -> '1.265'
    256 dsbas259 toSci "0.1265E+2"  -> '12.65'
    257 dsbas260 toSci "0.1265E+3"  -> '126.5'
    258 dsbas261 toSci "0.1265E+4"  -> '1265'
    259 dsbas262 toSci "0.1265E+8"  -> '1.265E+7'
    260 dsbas263 toSci "0.1265E+20" -> '1.265E+19'
    261 
    262 -- some more negative zeros [systematic tests below]
    263 dsbas290 toSci "-0.000E-1"  -> '-0.0000'
    264 dsbas291 toSci "-0.000E-2"  -> '-0.00000'
    265 dsbas292 toSci "-0.000E-3"  -> '-0.000000'
    266 dsbas293 toSci "-0.000E-4"  -> '-0E-7'
    267 dsbas294 toSci "-0.00E-2"   -> '-0.0000'
    268 dsbas295 toSci "-0.00E-3"   -> '-0.00000'
    269 dsbas296 toSci "-0.0E-2"    -> '-0.000'
    270 dsbas297 toSci "-0.0E-3"    -> '-0.0000'
    271 dsbas298 toSci "-0E-2"      -> '-0.00'
    272 dsbas299 toSci "-0E-3"      -> '-0.000'
    273 
    274 -- Engineering notation tests
    275 dsbas301  toSci 10e12  -> 1.0E+13
    276 dsbas302  toEng 10e12  -> 10E+12
    277 dsbas303  toSci 10e11  -> 1.0E+12
    278 dsbas304  toEng 10e11  -> 1.0E+12
    279 dsbas305  toSci 10e10  -> 1.0E+11
    280 dsbas306  toEng 10e10  -> 100E+9
    281 dsbas307  toSci 10e9   -> 1.0E+10
    282 dsbas308  toEng 10e9   -> 10E+9
    283 dsbas309  toSci 10e8   -> 1.0E+9
    284 dsbas310  toEng 10e8   -> 1.0E+9
    285 dsbas311  toSci 10e7   -> 1.0E+8
    286 dsbas312  toEng 10e7   -> 100E+6
    287 dsbas313  toSci 10e6   -> 1.0E+7
    288 dsbas314  toEng 10e6   -> 10E+6
    289 dsbas315  toSci 10e5   -> 1.0E+6
    290 dsbas316  toEng 10e5   -> 1.0E+6
    291 dsbas317  toSci 10e4   -> 1.0E+5
    292 dsbas318  toEng 10e4   -> 100E+3
    293 dsbas319  toSci 10e3   -> 1.0E+4
    294 dsbas320  toEng 10e3   -> 10E+3
    295 dsbas321  toSci 10e2   -> 1.0E+3
    296 dsbas322  toEng 10e2   -> 1.0E+3
    297 dsbas323  toSci 10e1   -> 1.0E+2
    298 dsbas324  toEng 10e1   -> 100
    299 dsbas325  toSci 10e0   -> 10
    300 dsbas326  toEng 10e0   -> 10
    301 dsbas327  toSci 10e-1  -> 1.0
    302 dsbas328  toEng 10e-1  -> 1.0
    303 dsbas329  toSci 10e-2  -> 0.10
    304 dsbas330  toEng 10e-2  -> 0.10
    305 dsbas331  toSci 10e-3  -> 0.010
    306 dsbas332  toEng 10e-3  -> 0.010
    307 dsbas333  toSci 10e-4  -> 0.0010
    308 dsbas334  toEng 10e-4  -> 0.0010
    309 dsbas335  toSci 10e-5  -> 0.00010
    310 dsbas336  toEng 10e-5  -> 0.00010
    311 dsbas337  toSci 10e-6  -> 0.000010
    312 dsbas338  toEng 10e-6  -> 0.000010
    313 dsbas339  toSci 10e-7  -> 0.0000010
    314 dsbas340  toEng 10e-7  -> 0.0000010
    315 dsbas341  toSci 10e-8  -> 1.0E-7
    316 dsbas342  toEng 10e-8  -> 100E-9
    317 dsbas343  toSci 10e-9  -> 1.0E-8
    318 dsbas344  toEng 10e-9  -> 10E-9
    319 dsbas345  toSci 10e-10 -> 1.0E-9
    320 dsbas346  toEng 10e-10 -> 1.0E-9
    321 dsbas347  toSci 10e-11 -> 1.0E-10
    322 dsbas348  toEng 10e-11 -> 100E-12
    323 dsbas349  toSci 10e-12 -> 1.0E-11
    324 dsbas350  toEng 10e-12 -> 10E-12
    325 dsbas351  toSci 10e-13 -> 1.0E-12
    326 dsbas352  toEng 10e-13 -> 1.0E-12
    327 
    328 dsbas361  toSci 7E12  -> 7E+12
    329 dsbas362  toEng 7E12  -> 7E+12
    330 dsbas363  toSci 7E11  -> 7E+11
    331 dsbas364  toEng 7E11  -> 700E+9
    332 dsbas365  toSci 7E10  -> 7E+10
    333 dsbas366  toEng 7E10  -> 70E+9
    334 dsbas367  toSci 7E9   -> 7E+9
    335 dsbas368  toEng 7E9   -> 7E+9
    336 dsbas369  toSci 7E8   -> 7E+8
    337 dsbas370  toEng 7E8   -> 700E+6
    338 dsbas371  toSci 7E7   -> 7E+7
    339 dsbas372  toEng 7E7   -> 70E+6
    340 dsbas373  toSci 7E6   -> 7E+6
    341 dsbas374  toEng 7E6   -> 7E+6
    342 dsbas375  toSci 7E5   -> 7E+5
    343 dsbas376  toEng 7E5   -> 700E+3
    344 dsbas377  toSci 7E4   -> 7E+4
    345 dsbas378  toEng 7E4   -> 70E+3
    346 dsbas379  toSci 7E3   -> 7E+3
    347 dsbas380  toEng 7E3   -> 7E+3
    348 dsbas381  toSci 7E2   -> 7E+2
    349 dsbas382  toEng 7E2   -> 700
    350 dsbas383  toSci 7E1   -> 7E+1
    351 dsbas384  toEng 7E1   -> 70
    352 dsbas385  toSci 7E0   -> 7
    353 dsbas386  toEng 7E0   -> 7
    354 dsbas387  toSci 7E-1  -> 0.7
    355 dsbas388  toEng 7E-1  -> 0.7
    356 dsbas389  toSci 7E-2  -> 0.07
    357 dsbas390  toEng 7E-2  -> 0.07
    358 dsbas391  toSci 7E-3  -> 0.007
    359 dsbas392  toEng 7E-3  -> 0.007
    360 dsbas393  toSci 7E-4  -> 0.0007
    361 dsbas394  toEng 7E-4  -> 0.0007
    362 dsbas395  toSci 7E-5  -> 0.00007
    363 dsbas396  toEng 7E-5  -> 0.00007
    364 dsbas397  toSci 7E-6  -> 0.000007
    365 dsbas398  toEng 7E-6  -> 0.000007
    366 dsbas399  toSci 7E-7  -> 7E-7
    367 dsbas400  toEng 7E-7  -> 700E-9
    368 dsbas401  toSci 7E-8  -> 7E-8
    369 dsbas402  toEng 7E-8  -> 70E-9
    370 dsbas403  toSci 7E-9  -> 7E-9
    371 dsbas404  toEng 7E-9  -> 7E-9
    372 dsbas405  toSci 7E-10 -> 7E-10
    373 dsbas406  toEng 7E-10 -> 700E-12
    374 dsbas407  toSci 7E-11 -> 7E-11
    375 dsbas408  toEng 7E-11 -> 70E-12
    376 dsbas409  toSci 7E-12 -> 7E-12
    377 dsbas410  toEng 7E-12 -> 7E-12
    378 dsbas411  toSci 7E-13 -> 7E-13
    379 dsbas412  toEng 7E-13 -> 700E-15
    380 
    381 -- Exacts remain exact up to precision ..
    382 dsbas420  toSci    100 -> 100
    383 dsbas422  toSci   1000 -> 1000
    384 dsbas424  toSci  999.9 ->  999.9
    385 dsbas426  toSci 1000.0 -> 1000.0
    386 dsbas428  toSci 1000.1 -> 1000.1
    387 dsbas430  toSci 10000 -> 10000
    388 dsbas432  toSci 1000        -> 1000
    389 dsbas434  toSci 10000       -> 10000
    390 dsbas436  toSci 100000      -> 100000
    391 dsbas438  toSci 1000000     -> 1000000
    392 dsbas440  toSci 10000000    -> 1.000000E+7   Rounded
    393 dsbas442  toSci 10000000    -> 1.000000E+7   Rounded
    394 dsbas444  toSci 10000003    -> 1.000000E+7   Rounded Inexact
    395 dsbas446  toSci 10000005    -> 1.000000E+7   Rounded Inexact
    396 dsbas448  toSci 100000050   -> 1.000000E+8   Rounded Inexact
    397 dsbas450  toSci 10000009    -> 1.000001E+7   Rounded Inexact
    398 dsbas452  toSci 100000000   -> 1.000000E+8   Rounded
    399 dsbas454  toSci 100000003   -> 1.000000E+8   Rounded Inexact
    400 dsbas456  toSci 100000005   -> 1.000000E+8   Rounded Inexact
    401 dsbas458  toSci 100000009   -> 1.000000E+8   Rounded Inexact
    402 dsbas460  toSci 1000000000  -> 1.000000E+9   Rounded
    403 dsbas462  toSci 1000000300  -> 1.000000E+9   Rounded Inexact
    404 dsbas464  toSci 1000000500  -> 1.000000E+9   Rounded Inexact
    405 dsbas466  toSci 1000000900  -> 1.000001E+9   Rounded Inexact
    406 dsbas468  toSci 10000000000 -> 1.000000E+10  Rounded
    407 dsbas470  toSci 10000003000 -> 1.000000E+10  Rounded Inexact
    408 dsbas472  toSci 10000005000 -> 1.000000E+10  Rounded Inexact
    409 dsbas474  toSci 10000009000 -> 1.000001E+10  Rounded Inexact
    410 
    411 -- check rounding modes heeded
    412 rounding:  ceiling
    413 dsbsr401  toSci  1.1123450    ->  1.112345  Rounded
    414 dsbsr402  toSci  1.11234549   ->  1.112346  Rounded Inexact
    415 dsbsr403  toSci  1.11234550   ->  1.112346  Rounded Inexact
    416 dsbsr404  toSci  1.11234551   ->  1.112346  Rounded Inexact
    417 rounding:  up
    418 dsbsr405  toSci  1.1123450    ->  1.112345  Rounded
    419 dsbsr406  toSci  1.11234549   ->  1.112346  Rounded Inexact
    420 dsbsr407  toSci  1.11234550   ->  1.112346  Rounded Inexact
    421 dsbsr408  toSci  1.11234551   ->  1.112346  Rounded Inexact
    422 rounding:  floor
    423 dsbsr410  toSci  1.1123450    ->  1.112345  Rounded
    424 dsbsr411  toSci  1.11234549   ->  1.112345  Rounded Inexact
    425 dsbsr412  toSci  1.11234550   ->  1.112345  Rounded Inexact
    426 dsbsr413  toSci  1.11234551   ->  1.112345  Rounded Inexact
    427 rounding:  half_down
    428 dsbsr415  toSci  1.1123450    ->  1.112345  Rounded
    429 dsbsr416  toSci  1.11234549   ->  1.112345  Rounded Inexact
    430 dsbsr417  toSci  1.11234550   ->  1.112345  Rounded Inexact
    431 dsbsr418  toSci  1.11234650   ->  1.112346  Rounded Inexact
    432 dsbsr419  toSci  1.11234551   ->  1.112346  Rounded Inexact
    433 rounding:  half_even
    434 dsbsr421  toSci  1.1123450    ->  1.112345  Rounded
    435 dsbsr422  toSci  1.11234549   ->  1.112345  Rounded Inexact
    436 dsbsr423  toSci  1.11234550   ->  1.112346  Rounded Inexact
    437 dsbsr424  toSci  1.11234650   ->  1.112346  Rounded Inexact
    438 dsbsr425  toSci  1.11234551   ->  1.112346  Rounded Inexact
    439 rounding:  down
    440 dsbsr426  toSci  1.1123450    ->  1.112345  Rounded
    441 dsbsr427  toSci  1.11234549   ->  1.112345  Rounded Inexact
    442 dsbsr428  toSci  1.11234550   ->  1.112345  Rounded Inexact
    443 dsbsr429  toSci  1.11234551   ->  1.112345  Rounded Inexact
    444 rounding:  half_up
    445 dsbsr431  toSci  1.1123450    ->  1.112345  Rounded
    446 dsbsr432  toSci  1.11234549   ->  1.112345  Rounded Inexact
    447 dsbsr433  toSci  1.11234550   ->  1.112346  Rounded Inexact
    448 dsbsr434  toSci  1.11234650   ->  1.112347  Rounded Inexact
    449 dsbsr435  toSci  1.11234551   ->  1.112346  Rounded Inexact
    450 -- negatives
    451 rounding:  ceiling
    452 dsbsr501  toSci -1.1123450    -> -1.112345  Rounded
    453 dsbsr502  toSci -1.11234549   -> -1.112345  Rounded Inexact
    454 dsbsr503  toSci -1.11234550   -> -1.112345  Rounded Inexact
    455 dsbsr504  toSci -1.11234551   -> -1.112345  Rounded Inexact
    456 rounding:  up
    457 dsbsr505  toSci -1.1123450    -> -1.112345  Rounded
    458 dsbsr506  toSci -1.11234549   -> -1.112346  Rounded Inexact
    459 dsbsr507  toSci -1.11234550   -> -1.112346  Rounded Inexact
    460 dsbsr508  toSci -1.11234551   -> -1.112346  Rounded Inexact
    461 rounding:  floor
    462 dsbsr510  toSci -1.1123450    -> -1.112345  Rounded
    463 dsbsr511  toSci -1.11234549   -> -1.112346  Rounded Inexact
    464 dsbsr512  toSci -1.11234550   -> -1.112346  Rounded Inexact
    465 dsbsr513  toSci -1.11234551   -> -1.112346  Rounded Inexact
    466 rounding:  half_down
    467 dsbsr515  toSci -1.1123450    -> -1.112345  Rounded
    468 dsbsr516  toSci -1.11234549   -> -1.112345  Rounded Inexact
    469 dsbsr517  toSci -1.11234550   -> -1.112345  Rounded Inexact
    470 dsbsr518  toSci -1.11234650   -> -1.112346  Rounded Inexact
    471 dsbsr519  toSci -1.11234551   -> -1.112346  Rounded Inexact
    472 rounding:  half_even
    473 dsbsr521  toSci -1.1123450    -> -1.112345  Rounded
    474 dsbsr522  toSci -1.11234549   -> -1.112345  Rounded Inexact
    475 dsbsr523  toSci -1.11234550   -> -1.112346  Rounded Inexact
    476 dsbsr524  toSci -1.11234650   -> -1.112346  Rounded Inexact
    477 dsbsr525  toSci -1.11234551   -> -1.112346  Rounded Inexact
    478 rounding:  down
    479 dsbsr526  toSci -1.1123450    -> -1.112345  Rounded
    480 dsbsr527  toSci -1.11234549   -> -1.112345  Rounded Inexact
    481 dsbsr528  toSci -1.11234550   -> -1.112345  Rounded Inexact
    482 dsbsr529  toSci -1.11234551   -> -1.112345  Rounded Inexact
    483 rounding:  half_up
    484 dsbsr531  toSci -1.1123450    -> -1.112345  Rounded
    485 dsbsr532  toSci -1.11234549   -> -1.112345  Rounded Inexact
    486 dsbsr533  toSci -1.11234550   -> -1.112346  Rounded Inexact
    487 dsbsr534  toSci -1.11234650   -> -1.112347  Rounded Inexact
    488 dsbsr535  toSci -1.11234551   -> -1.112346  Rounded Inexact
    489 
    490 rounding:    half_even
    491 
    492 -- The 'baddies' tests from DiagBigDecimal, plus some new ones
    493 dsbas500 toSci '1..2'            -> NaN Conversion_syntax
    494 dsbas501 toSci '.'               -> NaN Conversion_syntax
    495 dsbas502 toSci '..'              -> NaN Conversion_syntax
    496 dsbas503 toSci '++1'             -> NaN Conversion_syntax
    497 dsbas504 toSci '--1'             -> NaN Conversion_syntax
    498 dsbas505 toSci '-+1'             -> NaN Conversion_syntax
    499 dsbas506 toSci '+-1'             -> NaN Conversion_syntax
    500 dsbas507 toSci '12e'             -> NaN Conversion_syntax
    501 dsbas508 toSci '12e++'           -> NaN Conversion_syntax
    502 dsbas509 toSci '12f4'            -> NaN Conversion_syntax
    503 dsbas510 toSci ' +1'             -> NaN Conversion_syntax
    504 dsbas511 toSci '+ 1'             -> NaN Conversion_syntax
    505 dsbas512 toSci '12 '             -> NaN Conversion_syntax
    506 dsbas513 toSci ' + 1'            -> NaN Conversion_syntax
    507 dsbas514 toSci ' - 1 '           -> NaN Conversion_syntax
    508 dsbas515 toSci 'x'               -> NaN Conversion_syntax
    509 dsbas516 toSci '-1-'             -> NaN Conversion_syntax
    510 dsbas517 toSci '12-'             -> NaN Conversion_syntax
    511 dsbas518 toSci '3+'              -> NaN Conversion_syntax
    512 dsbas519 toSci ''                -> NaN Conversion_syntax
    513 dsbas520 toSci '1e-'             -> NaN Conversion_syntax
    514 dsbas521 toSci '7e99999a'        -> NaN Conversion_syntax
    515 dsbas522 toSci '7e123567890x'    -> NaN Conversion_syntax
    516 dsbas523 toSci '7e12356789012x'  -> NaN Conversion_syntax
    517 dsbas524 toSci ''                -> NaN Conversion_syntax
    518 dsbas525 toSci 'e100'            -> NaN Conversion_syntax
    519 dsbas526 toSci '\u0e5a'          -> NaN Conversion_syntax
    520 dsbas527 toSci '\u0b65'          -> NaN Conversion_syntax
    521 dsbas528 toSci '123,65'          -> NaN Conversion_syntax
    522 dsbas529 toSci '1.34.5'          -> NaN Conversion_syntax
    523 dsbas530 toSci '.123.5'          -> NaN Conversion_syntax
    524 dsbas531 toSci '01.35.'          -> NaN Conversion_syntax
    525 dsbas532 toSci '01.35-'          -> NaN Conversion_syntax
    526 dsbas533 toSci '0000..'          -> NaN Conversion_syntax
    527 dsbas534 toSci '.0000.'          -> NaN Conversion_syntax
    528 dsbas535 toSci '00..00'          -> NaN Conversion_syntax
    529 dsbas536 toSci '111e*123'        -> NaN Conversion_syntax
    530 dsbas537 toSci '111e123-'        -> NaN Conversion_syntax
    531 dsbas538 toSci '111e+12+'        -> NaN Conversion_syntax
    532 dsbas539 toSci '111e1-3-'        -> NaN Conversion_syntax
    533 dsbas540 toSci '111e1*23'        -> NaN Conversion_syntax
    534 dsbas541 toSci '111e1e+3'        -> NaN Conversion_syntax
    535 dsbas542 toSci '1e1.0'           -> NaN Conversion_syntax
    536 dsbas543 toSci '1e123e'          -> NaN Conversion_syntax
    537 dsbas544 toSci 'ten'             -> NaN Conversion_syntax
    538 dsbas545 toSci 'ONE'             -> NaN Conversion_syntax
    539 dsbas546 toSci '1e.1'            -> NaN Conversion_syntax
    540 dsbas547 toSci '1e1.'            -> NaN Conversion_syntax
    541 dsbas548 toSci '1ee'             -> NaN Conversion_syntax
    542 dsbas549 toSci 'e+1'             -> NaN Conversion_syntax
    543 dsbas550 toSci '1.23.4'          -> NaN Conversion_syntax
    544 dsbas551 toSci '1.2.1'           -> NaN Conversion_syntax
    545 dsbas552 toSci '1E+1.2'          -> NaN Conversion_syntax
    546 dsbas553 toSci '1E+1.2.3'        -> NaN Conversion_syntax
    547 dsbas554 toSci '1E++1'           -> NaN Conversion_syntax
    548 dsbas555 toSci '1E--1'           -> NaN Conversion_syntax
    549 dsbas556 toSci '1E+-1'           -> NaN Conversion_syntax
    550 dsbas557 toSci '1E-+1'           -> NaN Conversion_syntax
    551 dsbas558 toSci '1E''1'           -> NaN Conversion_syntax
    552 dsbas559 toSci "1E""1"           -> NaN Conversion_syntax
    553 dsbas560 toSci "1E"""""          -> NaN Conversion_syntax
    554 -- Near-specials
    555 dsbas561 toSci "qNaN"            -> NaN Conversion_syntax
    556 dsbas562 toSci "NaNq"            -> NaN Conversion_syntax
    557 dsbas563 toSci "NaNs"            -> NaN Conversion_syntax
    558 dsbas564 toSci "Infi"            -> NaN Conversion_syntax
    559 dsbas565 toSci "Infin"           -> NaN Conversion_syntax
    560 dsbas566 toSci "Infini"          -> NaN Conversion_syntax
    561 dsbas567 toSci "Infinit"         -> NaN Conversion_syntax
    562 dsbas568 toSci "-Infinit"        -> NaN Conversion_syntax
    563 dsbas569 toSci "0Inf"            -> NaN Conversion_syntax
    564 dsbas570 toSci "9Inf"            -> NaN Conversion_syntax
    565 dsbas571 toSci "-0Inf"           -> NaN Conversion_syntax
    566 dsbas572 toSci "-9Inf"           -> NaN Conversion_syntax
    567 dsbas573 toSci "-sNa"            -> NaN Conversion_syntax
    568 dsbas574 toSci "xNaN"            -> NaN Conversion_syntax
    569 dsbas575 toSci "0sNaN"           -> NaN Conversion_syntax
    570 
    571 -- some baddies with dots and Es and dots and specials
    572 dsbas576 toSci  'e+1'            ->  NaN Conversion_syntax
    573 dsbas577 toSci  '.e+1'           ->  NaN Conversion_syntax
    574 dsbas578 toSci  '+.e+1'          ->  NaN Conversion_syntax
    575 dsbas579 toSci  '-.e+'           ->  NaN Conversion_syntax
    576 dsbas580 toSci  '-.e'            ->  NaN Conversion_syntax
    577 dsbas581 toSci  'E+1'            ->  NaN Conversion_syntax
    578 dsbas582 toSci  '.E+1'           ->  NaN Conversion_syntax
    579 dsbas583 toSci  '+.E+1'          ->  NaN Conversion_syntax
    580 dsbas584 toSci  '-.E+'           ->  NaN Conversion_syntax
    581 dsbas585 toSci  '-.E'            ->  NaN Conversion_syntax
    582 
    583 dsbas586 toSci  '.NaN'           ->  NaN Conversion_syntax
    584 dsbas587 toSci  '-.NaN'          ->  NaN Conversion_syntax
    585 dsbas588 toSci  '+.sNaN'         ->  NaN Conversion_syntax
    586 dsbas589 toSci  '+.Inf'          ->  NaN Conversion_syntax
    587 dsbas590 toSci  '.Infinity'      ->  NaN Conversion_syntax
    588 
    589 -- Zeros
    590 dsbas601 toSci 0.000000000       -> 0E-9
    591 dsbas602 toSci 0.00000000        -> 0E-8
    592 dsbas603 toSci 0.0000000         -> 0E-7
    593 dsbas604 toSci 0.000000          -> 0.000000
    594 dsbas605 toSci 0.00000           -> 0.00000
    595 dsbas606 toSci 0.0000            -> 0.0000
    596 dsbas607 toSci 0.000             -> 0.000
    597 dsbas608 toSci 0.00              -> 0.00
    598 dsbas609 toSci 0.0               -> 0.0
    599 dsbas610 toSci  .0               -> 0.0
    600 dsbas611 toSci 0.                -> 0
    601 dsbas612 toSci -.0               -> -0.0
    602 dsbas613 toSci -0.               -> -0
    603 dsbas614 toSci -0.0              -> -0.0
    604 dsbas615 toSci -0.00             -> -0.00
    605 dsbas616 toSci -0.000            -> -0.000
    606 dsbas617 toSci -0.0000           -> -0.0000
    607 dsbas618 toSci -0.00000          -> -0.00000
    608 dsbas619 toSci -0.000000         -> -0.000000
    609 dsbas620 toSci -0.0000000        -> -0E-7
    610 dsbas621 toSci -0.00000000       -> -0E-8
    611 dsbas622 toSci -0.000000000      -> -0E-9
    612 
    613 dsbas630 toSci  0.00E+0          -> 0.00
    614 dsbas631 toSci  0.00E+1          -> 0.0
    615 dsbas632 toSci  0.00E+2          -> 0
    616 dsbas633 toSci  0.00E+3          -> 0E+1
    617 dsbas634 toSci  0.00E+4          -> 0E+2
    618 dsbas635 toSci  0.00E+5          -> 0E+3
    619 dsbas636 toSci  0.00E+6          -> 0E+4
    620 dsbas637 toSci  0.00E+7          -> 0E+5
    621 dsbas638 toSci  0.00E+8          -> 0E+6
    622 dsbas639 toSci  0.00E+9          -> 0E+7
    623 
    624 dsbas640 toSci  0.0E+0           -> 0.0
    625 dsbas641 toSci  0.0E+1           -> 0
    626 dsbas642 toSci  0.0E+2           -> 0E+1
    627 dsbas643 toSci  0.0E+3           -> 0E+2
    628 dsbas644 toSci  0.0E+4           -> 0E+3
    629 dsbas645 toSci  0.0E+5           -> 0E+4
    630 dsbas646 toSci  0.0E+6           -> 0E+5
    631 dsbas647 toSci  0.0E+7           -> 0E+6
    632 dsbas648 toSci  0.0E+8           -> 0E+7
    633 dsbas649 toSci  0.0E+9           -> 0E+8
    634 
    635 dsbas650 toSci  0E+0             -> 0
    636 dsbas651 toSci  0E+1             -> 0E+1
    637 dsbas652 toSci  0E+2             -> 0E+2
    638 dsbas653 toSci  0E+3             -> 0E+3
    639 dsbas654 toSci  0E+4             -> 0E+4
    640 dsbas655 toSci  0E+5             -> 0E+5
    641 dsbas656 toSci  0E+6             -> 0E+6
    642 dsbas657 toSci  0E+7             -> 0E+7
    643 dsbas658 toSci  0E+8             -> 0E+8
    644 dsbas659 toSci  0E+9             -> 0E+9
    645 
    646 dsbas660 toSci  0.0E-0           -> 0.0
    647 dsbas661 toSci  0.0E-1           -> 0.00
    648 dsbas662 toSci  0.0E-2           -> 0.000
    649 dsbas663 toSci  0.0E-3           -> 0.0000
    650 dsbas664 toSci  0.0E-4           -> 0.00000
    651 dsbas665 toSci  0.0E-5           -> 0.000000
    652 dsbas666 toSci  0.0E-6           -> 0E-7
    653 dsbas667 toSci  0.0E-7           -> 0E-8
    654 dsbas668 toSci  0.0E-8           -> 0E-9
    655 dsbas669 toSci  0.0E-9           -> 0E-10
    656 
    657 dsbas670 toSci  0.00E-0          -> 0.00
    658 dsbas671 toSci  0.00E-1          -> 0.000
    659 dsbas672 toSci  0.00E-2          -> 0.0000
    660 dsbas673 toSci  0.00E-3          -> 0.00000
    661 dsbas674 toSci  0.00E-4          -> 0.000000
    662 dsbas675 toSci  0.00E-5          -> 0E-7
    663 dsbas676 toSci  0.00E-6          -> 0E-8
    664 dsbas677 toSci  0.00E-7          -> 0E-9
    665 dsbas678 toSci  0.00E-8          -> 0E-10
    666 dsbas679 toSci  0.00E-9          -> 0E-11
    667 
    668 dsbas680 toSci  000000.          ->  0
    669 dsbas681 toSci   00000.          ->  0
    670 dsbas682 toSci    0000.          ->  0
    671 dsbas683 toSci     000.          ->  0
    672 dsbas684 toSci      00.          ->  0
    673 dsbas685 toSci       0.          ->  0
    674 dsbas686 toSci  +00000.          ->  0
    675 dsbas687 toSci  -00000.          -> -0
    676 dsbas688 toSci  +0.              ->  0
    677 dsbas689 toSci  -0.              -> -0
    678 
    679 -- Specials
    680 dsbas700 toSci "NaN"             -> NaN
    681 dsbas701 toSci "nan"             -> NaN
    682 dsbas702 toSci "nAn"             -> NaN
    683 dsbas703 toSci "NAN"             -> NaN
    684 dsbas704 toSci "+NaN"            -> NaN
    685 dsbas705 toSci "+nan"            -> NaN
    686 dsbas706 toSci "+nAn"            -> NaN
    687 dsbas707 toSci "+NAN"            -> NaN
    688 dsbas708 toSci "-NaN"            -> -NaN
    689 dsbas709 toSci "-nan"            -> -NaN
    690 dsbas710 toSci "-nAn"            -> -NaN
    691 dsbas711 toSci "-NAN"            -> -NaN
    692 dsbas712 toSci 'NaN0'            -> NaN
    693 dsbas713 toSci 'NaN1'            -> NaN1
    694 dsbas714 toSci 'NaN12'           -> NaN12
    695 dsbas715 toSci 'NaN123'          -> NaN123
    696 dsbas716 toSci 'NaN1234'         -> NaN1234
    697 dsbas717 toSci 'NaN01'           -> NaN1
    698 dsbas718 toSci 'NaN012'          -> NaN12
    699 dsbas719 toSci 'NaN0123'         -> NaN123
    700 dsbas720 toSci 'NaN01234'        -> NaN1234
    701 dsbas721 toSci 'NaN001'          -> NaN1
    702 dsbas722 toSci 'NaN0012'         -> NaN12
    703 dsbas723 toSci 'NaN00123'        -> NaN123
    704 dsbas724 toSci 'NaN001234'       -> NaN1234
    705 dsbas725 toSci 'NaN1234567890123456' -> NaN Conversion_syntax
    706 dsbas726 toSci 'NaN123e+1'       -> NaN Conversion_syntax
    707 dsbas727 toSci 'NaN12.45'        -> NaN Conversion_syntax
    708 dsbas728 toSci 'NaN-12'          -> NaN Conversion_syntax
    709 dsbas729 toSci 'NaN+12'          -> NaN Conversion_syntax
    710 
    711 dsbas730 toSci "sNaN"            -> sNaN
    712 dsbas731 toSci "snan"            -> sNaN
    713 dsbas732 toSci "SnAn"            -> sNaN
    714 dsbas733 toSci "SNAN"            -> sNaN
    715 dsbas734 toSci "+sNaN"           -> sNaN
    716 dsbas735 toSci "+snan"           -> sNaN
    717 dsbas736 toSci "+SnAn"           -> sNaN
    718 dsbas737 toSci "+SNAN"           -> sNaN
    719 dsbas738 toSci "-sNaN"           -> -sNaN
    720 dsbas739 toSci "-snan"           -> -sNaN
    721 dsbas740 toSci "-SnAn"           -> -sNaN
    722 dsbas741 toSci "-SNAN"           -> -sNaN
    723 dsbas742 toSci 'sNaN0000'        -> sNaN
    724 dsbas743 toSci 'sNaN7'           -> sNaN7
    725 dsbas744 toSci 'sNaN007234'      -> sNaN7234
    726 dsbas745 toSci 'sNaN7234561234567890' -> NaN Conversion_syntax
    727 dsbas746 toSci 'sNaN72.45'       -> NaN Conversion_syntax
    728 dsbas747 toSci 'sNaN-72'         -> NaN Conversion_syntax
    729 
    730 dsbas748 toSci "Inf"             -> Infinity
    731 dsbas749 toSci "inf"             -> Infinity
    732 dsbas750 toSci "iNf"             -> Infinity
    733 dsbas751 toSci "INF"             -> Infinity
    734 dsbas752 toSci "+Inf"            -> Infinity
    735 dsbas753 toSci "+inf"            -> Infinity
    736 dsbas754 toSci "+iNf"            -> Infinity
    737 dsbas755 toSci "+INF"            -> Infinity
    738 dsbas756 toSci "-Inf"            -> -Infinity
    739 dsbas757 toSci "-inf"            -> -Infinity
    740 dsbas758 toSci "-iNf"            -> -Infinity
    741 dsbas759 toSci "-INF"            -> -Infinity
    742 
    743 dsbas760 toSci "Infinity"        -> Infinity
    744 dsbas761 toSci "infinity"        -> Infinity
    745 dsbas762 toSci "iNfInItY"        -> Infinity
    746 dsbas763 toSci "INFINITY"        -> Infinity
    747 dsbas764 toSci "+Infinity"       -> Infinity
    748 dsbas765 toSci "+infinity"       -> Infinity
    749 dsbas766 toSci "+iNfInItY"       -> Infinity
    750 dsbas767 toSci "+INFINITY"       -> Infinity
    751 dsbas768 toSci "-Infinity"       -> -Infinity
    752 dsbas769 toSci "-infinity"       -> -Infinity
    753 dsbas770 toSci "-iNfInItY"       -> -Infinity
    754 dsbas771 toSci "-INFINITY"       -> -Infinity
    755 
    756 -- Specials and zeros for toEng
    757 dsbast772 toEng "NaN"              -> NaN
    758 dsbast773 toEng "-Infinity"        -> -Infinity
    759 dsbast774 toEng "-sNaN"            -> -sNaN
    760 dsbast775 toEng "-NaN"             -> -NaN
    761 dsbast776 toEng "+Infinity"        -> Infinity
    762 dsbast778 toEng "+sNaN"            -> sNaN
    763 dsbast779 toEng "+NaN"             -> NaN
    764 dsbast780 toEng "INFINITY"         -> Infinity
    765 dsbast781 toEng "SNAN"             -> sNaN
    766 dsbast782 toEng "NAN"              -> NaN
    767 dsbast783 toEng "infinity"         -> Infinity
    768 dsbast784 toEng "snan"             -> sNaN
    769 dsbast785 toEng "nan"              -> NaN
    770 dsbast786 toEng "InFINITY"         -> Infinity
    771 dsbast787 toEng "SnAN"             -> sNaN
    772 dsbast788 toEng "nAN"              -> NaN
    773 dsbast789 toEng "iNfinity"         -> Infinity
    774 dsbast790 toEng "sNan"             -> sNaN
    775 dsbast791 toEng "Nan"              -> NaN
    776 dsbast792 toEng "Infinity"         -> Infinity
    777 dsbast793 toEng "sNaN"             -> sNaN
    778 
    779 -- Zero toEng, etc.
    780 dsbast800 toEng 0e+1              -> "0.00E+3"  -- doc example
    781 
    782 dsbast801 toEng 0.000000000       -> 0E-9
    783 dsbast802 toEng 0.00000000        -> 0.00E-6
    784 dsbast803 toEng 0.0000000         -> 0.0E-6
    785 dsbast804 toEng 0.000000          -> 0.000000
    786 dsbast805 toEng 0.00000           -> 0.00000
    787 dsbast806 toEng 0.0000            -> 0.0000
    788 dsbast807 toEng 0.000             -> 0.000
    789 dsbast808 toEng 0.00              -> 0.00
    790 dsbast809 toEng 0.0               -> 0.0
    791 dsbast810 toEng  .0               -> 0.0
    792 dsbast811 toEng 0.                -> 0
    793 dsbast812 toEng -.0               -> -0.0
    794 dsbast813 toEng -0.               -> -0
    795 dsbast814 toEng -0.0              -> -0.0
    796 dsbast815 toEng -0.00             -> -0.00
    797 dsbast816 toEng -0.000            -> -0.000
    798 dsbast817 toEng -0.0000           -> -0.0000
    799 dsbast818 toEng -0.00000          -> -0.00000
    800 dsbast819 toEng -0.000000         -> -0.000000
    801 dsbast820 toEng -0.0000000        -> -0.0E-6
    802 dsbast821 toEng -0.00000000       -> -0.00E-6
    803 dsbast822 toEng -0.000000000      -> -0E-9
    804 
    805 dsbast830 toEng  0.00E+0          -> 0.00
    806 dsbast831 toEng  0.00E+1          -> 0.0
    807 dsbast832 toEng  0.00E+2          -> 0
    808 dsbast833 toEng  0.00E+3          -> 0.00E+3
    809 dsbast834 toEng  0.00E+4          -> 0.0E+3
    810 dsbast835 toEng  0.00E+5          -> 0E+3
    811 dsbast836 toEng  0.00E+6          -> 0.00E+6
    812 dsbast837 toEng  0.00E+7          -> 0.0E+6
    813 dsbast838 toEng  0.00E+8          -> 0E+6
    814 dsbast839 toEng  0.00E+9          -> 0.00E+9
    815 
    816 dsbast840 toEng  0.0E+0           -> 0.0
    817 dsbast841 toEng  0.0E+1           -> 0
    818 dsbast842 toEng  0.0E+2           -> 0.00E+3
    819 dsbast843 toEng  0.0E+3           -> 0.0E+3
    820 dsbast844 toEng  0.0E+4           -> 0E+3
    821 dsbast845 toEng  0.0E+5           -> 0.00E+6
    822 dsbast846 toEng  0.0E+6           -> 0.0E+6
    823 dsbast847 toEng  0.0E+7           -> 0E+6
    824 dsbast848 toEng  0.0E+8           -> 0.00E+9
    825 dsbast849 toEng  0.0E+9           -> 0.0E+9
    826 
    827 dsbast850 toEng  0E+0             -> 0
    828 dsbast851 toEng  0E+1             -> 0.00E+3
    829 dsbast852 toEng  0E+2             -> 0.0E+3
    830 dsbast853 toEng  0E+3             -> 0E+3
    831 dsbast854 toEng  0E+4             -> 0.00E+6
    832 dsbast855 toEng  0E+5             -> 0.0E+6
    833 dsbast856 toEng  0E+6             -> 0E+6
    834 dsbast857 toEng  0E+7             -> 0.00E+9
    835 dsbast858 toEng  0E+8             -> 0.0E+9
    836 dsbast859 toEng  0E+9             -> 0E+9
    837 
    838 dsbast860 toEng  0.0E-0           -> 0.0
    839 dsbast861 toEng  0.0E-1           -> 0.00
    840 dsbast862 toEng  0.0E-2           -> 0.000
    841 dsbast863 toEng  0.0E-3           -> 0.0000
    842 dsbast864 toEng  0.0E-4           -> 0.00000
    843 dsbast865 toEng  0.0E-5           -> 0.000000
    844 dsbast866 toEng  0.0E-6           -> 0.0E-6
    845 dsbast867 toEng  0.0E-7           -> 0.00E-6
    846 dsbast868 toEng  0.0E-8           -> 0E-9
    847 dsbast869 toEng  0.0E-9           -> 0.0E-9
    848 
    849 dsbast870 toEng  0.00E-0          -> 0.00
    850 dsbast871 toEng  0.00E-1          -> 0.000
    851 dsbast872 toEng  0.00E-2          -> 0.0000
    852 dsbast873 toEng  0.00E-3          -> 0.00000
    853 dsbast874 toEng  0.00E-4          -> 0.000000
    854 dsbast875 toEng  0.00E-5          -> 0.0E-6
    855 dsbast876 toEng  0.00E-6          -> 0.00E-6
    856 dsbast877 toEng  0.00E-7          -> 0E-9
    857 dsbast878 toEng  0.00E-8          -> 0.0E-9
    858 dsbast879 toEng  0.00E-9          -> 0.00E-9
    859 
    860 -- long input strings
    861 dsbas801 tosci          '01234567' -> 1234567
    862 dsbas802 tosci         '001234567' -> 1234567
    863 dsbas803 tosci        '0001234567' -> 1234567
    864 dsbas804 tosci       '00001234567' -> 1234567
    865 dsbas805 tosci      '000001234567' -> 1234567
    866 dsbas806 tosci     '0000001234567' -> 1234567
    867 dsbas807 tosci    '00000001234567' -> 1234567
    868 dsbas808 tosci   '000000001234567' -> 1234567
    869 dsbas809 tosci  '0000000001234567' -> 1234567
    870 dsbas810 tosci '00000000001234567' -> 1234567
    871 
    872 dsbas811 tosci          '0.1234567' ->      0.1234567
    873 dsbas812 tosci         '0.01234567' ->     0.01234567
    874 dsbas813 tosci        '0.001234567' ->    0.001234567
    875 dsbas814 tosci       '0.0001234567' ->   0.0001234567
    876 dsbas815 tosci      '0.00001234567' ->  0.00001234567
    877 dsbas816 tosci     '0.000001234567' -> 0.000001234567
    878 dsbas817 tosci    '0.0000001234567' ->       1.234567E-7
    879 dsbas818 tosci   '0.00000001234567' ->       1.234567E-8
    880 dsbas819 tosci  '0.000000001234567' ->       1.234567E-9
    881 dsbas820 tosci '0.0000000001234567' ->       1.234567E-10
    882 
    883 dsbas821 tosci '123456790'         -> 1.234568E+8 Inexact Rounded
    884 dsbas822 tosci '1234567901'        -> 1.234568E+9  Inexact Rounded
    885 dsbas823 tosci '12345679012'       -> 1.234568E+10 Inexact Rounded
    886 dsbas824 tosci '123456790123'      -> 1.234568E+11 Inexact Rounded
    887 dsbas825 tosci '1234567901234'     -> 1.234568E+12 Inexact Rounded
    888 dsbas826 tosci '12345679012345'    -> 1.234568E+13 Inexact Rounded
    889 dsbas827 tosci '123456790123456'   -> 1.234568E+14 Inexact Rounded
    890 dsbas828 tosci '1234567901234567'  -> 1.234568E+15 Inexact Rounded
    891 dsbas829 tosci '1234567890123456'  -> 1.234568E+15 Inexact Rounded
    892 
    893 -- subnormals and overflows
    894 dsbas906 toSci '99e999999999'       -> Infinity Overflow  Inexact Rounded
    895 dsbas907 toSci '999e999999999'      -> Infinity Overflow  Inexact Rounded
    896 dsbas908 toSci '0.9e-999999999'     -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
    897 dsbas909 toSci '0.09e-999999999'    -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
    898 dsbas910 toSci '0.1e1000000000'     -> Infinity Overflow  Inexact Rounded
    899 dsbas911 toSci '10e-1000000000'     -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
    900 dsbas912 toSci '0.9e9999999999'     -> Infinity Overflow  Inexact Rounded
    901 dsbas913 toSci '99e-9999999999'     -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
    902 dsbas914 toSci '111e9999999999'     -> Infinity Overflow  Inexact Rounded
    903 dsbas915 toSci '1111e-9999999999'   -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
    904 dsbas916 toSci '1111e-99999999999'  -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
    905 dsbas917 toSci '7e1000000000'       -> Infinity Overflow  Inexact Rounded
    906 -- negatives the same
    907 dsbas918 toSci '-99e999999999'      -> -Infinity Overflow  Inexact Rounded
    908 dsbas919 toSci '-999e999999999'     -> -Infinity Overflow  Inexact Rounded
    909 dsbas920 toSci '-0.9e-999999999'    -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
    910 dsbas921 toSci '-0.09e-999999999'   -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
    911 dsbas922 toSci '-0.1e1000000000'    -> -Infinity Overflow  Inexact Rounded
    912 dsbas923 toSci '-10e-1000000000'    -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
    913 dsbas924 toSci '-0.9e9999999999'    -> -Infinity Overflow  Inexact Rounded
    914 dsbas925 toSci '-99e-9999999999'    -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
    915 dsbas926 toSci '-111e9999999999'    -> -Infinity Overflow  Inexact Rounded
    916 dsbas927 toSci '-1111e-9999999999'  -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
    917 dsbas928 toSci '-1111e-99999999999' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
    918 dsbas929 toSci '-7e1000000000'      -> -Infinity Overflow  Inexact Rounded
    919 
    920 -- overflow results at different rounding modes
    921 rounding:  ceiling
    922 dsbas930 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
    923 dsbas931 toSci '-7e10000'  -> -9.999999E+96 Overflow  Inexact Rounded
    924 rounding:  up
    925 dsbas932 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
    926 dsbas933 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
    927 rounding:  down
    928 dsbas934 toSci  '7e10000'  ->  9.999999E+96 Overflow  Inexact Rounded
    929 dsbas935 toSci '-7e10000'  -> -9.999999E+96 Overflow  Inexact Rounded
    930 rounding:  floor
    931 dsbas936 toSci  '7e10000'  ->  9.999999E+96 Overflow  Inexact Rounded
    932 dsbas937 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
    933 
    934 rounding:  half_up
    935 dsbas938 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
    936 dsbas939 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
    937 rounding:  half_even
    938 dsbas940 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
    939 dsbas941 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
    940 rounding:  half_down
    941 dsbas942 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
    942 dsbas943 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
    943 
    944 rounding:  half_even
    945 
    946 -- Now check 854/754r some subnormals and underflow to 0
    947 dsbem400 toSci  1.0000E-86     -> 1.0000E-86
    948 dsbem401 toSci  0.1E-97        -> 1E-98       Subnormal
    949 dsbem402 toSci  0.1000E-97     -> 1.000E-98   Subnormal
    950 dsbem403 toSci  0.0100E-97     -> 1.00E-99    Subnormal
    951 dsbem404 toSci  0.0010E-97     -> 1.0E-100     Subnormal
    952 dsbem405 toSci  0.0001E-97     -> 1E-101       Subnormal
    953 dsbem406 toSci  0.00010E-97    -> 1E-101     Subnormal Rounded
    954 dsbem407 toSci  0.00013E-97    -> 1E-101     Underflow Subnormal Inexact Rounded
    955 dsbem408 toSci  0.00015E-97    -> 2E-101     Underflow Subnormal Inexact Rounded
    956 dsbem409 toSci  0.00017E-97    -> 2E-101     Underflow Subnormal Inexact Rounded
    957 dsbem410 toSci  0.00023E-97    -> 2E-101     Underflow Subnormal Inexact Rounded
    958 dsbem411 toSci  0.00025E-97    -> 2E-101     Underflow Subnormal Inexact Rounded
    959 dsbem412 toSci  0.00027E-97    -> 3E-101     Underflow Subnormal Inexact Rounded
    960 dsbem413 toSci  0.000149E-97   -> 1E-101     Underflow Subnormal Inexact Rounded
    961 dsbem414 toSci  0.000150E-97   -> 2E-101     Underflow Subnormal Inexact Rounded
    962 dsbem415 toSci  0.000151E-97   -> 2E-101     Underflow Subnormal Inexact Rounded
    963 dsbem416 toSci  0.000249E-97   -> 2E-101     Underflow Subnormal Inexact Rounded
    964 dsbem417 toSci  0.000250E-97   -> 2E-101     Underflow Subnormal Inexact Rounded
    965 dsbem418 toSci  0.000251E-97   -> 3E-101     Underflow Subnormal Inexact Rounded
    966 dsbem419 toSci  0.00009E-97    -> 1E-101     Underflow Subnormal Inexact Rounded
    967 dsbem420 toSci  0.00005E-97    -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
    968 dsbem421 toSci  0.00003E-97    -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
    969 dsbem422 toSci  0.000009E-97   -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
    970 dsbem423 toSci  0.000005E-97   -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
    971 dsbem424 toSci  0.000003E-97   -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
    972 
    973 dsbem425 toSci  0.001049E-97   -> 1.0E-100   Underflow Subnormal Inexact Rounded
    974 dsbem426 toSci  0.001050E-97   -> 1.0E-100   Underflow Subnormal Inexact Rounded
    975 dsbem427 toSci  0.001051E-97   -> 1.1E-100   Underflow Subnormal Inexact Rounded
    976 dsbem428 toSci  0.001149E-97   -> 1.1E-100   Underflow Subnormal Inexact Rounded
    977 dsbem429 toSci  0.001150E-97   -> 1.2E-100   Underflow Subnormal Inexact Rounded
    978 dsbem430 toSci  0.001151E-97   -> 1.2E-100   Underflow Subnormal Inexact Rounded
    979 
    980 dsbem432 toSci  0.010049E-97   -> 1.00E-99  Underflow Subnormal Inexact Rounded
    981 dsbem433 toSci  0.010050E-97   -> 1.00E-99  Underflow Subnormal Inexact Rounded
    982 dsbem434 toSci  0.010051E-97   -> 1.01E-99  Underflow Subnormal Inexact Rounded
    983 dsbem435 toSci  0.010149E-97   -> 1.01E-99  Underflow Subnormal Inexact Rounded
    984 dsbem436 toSci  0.010150E-97   -> 1.02E-99  Underflow Subnormal Inexact Rounded
    985 dsbem437 toSci  0.010151E-97   -> 1.02E-99  Underflow Subnormal Inexact Rounded
    986 
    987 dsbem440 toSci  0.10103E-97    -> 1.010E-98 Underflow Subnormal Inexact Rounded
    988 dsbem441 toSci  0.10105E-97    -> 1.010E-98 Underflow Subnormal Inexact Rounded
    989 dsbem442 toSci  0.10107E-97    -> 1.011E-98 Underflow Subnormal Inexact Rounded
    990 dsbem443 toSci  0.10113E-97    -> 1.011E-98 Underflow Subnormal Inexact Rounded
    991 dsbem444 toSci  0.10115E-97    -> 1.012E-98 Underflow Subnormal Inexact Rounded
    992 dsbem445 toSci  0.10117E-97    -> 1.012E-98 Underflow Subnormal Inexact Rounded
    993 
    994 dsbem450 toSci  1.10730E-98    -> 1.107E-98 Underflow Subnormal Inexact Rounded
    995 dsbem451 toSci  1.10750E-98    -> 1.108E-98 Underflow Subnormal Inexact Rounded
    996 dsbem452 toSci  1.10770E-98    -> 1.108E-98 Underflow Subnormal Inexact Rounded
    997 dsbem453 toSci  1.10830E-98    -> 1.108E-98 Underflow Subnormal Inexact Rounded
    998 dsbem454 toSci  1.10850E-98    -> 1.108E-98 Underflow Subnormal Inexact Rounded
    999 dsbem455 toSci  1.10870E-98    -> 1.109E-98 Underflow Subnormal Inexact Rounded
   1000 
   1001 -- make sure sign OK
   1002 dsbem456 toSci  -0.10103E-97   -> -1.010E-98 Underflow Subnormal Inexact Rounded
   1003 dsbem457 toSci  -0.10105E-97   -> -1.010E-98 Underflow Subnormal Inexact Rounded
   1004 dsbem458 toSci  -0.10107E-97   -> -1.011E-98 Underflow Subnormal Inexact Rounded
   1005 dsbem459 toSci  -0.10113E-97   -> -1.011E-98 Underflow Subnormal Inexact Rounded
   1006 dsbem460 toSci  -0.10115E-97   -> -1.012E-98 Underflow Subnormal Inexact Rounded
   1007 dsbem461 toSci  -0.10117E-97   -> -1.012E-98 Underflow Subnormal Inexact Rounded
   1008 
   1009 -- '999s' cases
   1010 dsbem464 toSci  999999E-98         -> 9.99999E-93
   1011 dsbem465 toSci  99999.0E-97        -> 9.99990E-93
   1012 dsbem466 toSci  99999.E-97         -> 9.9999E-93
   1013 dsbem467 toSci  9999.9E-97         -> 9.9999E-94
   1014 dsbem468 toSci  999.99E-97         -> 9.9999E-95
   1015 dsbem469 toSci  99.999E-97         -> 9.9999E-96 Subnormal
   1016 dsbem470 toSci  9.9999E-97         -> 9.9999E-97 Subnormal
   1017 dsbem471 toSci  0.99999E-97        -> 1.0000E-97 Underflow Subnormal Inexact Rounded
   1018 dsbem472 toSci  0.099999E-97       -> 1.000E-98  Underflow Subnormal Inexact Rounded
   1019 dsbem473 toSci  0.0099999E-97      -> 1.00E-99   Underflow Subnormal Inexact Rounded
   1020 dsbem474 toSci  0.00099999E-97     -> 1.0E-100   Underflow Subnormal Inexact Rounded
   1021 dsbem475 toSci  0.000099999E-97    -> 1E-101     Underflow Subnormal Inexact Rounded
   1022 dsbem476 toSci  0.0000099999E-97   -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
   1023 dsbem477 toSci  0.00000099999E-97  -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
   1024 dsbem478 toSci  0.000000099999E-97 -> 0E-101     Underflow Subnormal Inexact Rounded Clamped
   1025 
   1026 -- Exponents with insignificant leading zeros
   1027 dsbas1001 toSci  1e999999999 -> Infinity Overflow Inexact Rounded
   1028 dsbas1002 toSci  1e0999999999 -> Infinity Overflow Inexact Rounded
   1029 dsbas1003 toSci  1e00999999999 -> Infinity Overflow Inexact Rounded
   1030 dsbas1004 toSci  1e000999999999 -> Infinity Overflow Inexact Rounded
   1031 dsbas1005 toSci  1e000000000000999999999 -> Infinity Overflow Inexact Rounded
   1032 dsbas1006 toSci  1e000000000001000000007 -> Infinity Overflow Inexact Rounded
   1033 dsbas1007 toSci  1e-999999999 -> 0E-101             Underflow Subnormal Inexact Rounded Clamped
   1034 dsbas1008 toSci  1e-0999999999 -> 0E-101            Underflow Subnormal Inexact Rounded Clamped
   1035 dsbas1009 toSci  1e-00999999999 -> 0E-101           Underflow Subnormal Inexact Rounded Clamped
   1036 dsbas1010 toSci  1e-000999999999 -> 0E-101          Underflow Subnormal Inexact Rounded Clamped
   1037 dsbas1011 toSci  1e-000000000000999999999 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
   1038 dsbas1012 toSci  1e-000000000001000000007 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
   1039 
   1040 -- check for double-rounded subnormals
   1041 dsbas1041 toSci     1.1152444E-96 ->  1.11524E-96 Inexact Rounded Subnormal Underflow
   1042 dsbas1042 toSci     1.1152445E-96 ->  1.11524E-96 Inexact Rounded Subnormal Underflow
   1043 dsbas1043 toSci     1.1152446E-96 ->  1.11524E-96 Inexact Rounded Subnormal Underflow
   1044 
   1045 -- clamped zeros [see also clamp.decTest]
   1046 dsbas1075 toSci   0e+10000  ->  0E+90   Clamped
   1047 dsbas1076 toSci   0e-10000  ->  0E-101  Clamped
   1048 dsbas1077 toSci  -0e+10000  -> -0E+90   Clamped
   1049 dsbas1078 toSci  -0e-10000  -> -0E-101  Clamped
   1050 
   1051 -- extreme values from next-wider
   1052 dsbas1101 toSci -9.999999999999999E+384 -> -Infinity Overflow Inexact Rounded
   1053 dsbas1102 toSci -1E-383 -> -0E-101 Inexact Rounded Subnormal Underflow Clamped
   1054 dsbas1103 toSci -1E-398 -> -0E-101 Inexact Rounded Subnormal Underflow Clamped
   1055 dsbas1104 toSci -0 -> -0
   1056 dsbas1105 toSci +0 ->  0
   1057 dsbas1106 toSci +1E-398 ->  0E-101 Inexact Rounded Subnormal Underflow Clamped
   1058 dsbas1107 toSci +1E-383 ->  0E-101 Inexact Rounded Subnormal Underflow Clamped
   1059 dsbas1108 toSci +9.999999999999999E+384 ->  Infinity Overflow Inexact Rounded
   1060 
   1061 -- narrowing case
   1062 dsbas1110 toSci 2.000000000000000E-99 -> 2.00E-99 Rounded Subnormal
   1063