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