• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1------------------------------------------------------------------------
2-- dqBase.decTest -- base decQuad <--> 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 decQuad.  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:   34
36maxExponent: 6144
37minExponent: -6143
38rounding:    half_even
39
40dqbas001 toSci       0 -> 0
41dqbas002 toSci       1 -> 1
42dqbas003 toSci     1.0 -> 1.0
43dqbas004 toSci    1.00 -> 1.00
44dqbas005 toSci      10 -> 10
45dqbas006 toSci    1000 -> 1000
46dqbas007 toSci    10.0 -> 10.0
47dqbas008 toSci    10.1 -> 10.1
48dqbas009 toSci    10.4 -> 10.4
49dqbas010 toSci    10.5 -> 10.5
50dqbas011 toSci    10.6 -> 10.6
51dqbas012 toSci    10.9 -> 10.9
52dqbas013 toSci    11.0 -> 11.0
53dqbas014 toSci  1.234 -> 1.234
54dqbas015 toSci  0.123 -> 0.123
55dqbas016 toSci  0.012 -> 0.012
56dqbas017 toSci  -0    -> -0
57dqbas018 toSci  -0.0  -> -0.0
58dqbas019 toSci -00.00 -> -0.00
59
60dqbas021 toSci     -1 -> -1
61dqbas022 toSci   -1.0 -> -1.0
62dqbas023 toSci   -0.1 -> -0.1
63dqbas024 toSci   -9.1 -> -9.1
64dqbas025 toSci   -9.11 -> -9.11
65dqbas026 toSci   -9.119 -> -9.119
66dqbas027 toSci   -9.999 -> -9.999
67
68dqbas030 toSci  '123456789.123456'   -> '123456789.123456'
69dqbas031 toSci  '123456789.000000'   -> '123456789.000000'
70dqbas032 toSci   '123456789123456'   -> '123456789123456'
71dqbas033 toSci   '0.0000123456789'   -> '0.0000123456789'
72dqbas034 toSci  '0.00000123456789'   -> '0.00000123456789'
73dqbas035 toSci '0.000000123456789'   -> '1.23456789E-7'
74dqbas036 toSci '0.0000000123456789'  -> '1.23456789E-8'
75
76dqbas037 toSci '0.123456789012344'   -> '0.123456789012344'
77dqbas038 toSci '0.123456789012345'   -> '0.123456789012345'
78
79-- test finite bounds (Negs of, then 0, Ntiny, Nmin, other, Nmax)
80dqbsn001 toSci -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
81dqbsn002 toSci -1E-6143 -> -1E-6143
82dqbsn003 toSci -1E-6176 -> -1E-6176 Subnormal
83dqbsn004 toSci -0 -> -0
84dqbsn005 toSci +0 ->  0
85dqbsn006 toSci +1E-6176 ->  1E-6176 Subnormal
86dqbsn007 toSci +1E-6143 ->  1E-6143
87dqbsn008 toSci +9.999999999999999999999999999999999E+6144 ->  9.999999999999999999999999999999999E+6144
88
89-- String [many more examples are implicitly tested elsewhere]
90-- strings without E cannot generate E in result
91dqbas040 toSci "12"        -> '12'
92dqbas041 toSci "-76"       -> '-76'
93dqbas042 toSci "12.76"     -> '12.76'
94dqbas043 toSci "+12.76"    -> '12.76'
95dqbas044 toSci "012.76"    -> '12.76'
96dqbas045 toSci "+0.003"    -> '0.003'
97dqbas046 toSci "17."       -> '17'
98dqbas047 toSci ".5"        -> '0.5'
99dqbas048 toSci "044"       -> '44'
100dqbas049 toSci "0044"      -> '44'
101dqbas050 toSci "0.0005"      -> '0.0005'
102dqbas051 toSci "00.00005"    -> '0.00005'
103dqbas052 toSci "0.000005"    -> '0.000005'
104dqbas053 toSci "0.0000050"   -> '0.0000050'
105dqbas054 toSci "0.0000005"   -> '5E-7'
106dqbas055 toSci "0.00000005"  -> '5E-8'
107dqbas056 toSci "12345678.543210" -> '12345678.543210'
108dqbas057 toSci "2345678.543210" -> '2345678.543210'
109dqbas058 toSci "345678.543210" -> '345678.543210'
110dqbas059 toSci "0345678.54321" -> '345678.54321'
111dqbas060 toSci "345678.5432" -> '345678.5432'
112dqbas061 toSci "+345678.5432" -> '345678.5432'
113dqbas062 toSci "+0345678.5432" -> '345678.5432'
114dqbas063 toSci "+00345678.5432" -> '345678.5432'
115dqbas064 toSci "-345678.5432"  -> '-345678.5432'
116dqbas065 toSci "-0345678.5432"  -> '-345678.5432'
117dqbas066 toSci "-00345678.5432"  -> '-345678.5432'
118-- examples
119dqbas067 toSci "5E-6"        -> '0.000005'
120dqbas068 toSci "50E-7"       -> '0.0000050'
121dqbas069 toSci "5E-7"        -> '5E-7'
122
123-- [No exotics as no Unicode]
124
125-- rounded with dots in all (including edge) places
126dqbas071 toSci  .1234567891234567890123456780123456123  -> 0.1234567891234567890123456780123456 Inexact Rounded
127dqbas072 toSci  1.234567891234567890123456780123456123  ->  1.234567891234567890123456780123456 Inexact Rounded
128dqbas073 toSci  12.34567891234567890123456780123456123  ->  12.34567891234567890123456780123456 Inexact Rounded
129dqbas074 toSci  123.4567891234567890123456780123456123  ->  123.4567891234567890123456780123456 Inexact Rounded
130dqbas075 toSci  1234.567891234567890123456780123456123  ->  1234.567891234567890123456780123456 Inexact Rounded
131dqbas076 toSci  12345.67891234567890123456780123456123  ->  12345.67891234567890123456780123456 Inexact Rounded
132dqbas077 toSci  123456.7891234567890123456780123456123  ->  123456.7891234567890123456780123456 Inexact Rounded
133dqbas078 toSci  1234567.891234567890123456780123456123  ->  1234567.891234567890123456780123456 Inexact Rounded
134dqbas079 toSci  12345678.91234567890123456780123456123  ->  12345678.91234567890123456780123456 Inexact Rounded
135dqbas080 toSci  123456789.1234567890123456780123456123  ->  123456789.1234567890123456780123456 Inexact Rounded
136dqbas081 toSci  1234567891.234567890123456780123456123  ->  1234567891.234567890123456780123456 Inexact Rounded
137dqbas082 toSci  12345678912.34567890123456780123456123  ->  12345678912.34567890123456780123456 Inexact Rounded
138dqbas083 toSci  123456789123.4567890123456780123456123  ->  123456789123.4567890123456780123456 Inexact Rounded
139dqbas084 toSci  1234567891234.567890123456780123456123  ->  1234567891234.567890123456780123456 Inexact Rounded
140dqbas085 toSci  12345678912345.67890123456780123456123  ->  12345678912345.67890123456780123456 Inexact Rounded
141dqbas086 toSci  123456789123456.7890123456780123456123  ->  123456789123456.7890123456780123456 Inexact Rounded
142dqbas087 toSci  1234567891234567.890123456780123456123  ->  1234567891234567.890123456780123456 Inexact Rounded
143dqbas088 toSci  12345678912345678.90123456780123456123  ->  12345678912345678.90123456780123456 Inexact Rounded
144dqbas089 toSci  123456789123456789.0123456780123456123  ->  123456789123456789.0123456780123456 Inexact Rounded
145dqbas090 toSci  1234567891234567890.123456780123456123  ->  1234567891234567890.123456780123456 Inexact Rounded
146dqbas091 toSci  12345678912345678901.23456780123456123  ->  12345678912345678901.23456780123456 Inexact Rounded
147dqbas092 toSci  123456789123456789012.3456780123456123  ->  123456789123456789012.3456780123456 Inexact Rounded
148dqbas093 toSci  1234567891234567890123.456780123456123  ->  1234567891234567890123.456780123456 Inexact Rounded
149dqbas094 toSci  12345678912345678901234.56780123456123  ->  12345678912345678901234.56780123456 Inexact Rounded
150dqbas095 toSci  123456789123456789012345.6780123456123  ->  123456789123456789012345.6780123456 Inexact Rounded
151dqbas096 toSci  1234567891234567890123456.780123456123  ->  1234567891234567890123456.780123456 Inexact Rounded
152dqbas097 toSci  12345678912345678901234567.80123456123  ->  12345678912345678901234567.80123456 Inexact Rounded
153dqbas098 toSci  123456789123456789012345678.0123456123  ->  123456789123456789012345678.0123456 Inexact Rounded
154dqbas099 toSci  1234567891234567890123456780.123456123  ->  1234567891234567890123456780.123456 Inexact Rounded
155dqbas100 toSci  12345678912345678901234567801.23456123  ->  12345678912345678901234567801.23456 Inexact Rounded
156dqbas101 toSci  123456789123456789012345678012.3456123  ->  123456789123456789012345678012.3456 Inexact Rounded
157dqbas102 toSci  1234567891234567890123456780123.456123  ->  1234567891234567890123456780123.456 Inexact Rounded
158dqbas103 toSci  12345678912345678901234567801234.56123  ->  12345678912345678901234567801234.56 Inexact Rounded
159dqbas104 toSci  123456789123456789012345678012345.6123  ->  123456789123456789012345678012345.6 Inexact Rounded
160dqbas105 toSci  1234567891234567890123456780123456.123  ->  1234567891234567890123456780123456  Inexact Rounded
161dqbas106 toSci  12345678912345678901234567801234561.23  ->  1.234567891234567890123456780123456E+34 Inexact Rounded
162dqbas107 toSci  123456789123456789012345678012345612.3  ->  1.234567891234567890123456780123456E+35 Inexact Rounded
163dqbas108 toSci  1234567891234567890123456780123456123.  ->  1.234567891234567890123456780123456E+36 Inexact Rounded
164-- 123456789012345678
165
166-- Numbers with E
167dqbas130 toSci "0.000E-1"  -> '0.0000'
168dqbas131 toSci "0.000E-2"  -> '0.00000'
169dqbas132 toSci "0.000E-3"  -> '0.000000'
170dqbas133 toSci "0.000E-4"  -> '0E-7'
171dqbas134 toSci "0.00E-2"   -> '0.0000'
172dqbas135 toSci "0.00E-3"   -> '0.00000'
173dqbas136 toSci "0.00E-4"   -> '0.000000'
174dqbas137 toSci "0.00E-5"   -> '0E-7'
175dqbas138 toSci "+0E+9"     -> '0E+9'
176dqbas139 toSci "-0E+9"     -> '-0E+9'
177dqbas140 toSci "1E+9"      -> '1E+9'
178dqbas141 toSci "1e+09"     -> '1E+9'
179dqbas142 toSci "1E+90"     -> '1E+90'
180dqbas143 toSci "+1E+009"   -> '1E+9'
181dqbas144 toSci "0E+9"      -> '0E+9'
182dqbas145 toSci "1E+9"      -> '1E+9'
183dqbas146 toSci "1E+09"     -> '1E+9'
184dqbas147 toSci "1e+90"     -> '1E+90'
185dqbas148 toSci "1E+009"    -> '1E+9'
186dqbas149 toSci "000E+9"    -> '0E+9'
187dqbas150 toSci "1E9"       -> '1E+9'
188dqbas151 toSci "1e09"      -> '1E+9'
189dqbas152 toSci "1E90"      -> '1E+90'
190dqbas153 toSci "1E009"     -> '1E+9'
191dqbas154 toSci "0E9"       -> '0E+9'
192dqbas155 toSci "0.000e+0"  -> '0.000'
193dqbas156 toSci "0.000E-1"  -> '0.0000'
194dqbas157 toSci "4E+9"      -> '4E+9'
195dqbas158 toSci "44E+9"     -> '4.4E+10'
196dqbas159 toSci "0.73e-7"   -> '7.3E-8'
197dqbas160 toSci "00E+9"     -> '0E+9'
198dqbas161 toSci "00E-9"     -> '0E-9'
199dqbas162 toSci "10E+9"     -> '1.0E+10'
200dqbas163 toSci "10E+09"    -> '1.0E+10'
201dqbas164 toSci "10e+90"    -> '1.0E+91'
202dqbas165 toSci "10E+009"   -> '1.0E+10'
203dqbas166 toSci "100e+9"    -> '1.00E+11'
204dqbas167 toSci "100e+09"   -> '1.00E+11'
205dqbas168 toSci "100E+90"   -> '1.00E+92'
206dqbas169 toSci "100e+009"  -> '1.00E+11'
207
208dqbas170 toSci "1.265"     -> '1.265'
209dqbas171 toSci "1.265E-20" -> '1.265E-20'
210dqbas172 toSci "1.265E-8"  -> '1.265E-8'
211dqbas173 toSci "1.265E-4"  -> '0.0001265'
212dqbas174 toSci "1.265E-3"  -> '0.001265'
213dqbas175 toSci "1.265E-2"  -> '0.01265'
214dqbas176 toSci "1.265E-1"  -> '0.1265'
215dqbas177 toSci "1.265E-0"  -> '1.265'
216dqbas178 toSci "1.265E+1"  -> '12.65'
217dqbas179 toSci "1.265E+2"  -> '126.5'
218dqbas180 toSci "1.265E+3"  -> '1265'
219dqbas181 toSci "1.265E+4"  -> '1.265E+4'
220dqbas182 toSci "1.265E+8"  -> '1.265E+8'
221dqbas183 toSci "1.265E+20" -> '1.265E+20'
222
223dqbas190 toSci "12.65"     -> '12.65'
224dqbas191 toSci "12.65E-20" -> '1.265E-19'
225dqbas192 toSci "12.65E-8"  -> '1.265E-7'
226dqbas193 toSci "12.65E-4"  -> '0.001265'
227dqbas194 toSci "12.65E-3"  -> '0.01265'
228dqbas195 toSci "12.65E-2"  -> '0.1265'
229dqbas196 toSci "12.65E-1"  -> '1.265'
230dqbas197 toSci "12.65E-0"  -> '12.65'
231dqbas198 toSci "12.65E+1"  -> '126.5'
232dqbas199 toSci "12.65E+2"  -> '1265'
233dqbas200 toSci "12.65E+3"  -> '1.265E+4'
234dqbas201 toSci "12.65E+4"  -> '1.265E+5'
235dqbas202 toSci "12.65E+8"  -> '1.265E+9'
236dqbas203 toSci "12.65E+20" -> '1.265E+21'
237
238dqbas210 toSci "126.5"     -> '126.5'
239dqbas211 toSci "126.5E-20" -> '1.265E-18'
240dqbas212 toSci "126.5E-8"  -> '0.000001265'
241dqbas213 toSci "126.5E-4"  -> '0.01265'
242dqbas214 toSci "126.5E-3"  -> '0.1265'
243dqbas215 toSci "126.5E-2"  -> '1.265'
244dqbas216 toSci "126.5E-1"  -> '12.65'
245dqbas217 toSci "126.5E-0"  -> '126.5'
246dqbas218 toSci "126.5E+1"  -> '1265'
247dqbas219 toSci "126.5E+2"  -> '1.265E+4'
248dqbas220 toSci "126.5E+3"  -> '1.265E+5'
249dqbas221 toSci "126.5E+4"  -> '1.265E+6'
250dqbas222 toSci "126.5E+8"  -> '1.265E+10'
251dqbas223 toSci "126.5E+20" -> '1.265E+22'
252
253dqbas230 toSci "1265"     -> '1265'
254dqbas231 toSci "1265E-20" -> '1.265E-17'
255dqbas232 toSci "1265E-8"  -> '0.00001265'
256dqbas233 toSci "1265E-4"  -> '0.1265'
257dqbas234 toSci "1265E-3"  -> '1.265'
258dqbas235 toSci "1265E-2"  -> '12.65'
259dqbas236 toSci "1265E-1"  -> '126.5'
260dqbas237 toSci "1265E-0"  -> '1265'
261dqbas238 toSci "1265E+1"  -> '1.265E+4'
262dqbas239 toSci "1265E+2"  -> '1.265E+5'
263dqbas240 toSci "1265E+3"  -> '1.265E+6'
264dqbas241 toSci "1265E+4"  -> '1.265E+7'
265dqbas242 toSci "1265E+8"  -> '1.265E+11'
266dqbas243 toSci "1265E+20" -> '1.265E+23'
267
268dqbas250 toSci "0.1265"     -> '0.1265'
269dqbas251 toSci "0.1265E-20" -> '1.265E-21'
270dqbas252 toSci "0.1265E-8"  -> '1.265E-9'
271dqbas253 toSci "0.1265E-4"  -> '0.00001265'
272dqbas254 toSci "0.1265E-3"  -> '0.0001265'
273dqbas255 toSci "0.1265E-2"  -> '0.001265'
274dqbas256 toSci "0.1265E-1"  -> '0.01265'
275dqbas257 toSci "0.1265E-0"  -> '0.1265'
276dqbas258 toSci "0.1265E+1"  -> '1.265'
277dqbas259 toSci "0.1265E+2"  -> '12.65'
278dqbas260 toSci "0.1265E+3"  -> '126.5'
279dqbas261 toSci "0.1265E+4"  -> '1265'
280dqbas262 toSci "0.1265E+8"  -> '1.265E+7'
281dqbas263 toSci "0.1265E+20" -> '1.265E+19'
282
283-- some more negative zeros [systematic tests below]
284dqbas290 toSci "-0.000E-1"  -> '-0.0000'
285dqbas291 toSci "-0.000E-2"  -> '-0.00000'
286dqbas292 toSci "-0.000E-3"  -> '-0.000000'
287dqbas293 toSci "-0.000E-4"  -> '-0E-7'
288dqbas294 toSci "-0.00E-2"   -> '-0.0000'
289dqbas295 toSci "-0.00E-3"   -> '-0.00000'
290dqbas296 toSci "-0.0E-2"    -> '-0.000'
291dqbas297 toSci "-0.0E-3"    -> '-0.0000'
292dqbas298 toSci "-0E-2"      -> '-0.00'
293dqbas299 toSci "-0E-3"      -> '-0.000'
294
295-- Engineering notation tests
296dqbas301  toSci 10e12  -> 1.0E+13
297dqbas302  toEng 10e12  -> 10E+12
298dqbas303  toSci 10e11  -> 1.0E+12
299dqbas304  toEng 10e11  -> 1.0E+12
300dqbas305  toSci 10e10  -> 1.0E+11
301dqbas306  toEng 10e10  -> 100E+9
302dqbas307  toSci 10e9   -> 1.0E+10
303dqbas308  toEng 10e9   -> 10E+9
304dqbas309  toSci 10e8   -> 1.0E+9
305dqbas310  toEng 10e8   -> 1.0E+9
306dqbas311  toSci 10e7   -> 1.0E+8
307dqbas312  toEng 10e7   -> 100E+6
308dqbas313  toSci 10e6   -> 1.0E+7
309dqbas314  toEng 10e6   -> 10E+6
310dqbas315  toSci 10e5   -> 1.0E+6
311dqbas316  toEng 10e5   -> 1.0E+6
312dqbas317  toSci 10e4   -> 1.0E+5
313dqbas318  toEng 10e4   -> 100E+3
314dqbas319  toSci 10e3   -> 1.0E+4
315dqbas320  toEng 10e3   -> 10E+3
316dqbas321  toSci 10e2   -> 1.0E+3
317dqbas322  toEng 10e2   -> 1.0E+3
318dqbas323  toSci 10e1   -> 1.0E+2
319dqbas324  toEng 10e1   -> 100
320dqbas325  toSci 10e0   -> 10
321dqbas326  toEng 10e0   -> 10
322dqbas327  toSci 10e-1  -> 1.0
323dqbas328  toEng 10e-1  -> 1.0
324dqbas329  toSci 10e-2  -> 0.10
325dqbas330  toEng 10e-2  -> 0.10
326dqbas331  toSci 10e-3  -> 0.010
327dqbas332  toEng 10e-3  -> 0.010
328dqbas333  toSci 10e-4  -> 0.0010
329dqbas334  toEng 10e-4  -> 0.0010
330dqbas335  toSci 10e-5  -> 0.00010
331dqbas336  toEng 10e-5  -> 0.00010
332dqbas337  toSci 10e-6  -> 0.000010
333dqbas338  toEng 10e-6  -> 0.000010
334dqbas339  toSci 10e-7  -> 0.0000010
335dqbas340  toEng 10e-7  -> 0.0000010
336dqbas341  toSci 10e-8  -> 1.0E-7
337dqbas342  toEng 10e-8  -> 100E-9
338dqbas343  toSci 10e-9  -> 1.0E-8
339dqbas344  toEng 10e-9  -> 10E-9
340dqbas345  toSci 10e-10 -> 1.0E-9
341dqbas346  toEng 10e-10 -> 1.0E-9
342dqbas347  toSci 10e-11 -> 1.0E-10
343dqbas348  toEng 10e-11 -> 100E-12
344dqbas349  toSci 10e-12 -> 1.0E-11
345dqbas350  toEng 10e-12 -> 10E-12
346dqbas351  toSci 10e-13 -> 1.0E-12
347dqbas352  toEng 10e-13 -> 1.0E-12
348
349dqbas361  toSci 7E12  -> 7E+12
350dqbas362  toEng 7E12  -> 7E+12
351dqbas363  toSci 7E11  -> 7E+11
352dqbas364  toEng 7E11  -> 700E+9
353dqbas365  toSci 7E10  -> 7E+10
354dqbas366  toEng 7E10  -> 70E+9
355dqbas367  toSci 7E9   -> 7E+9
356dqbas368  toEng 7E9   -> 7E+9
357dqbas369  toSci 7E8   -> 7E+8
358dqbas370  toEng 7E8   -> 700E+6
359dqbas371  toSci 7E7   -> 7E+7
360dqbas372  toEng 7E7   -> 70E+6
361dqbas373  toSci 7E6   -> 7E+6
362dqbas374  toEng 7E6   -> 7E+6
363dqbas375  toSci 7E5   -> 7E+5
364dqbas376  toEng 7E5   -> 700E+3
365dqbas377  toSci 7E4   -> 7E+4
366dqbas378  toEng 7E4   -> 70E+3
367dqbas379  toSci 7E3   -> 7E+3
368dqbas380  toEng 7E3   -> 7E+3
369dqbas381  toSci 7E2   -> 7E+2
370dqbas382  toEng 7E2   -> 700
371dqbas383  toSci 7E1   -> 7E+1
372dqbas384  toEng 7E1   -> 70
373dqbas385  toSci 7E0   -> 7
374dqbas386  toEng 7E0   -> 7
375dqbas387  toSci 7E-1  -> 0.7
376dqbas388  toEng 7E-1  -> 0.7
377dqbas389  toSci 7E-2  -> 0.07
378dqbas390  toEng 7E-2  -> 0.07
379dqbas391  toSci 7E-3  -> 0.007
380dqbas392  toEng 7E-3  -> 0.007
381dqbas393  toSci 7E-4  -> 0.0007
382dqbas394  toEng 7E-4  -> 0.0007
383dqbas395  toSci 7E-5  -> 0.00007
384dqbas396  toEng 7E-5  -> 0.00007
385dqbas397  toSci 7E-6  -> 0.000007
386dqbas398  toEng 7E-6  -> 0.000007
387dqbas399  toSci 7E-7  -> 7E-7
388dqbas400  toEng 7E-7  -> 700E-9
389dqbas401  toSci 7E-8  -> 7E-8
390dqbas402  toEng 7E-8  -> 70E-9
391dqbas403  toSci 7E-9  -> 7E-9
392dqbas404  toEng 7E-9  -> 7E-9
393dqbas405  toSci 7E-10 -> 7E-10
394dqbas406  toEng 7E-10 -> 700E-12
395dqbas407  toSci 7E-11 -> 7E-11
396dqbas408  toEng 7E-11 -> 70E-12
397dqbas409  toSci 7E-12 -> 7E-12
398dqbas410  toEng 7E-12 -> 7E-12
399dqbas411  toSci 7E-13 -> 7E-13
400dqbas412  toEng 7E-13 -> 700E-15
401
402-- Exacts remain exact up to precision ..
403dqbas420  toSci    100 -> 100
404dqbas422  toSci   1000 -> 1000
405dqbas424  toSci  999.9 ->  999.9
406dqbas426  toSci 1000.0 -> 1000.0
407dqbas428  toSci 1000.1 -> 1000.1
408dqbas430  toSci 10000 -> 10000
409dqbas432  toSci 1000000000000000000000000000000        -> 1000000000000000000000000000000
410dqbas434  toSci 10000000000000000000000000000000       -> 10000000000000000000000000000000
411dqbas436  toSci 100000000000000000000000000000000      -> 100000000000000000000000000000000
412dqbas438  toSci 1000000000000000000000000000000000     -> 1000000000000000000000000000000000
413dqbas440  toSci 10000000000000000000000000000000000    -> 1.000000000000000000000000000000000E+34   Rounded
414dqbas442  toSci 10000000000000000000000000000000000    -> 1.000000000000000000000000000000000E+34   Rounded
415dqbas444  toSci 10000000000000000000000000000000003    -> 1.000000000000000000000000000000000E+34   Rounded Inexact
416dqbas446  toSci 10000000000000000000000000000000005    -> 1.000000000000000000000000000000000E+34   Rounded Inexact
417dqbas448  toSci 100000000000000000000000000000000050   -> 1.000000000000000000000000000000000E+35   Rounded Inexact
418dqbas450  toSci 10000000000000000000000000000000009    -> 1.000000000000000000000000000000001E+34   Rounded Inexact
419dqbas452  toSci 100000000000000000000000000000000000   -> 1.000000000000000000000000000000000E+35   Rounded
420dqbas454  toSci 100000000000000000000000000000000003   -> 1.000000000000000000000000000000000E+35   Rounded Inexact
421dqbas456  toSci 100000000000000000000000000000000005   -> 1.000000000000000000000000000000000E+35   Rounded Inexact
422dqbas458  toSci 100000000000000000000000000000000009   -> 1.000000000000000000000000000000000E+35   Rounded Inexact
423dqbas460  toSci 1000000000000000000000000000000000000  -> 1.000000000000000000000000000000000E+36   Rounded
424dqbas462  toSci 1000000000000000000000000000000000300  -> 1.000000000000000000000000000000000E+36   Rounded Inexact
425dqbas464  toSci 1000000000000000000000000000000000500  -> 1.000000000000000000000000000000000E+36   Rounded Inexact
426dqbas466  toSci 1000000000000000000000000000000000900  -> 1.000000000000000000000000000000001E+36   Rounded Inexact
427dqbas468  toSci 10000000000000000000000000000000000000 -> 1.000000000000000000000000000000000E+37   Rounded
428dqbas470  toSci 10000000000000000000000000000000003000 -> 1.000000000000000000000000000000000E+37   Rounded Inexact
429dqbas472  toSci 10000000000000000000000000000000005000 -> 1.000000000000000000000000000000000E+37   Rounded Inexact
430dqbas474  toSci 10000000000000000000000000000000009000 -> 1.000000000000000000000000000000001E+37   Rounded Inexact
431
432-- check rounding modes heeded
433rounding:  ceiling
434dqbsr401  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
435dqbsr402  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112346  Rounded Inexact
436dqbsr403  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112346  Rounded Inexact
437dqbsr404  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112346  Rounded Inexact
438rounding:  up
439dqbsr405  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
440dqbsr406  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112346  Rounded Inexact
441dqbsr407  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112346  Rounded Inexact
442dqbsr408  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112346  Rounded Inexact
443rounding:  floor
444dqbsr410  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
445dqbsr411  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112345  Rounded Inexact
446dqbsr412  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112345  Rounded Inexact
447dqbsr413  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112345  Rounded Inexact
448rounding:  half_down
449dqbsr415  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
450dqbsr416  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112345  Rounded Inexact
451dqbsr417  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112345  Rounded Inexact
452dqbsr418  toSci  1.11111111111111111111111111111234650   ->  1.111111111111111111111111111112346  Rounded Inexact
453dqbsr419  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112346  Rounded Inexact
454rounding:  half_even
455dqbsr421  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
456dqbsr422  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112345  Rounded Inexact
457dqbsr423  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112346  Rounded Inexact
458dqbsr424  toSci  1.11111111111111111111111111111234650   ->  1.111111111111111111111111111112346  Rounded Inexact
459dqbsr425  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112346  Rounded Inexact
460rounding:  down
461dqbsr426  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
462dqbsr427  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112345  Rounded Inexact
463dqbsr428  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112345  Rounded Inexact
464dqbsr429  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112345  Rounded Inexact
465rounding:  half_up
466dqbsr431  toSci  1.1111111111111111111111111111123450    ->  1.111111111111111111111111111112345  Rounded
467dqbsr432  toSci  1.11111111111111111111111111111234549   ->  1.111111111111111111111111111112345  Rounded Inexact
468dqbsr433  toSci  1.11111111111111111111111111111234550   ->  1.111111111111111111111111111112346  Rounded Inexact
469dqbsr434  toSci  1.11111111111111111111111111111234650   ->  1.111111111111111111111111111112347  Rounded Inexact
470dqbsr435  toSci  1.11111111111111111111111111111234551   ->  1.111111111111111111111111111112346  Rounded Inexact
471-- negatives
472rounding:  ceiling
473dqbsr501  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
474dqbsr502  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112345  Rounded Inexact
475dqbsr503  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112345  Rounded Inexact
476dqbsr504  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112345  Rounded Inexact
477rounding:  up
478dqbsr505  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
479dqbsr506  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112346  Rounded Inexact
480dqbsr507  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112346  Rounded Inexact
481dqbsr508  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112346  Rounded Inexact
482rounding:  floor
483dqbsr510  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
484dqbsr511  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112346  Rounded Inexact
485dqbsr512  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112346  Rounded Inexact
486dqbsr513  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112346  Rounded Inexact
487rounding:  half_down
488dqbsr515  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
489dqbsr516  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112345  Rounded Inexact
490dqbsr517  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112345  Rounded Inexact
491dqbsr518  toSci -1.11111111111111111111111111111234650   -> -1.111111111111111111111111111112346  Rounded Inexact
492dqbsr519  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112346  Rounded Inexact
493rounding:  half_even
494dqbsr521  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
495dqbsr522  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112345  Rounded Inexact
496dqbsr523  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112346  Rounded Inexact
497dqbsr524  toSci -1.11111111111111111111111111111234650   -> -1.111111111111111111111111111112346  Rounded Inexact
498dqbsr525  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112346  Rounded Inexact
499rounding:  down
500dqbsr526  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
501dqbsr527  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112345  Rounded Inexact
502dqbsr528  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112345  Rounded Inexact
503dqbsr529  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112345  Rounded Inexact
504rounding:  half_up
505dqbsr531  toSci -1.1111111111111111111111111111123450    -> -1.111111111111111111111111111112345  Rounded
506dqbsr532  toSci -1.11111111111111111111111111111234549   -> -1.111111111111111111111111111112345  Rounded Inexact
507dqbsr533  toSci -1.11111111111111111111111111111234550   -> -1.111111111111111111111111111112346  Rounded Inexact
508dqbsr534  toSci -1.11111111111111111111111111111234650   -> -1.111111111111111111111111111112347  Rounded Inexact
509dqbsr535  toSci -1.11111111111111111111111111111234551   -> -1.111111111111111111111111111112346  Rounded Inexact
510
511rounding:    half_even
512
513-- The 'baddies' tests from DiagBigDecimal, plus some new ones
514dqbas500 toSci '1..2'            -> NaN Conversion_syntax
515dqbas501 toSci '.'               -> NaN Conversion_syntax
516dqbas502 toSci '..'              -> NaN Conversion_syntax
517dqbas503 toSci '++1'             -> NaN Conversion_syntax
518dqbas504 toSci '--1'             -> NaN Conversion_syntax
519dqbas505 toSci '-+1'             -> NaN Conversion_syntax
520dqbas506 toSci '+-1'             -> NaN Conversion_syntax
521dqbas507 toSci '12e'             -> NaN Conversion_syntax
522dqbas508 toSci '12e++'           -> NaN Conversion_syntax
523dqbas509 toSci '12f4'            -> NaN Conversion_syntax
524dqbas510 toSci ' +1'             -> NaN Conversion_syntax
525dqbas511 toSci '+ 1'             -> NaN Conversion_syntax
526dqbas512 toSci '12 '             -> NaN Conversion_syntax
527dqbas513 toSci ' + 1'            -> NaN Conversion_syntax
528dqbas514 toSci ' - 1 '           -> NaN Conversion_syntax
529dqbas515 toSci 'x'               -> NaN Conversion_syntax
530dqbas516 toSci '-1-'             -> NaN Conversion_syntax
531dqbas517 toSci '12-'             -> NaN Conversion_syntax
532dqbas518 toSci '3+'              -> NaN Conversion_syntax
533dqbas519 toSci ''                -> NaN Conversion_syntax
534dqbas520 toSci '1e-'             -> NaN Conversion_syntax
535dqbas521 toSci '7e99999a'        -> NaN Conversion_syntax
536dqbas522 toSci '7e123567890x'    -> NaN Conversion_syntax
537dqbas523 toSci '7e12356789012x'  -> NaN Conversion_syntax
538dqbas524 toSci ''                -> NaN Conversion_syntax
539dqbas525 toSci 'e100'            -> NaN Conversion_syntax
540dqbas526 toSci '\u0e5a'          -> NaN Conversion_syntax
541dqbas527 toSci '\u0b65'          -> NaN Conversion_syntax
542dqbas528 toSci '123,65'          -> NaN Conversion_syntax
543dqbas529 toSci '1.34.5'          -> NaN Conversion_syntax
544dqbas530 toSci '.123.5'          -> NaN Conversion_syntax
545dqbas531 toSci '01.35.'          -> NaN Conversion_syntax
546dqbas532 toSci '01.35-'          -> NaN Conversion_syntax
547dqbas533 toSci '0000..'          -> NaN Conversion_syntax
548dqbas534 toSci '.0000.'          -> NaN Conversion_syntax
549dqbas535 toSci '00..00'          -> NaN Conversion_syntax
550dqbas536 toSci '111e*123'        -> NaN Conversion_syntax
551dqbas537 toSci '111e123-'        -> NaN Conversion_syntax
552dqbas538 toSci '111e+12+'        -> NaN Conversion_syntax
553dqbas539 toSci '111e1-3-'        -> NaN Conversion_syntax
554dqbas540 toSci '111e1*23'        -> NaN Conversion_syntax
555dqbas541 toSci '111e1e+3'        -> NaN Conversion_syntax
556dqbas542 toSci '1e1.0'           -> NaN Conversion_syntax
557dqbas543 toSci '1e123e'          -> NaN Conversion_syntax
558dqbas544 toSci 'ten'             -> NaN Conversion_syntax
559dqbas545 toSci 'ONE'             -> NaN Conversion_syntax
560dqbas546 toSci '1e.1'            -> NaN Conversion_syntax
561dqbas547 toSci '1e1.'            -> NaN Conversion_syntax
562dqbas548 toSci '1ee'             -> NaN Conversion_syntax
563dqbas549 toSci 'e+1'             -> NaN Conversion_syntax
564dqbas550 toSci '1.23.4'          -> NaN Conversion_syntax
565dqbas551 toSci '1.2.1'           -> NaN Conversion_syntax
566dqbas552 toSci '1E+1.2'          -> NaN Conversion_syntax
567dqbas553 toSci '1E+1.2.3'        -> NaN Conversion_syntax
568dqbas554 toSci '1E++1'           -> NaN Conversion_syntax
569dqbas555 toSci '1E--1'           -> NaN Conversion_syntax
570dqbas556 toSci '1E+-1'           -> NaN Conversion_syntax
571dqbas557 toSci '1E-+1'           -> NaN Conversion_syntax
572dqbas558 toSci '1E''1'           -> NaN Conversion_syntax
573dqbas559 toSci "1E""1"           -> NaN Conversion_syntax
574dqbas560 toSci "1E"""""          -> NaN Conversion_syntax
575-- Near-specials
576dqbas561 toSci "qNaN"            -> NaN Conversion_syntax
577dqbas562 toSci "NaNq"            -> NaN Conversion_syntax
578dqbas563 toSci "NaNs"            -> NaN Conversion_syntax
579dqbas564 toSci "Infi"            -> NaN Conversion_syntax
580dqbas565 toSci "Infin"           -> NaN Conversion_syntax
581dqbas566 toSci "Infini"          -> NaN Conversion_syntax
582dqbas567 toSci "Infinit"         -> NaN Conversion_syntax
583dqbas568 toSci "-Infinit"        -> NaN Conversion_syntax
584dqbas569 toSci "0Inf"            -> NaN Conversion_syntax
585dqbas570 toSci "9Inf"            -> NaN Conversion_syntax
586dqbas571 toSci "-0Inf"           -> NaN Conversion_syntax
587dqbas572 toSci "-9Inf"           -> NaN Conversion_syntax
588dqbas573 toSci "-sNa"            -> NaN Conversion_syntax
589dqbas574 toSci "xNaN"            -> NaN Conversion_syntax
590dqbas575 toSci "0sNaN"           -> NaN Conversion_syntax
591
592-- some baddies with dots and Es and dots and specials
593dqbas576 toSci  'e+1'            ->  NaN Conversion_syntax
594dqbas577 toSci  '.e+1'           ->  NaN Conversion_syntax
595dqbas578 toSci  '+.e+1'          ->  NaN Conversion_syntax
596dqbas579 toSci  '-.e+'           ->  NaN Conversion_syntax
597dqbas580 toSci  '-.e'            ->  NaN Conversion_syntax
598dqbas581 toSci  'E+1'            ->  NaN Conversion_syntax
599dqbas582 toSci  '.E+1'           ->  NaN Conversion_syntax
600dqbas583 toSci  '+.E+1'          ->  NaN Conversion_syntax
601dqbas584 toSci  '-.E+'           ->  NaN Conversion_syntax
602dqbas585 toSci  '-.E'            ->  NaN Conversion_syntax
603
604dqbas586 toSci  '.NaN'           ->  NaN Conversion_syntax
605dqbas587 toSci  '-.NaN'          ->  NaN Conversion_syntax
606dqbas588 toSci  '+.sNaN'         ->  NaN Conversion_syntax
607dqbas589 toSci  '+.Inf'          ->  NaN Conversion_syntax
608dqbas590 toSci  '.Infinity'      ->  NaN Conversion_syntax
609
610-- Zeros
611dqbas601 toSci 0.000000000       -> 0E-9
612dqbas602 toSci 0.00000000        -> 0E-8
613dqbas603 toSci 0.0000000         -> 0E-7
614dqbas604 toSci 0.000000          -> 0.000000
615dqbas605 toSci 0.00000           -> 0.00000
616dqbas606 toSci 0.0000            -> 0.0000
617dqbas607 toSci 0.000             -> 0.000
618dqbas608 toSci 0.00              -> 0.00
619dqbas609 toSci 0.0               -> 0.0
620dqbas610 toSci  .0               -> 0.0
621dqbas611 toSci 0.                -> 0
622dqbas612 toSci -.0               -> -0.0
623dqbas613 toSci -0.               -> -0
624dqbas614 toSci -0.0              -> -0.0
625dqbas615 toSci -0.00             -> -0.00
626dqbas616 toSci -0.000            -> -0.000
627dqbas617 toSci -0.0000           -> -0.0000
628dqbas618 toSci -0.00000          -> -0.00000
629dqbas619 toSci -0.000000         -> -0.000000
630dqbas620 toSci -0.0000000        -> -0E-7
631dqbas621 toSci -0.00000000       -> -0E-8
632dqbas622 toSci -0.000000000      -> -0E-9
633
634dqbas630 toSci  0.00E+0          -> 0.00
635dqbas631 toSci  0.00E+1          -> 0.0
636dqbas632 toSci  0.00E+2          -> 0
637dqbas633 toSci  0.00E+3          -> 0E+1
638dqbas634 toSci  0.00E+4          -> 0E+2
639dqbas635 toSci  0.00E+5          -> 0E+3
640dqbas636 toSci  0.00E+6          -> 0E+4
641dqbas637 toSci  0.00E+7          -> 0E+5
642dqbas638 toSci  0.00E+8          -> 0E+6
643dqbas639 toSci  0.00E+9          -> 0E+7
644
645dqbas640 toSci  0.0E+0           -> 0.0
646dqbas641 toSci  0.0E+1           -> 0
647dqbas642 toSci  0.0E+2           -> 0E+1
648dqbas643 toSci  0.0E+3           -> 0E+2
649dqbas644 toSci  0.0E+4           -> 0E+3
650dqbas645 toSci  0.0E+5           -> 0E+4
651dqbas646 toSci  0.0E+6           -> 0E+5
652dqbas647 toSci  0.0E+7           -> 0E+6
653dqbas648 toSci  0.0E+8           -> 0E+7
654dqbas649 toSci  0.0E+9           -> 0E+8
655
656dqbas650 toSci  0E+0             -> 0
657dqbas651 toSci  0E+1             -> 0E+1
658dqbas652 toSci  0E+2             -> 0E+2
659dqbas653 toSci  0E+3             -> 0E+3
660dqbas654 toSci  0E+4             -> 0E+4
661dqbas655 toSci  0E+5             -> 0E+5
662dqbas656 toSci  0E+6             -> 0E+6
663dqbas657 toSci  0E+7             -> 0E+7
664dqbas658 toSci  0E+8             -> 0E+8
665dqbas659 toSci  0E+9             -> 0E+9
666
667dqbas660 toSci  0.0E-0           -> 0.0
668dqbas661 toSci  0.0E-1           -> 0.00
669dqbas662 toSci  0.0E-2           -> 0.000
670dqbas663 toSci  0.0E-3           -> 0.0000
671dqbas664 toSci  0.0E-4           -> 0.00000
672dqbas665 toSci  0.0E-5           -> 0.000000
673dqbas666 toSci  0.0E-6           -> 0E-7
674dqbas667 toSci  0.0E-7           -> 0E-8
675dqbas668 toSci  0.0E-8           -> 0E-9
676dqbas669 toSci  0.0E-9           -> 0E-10
677
678dqbas670 toSci  0.00E-0          -> 0.00
679dqbas671 toSci  0.00E-1          -> 0.000
680dqbas672 toSci  0.00E-2          -> 0.0000
681dqbas673 toSci  0.00E-3          -> 0.00000
682dqbas674 toSci  0.00E-4          -> 0.000000
683dqbas675 toSci  0.00E-5          -> 0E-7
684dqbas676 toSci  0.00E-6          -> 0E-8
685dqbas677 toSci  0.00E-7          -> 0E-9
686dqbas678 toSci  0.00E-8          -> 0E-10
687dqbas679 toSci  0.00E-9          -> 0E-11
688
689dqbas680 toSci  000000.          ->  0
690dqbas681 toSci   00000.          ->  0
691dqbas682 toSci    0000.          ->  0
692dqbas683 toSci     000.          ->  0
693dqbas684 toSci      00.          ->  0
694dqbas685 toSci       0.          ->  0
695dqbas686 toSci  +00000.          ->  0
696dqbas687 toSci  -00000.          -> -0
697dqbas688 toSci  +0.              ->  0
698dqbas689 toSci  -0.              -> -0
699
700-- Specials
701dqbas700 toSci "NaN"             -> NaN
702dqbas701 toSci "nan"             -> NaN
703dqbas702 toSci "nAn"             -> NaN
704dqbas703 toSci "NAN"             -> NaN
705dqbas704 toSci "+NaN"            -> NaN
706dqbas705 toSci "+nan"            -> NaN
707dqbas706 toSci "+nAn"            -> NaN
708dqbas707 toSci "+NAN"            -> NaN
709dqbas708 toSci "-NaN"            -> -NaN
710dqbas709 toSci "-nan"            -> -NaN
711dqbas710 toSci "-nAn"            -> -NaN
712dqbas711 toSci "-NAN"            -> -NaN
713dqbas712 toSci 'NaN0'            -> NaN
714dqbas713 toSci 'NaN1'            -> NaN1
715dqbas714 toSci 'NaN12'           -> NaN12
716dqbas715 toSci 'NaN123'          -> NaN123
717dqbas716 toSci 'NaN1234'         -> NaN1234
718dqbas717 toSci 'NaN01'           -> NaN1
719dqbas718 toSci 'NaN012'          -> NaN12
720dqbas719 toSci 'NaN0123'         -> NaN123
721dqbas720 toSci 'NaN01234'        -> NaN1234
722dqbas721 toSci 'NaN001'          -> NaN1
723dqbas722 toSci 'NaN0012'         -> NaN12
724dqbas723 toSci 'NaN00123'        -> NaN123
725dqbas724 toSci 'NaN001234'       -> NaN1234
726dqbas725 toSci 'NaN1234567890123456781234567890123456' -> NaN Conversion_syntax
727dqbas726 toSci 'NaN123e+1'       -> NaN Conversion_syntax
728dqbas727 toSci 'NaN12.45'        -> NaN Conversion_syntax
729dqbas728 toSci 'NaN-12'          -> NaN Conversion_syntax
730dqbas729 toSci 'NaN+12'          -> NaN Conversion_syntax
731
732dqbas730 toSci "sNaN"            -> sNaN
733dqbas731 toSci "snan"            -> sNaN
734dqbas732 toSci "SnAn"            -> sNaN
735dqbas733 toSci "SNAN"            -> sNaN
736dqbas734 toSci "+sNaN"           -> sNaN
737dqbas735 toSci "+snan"           -> sNaN
738dqbas736 toSci "+SnAn"           -> sNaN
739dqbas737 toSci "+SNAN"           -> sNaN
740dqbas738 toSci "-sNaN"           -> -sNaN
741dqbas739 toSci "-snan"           -> -sNaN
742dqbas740 toSci "-SnAn"           -> -sNaN
743dqbas741 toSci "-SNAN"           -> -sNaN
744dqbas742 toSci 'sNaN0000'        -> sNaN
745dqbas743 toSci 'sNaN7'           -> sNaN7
746dqbas744 toSci 'sNaN007234'      -> sNaN7234
747dqbas745 toSci 'sNaN1234567890123456787234561234567890' -> NaN Conversion_syntax
748dqbas746 toSci 'sNaN72.45'       -> NaN Conversion_syntax
749dqbas747 toSci 'sNaN-72'         -> NaN Conversion_syntax
750
751dqbas748 toSci "Inf"             -> Infinity
752dqbas749 toSci "inf"             -> Infinity
753dqbas750 toSci "iNf"             -> Infinity
754dqbas751 toSci "INF"             -> Infinity
755dqbas752 toSci "+Inf"            -> Infinity
756dqbas753 toSci "+inf"            -> Infinity
757dqbas754 toSci "+iNf"            -> Infinity
758dqbas755 toSci "+INF"            -> Infinity
759dqbas756 toSci "-Inf"            -> -Infinity
760dqbas757 toSci "-inf"            -> -Infinity
761dqbas758 toSci "-iNf"            -> -Infinity
762dqbas759 toSci "-INF"            -> -Infinity
763
764dqbas760 toSci "Infinity"        -> Infinity
765dqbas761 toSci "infinity"        -> Infinity
766dqbas762 toSci "iNfInItY"        -> Infinity
767dqbas763 toSci "INFINITY"        -> Infinity
768dqbas764 toSci "+Infinity"       -> Infinity
769dqbas765 toSci "+infinity"       -> Infinity
770dqbas766 toSci "+iNfInItY"       -> Infinity
771dqbas767 toSci "+INFINITY"       -> Infinity
772dqbas768 toSci "-Infinity"       -> -Infinity
773dqbas769 toSci "-infinity"       -> -Infinity
774dqbas770 toSci "-iNfInItY"       -> -Infinity
775dqbas771 toSci "-INFINITY"       -> -Infinity
776
777-- Specials and zeros for toEng
778dqbast772 toEng "NaN"              -> NaN
779dqbast773 toEng "-Infinity"        -> -Infinity
780dqbast774 toEng "-sNaN"            -> -sNaN
781dqbast775 toEng "-NaN"             -> -NaN
782dqbast776 toEng "+Infinity"        -> Infinity
783dqbast778 toEng "+sNaN"            -> sNaN
784dqbast779 toEng "+NaN"             -> NaN
785dqbast780 toEng "INFINITY"         -> Infinity
786dqbast781 toEng "SNAN"             -> sNaN
787dqbast782 toEng "NAN"              -> NaN
788dqbast783 toEng "infinity"         -> Infinity
789dqbast784 toEng "snan"             -> sNaN
790dqbast785 toEng "nan"              -> NaN
791dqbast786 toEng "InFINITY"         -> Infinity
792dqbast787 toEng "SnAN"             -> sNaN
793dqbast788 toEng "nAN"              -> NaN
794dqbast789 toEng "iNfinity"         -> Infinity
795dqbast790 toEng "sNan"             -> sNaN
796dqbast791 toEng "Nan"              -> NaN
797dqbast792 toEng "Infinity"         -> Infinity
798dqbast793 toEng "sNaN"             -> sNaN
799
800-- Zero toEng, etc.
801dqbast800 toEng 0e+1              -> "0.00E+3"  -- doc example
802
803dqbast801 toEng 0.000000000       -> 0E-9
804dqbast802 toEng 0.00000000        -> 0.00E-6
805dqbast803 toEng 0.0000000         -> 0.0E-6
806dqbast804 toEng 0.000000          -> 0.000000
807dqbast805 toEng 0.00000           -> 0.00000
808dqbast806 toEng 0.0000            -> 0.0000
809dqbast807 toEng 0.000             -> 0.000
810dqbast808 toEng 0.00              -> 0.00
811dqbast809 toEng 0.0               -> 0.0
812dqbast810 toEng  .0               -> 0.0
813dqbast811 toEng 0.                -> 0
814dqbast812 toEng -.0               -> -0.0
815dqbast813 toEng -0.               -> -0
816dqbast814 toEng -0.0              -> -0.0
817dqbast815 toEng -0.00             -> -0.00
818dqbast816 toEng -0.000            -> -0.000
819dqbast817 toEng -0.0000           -> -0.0000
820dqbast818 toEng -0.00000          -> -0.00000
821dqbast819 toEng -0.000000         -> -0.000000
822dqbast820 toEng -0.0000000        -> -0.0E-6
823dqbast821 toEng -0.00000000       -> -0.00E-6
824dqbast822 toEng -0.000000000      -> -0E-9
825
826dqbast830 toEng  0.00E+0          -> 0.00
827dqbast831 toEng  0.00E+1          -> 0.0
828dqbast832 toEng  0.00E+2          -> 0
829dqbast833 toEng  0.00E+3          -> 0.00E+3
830dqbast834 toEng  0.00E+4          -> 0.0E+3
831dqbast835 toEng  0.00E+5          -> 0E+3
832dqbast836 toEng  0.00E+6          -> 0.00E+6
833dqbast837 toEng  0.00E+7          -> 0.0E+6
834dqbast838 toEng  0.00E+8          -> 0E+6
835dqbast839 toEng  0.00E+9          -> 0.00E+9
836
837dqbast840 toEng  0.0E+0           -> 0.0
838dqbast841 toEng  0.0E+1           -> 0
839dqbast842 toEng  0.0E+2           -> 0.00E+3
840dqbast843 toEng  0.0E+3           -> 0.0E+3
841dqbast844 toEng  0.0E+4           -> 0E+3
842dqbast845 toEng  0.0E+5           -> 0.00E+6
843dqbast846 toEng  0.0E+6           -> 0.0E+6
844dqbast847 toEng  0.0E+7           -> 0E+6
845dqbast848 toEng  0.0E+8           -> 0.00E+9
846dqbast849 toEng  0.0E+9           -> 0.0E+9
847
848dqbast850 toEng  0E+0             -> 0
849dqbast851 toEng  0E+1             -> 0.00E+3
850dqbast852 toEng  0E+2             -> 0.0E+3
851dqbast853 toEng  0E+3             -> 0E+3
852dqbast854 toEng  0E+4             -> 0.00E+6
853dqbast855 toEng  0E+5             -> 0.0E+6
854dqbast856 toEng  0E+6             -> 0E+6
855dqbast857 toEng  0E+7             -> 0.00E+9
856dqbast858 toEng  0E+8             -> 0.0E+9
857dqbast859 toEng  0E+9             -> 0E+9
858
859dqbast860 toEng  0.0E-0           -> 0.0
860dqbast861 toEng  0.0E-1           -> 0.00
861dqbast862 toEng  0.0E-2           -> 0.000
862dqbast863 toEng  0.0E-3           -> 0.0000
863dqbast864 toEng  0.0E-4           -> 0.00000
864dqbast865 toEng  0.0E-5           -> 0.000000
865dqbast866 toEng  0.0E-6           -> 0.0E-6
866dqbast867 toEng  0.0E-7           -> 0.00E-6
867dqbast868 toEng  0.0E-8           -> 0E-9
868dqbast869 toEng  0.0E-9           -> 0.0E-9
869
870dqbast870 toEng  0.00E-0          -> 0.00
871dqbast871 toEng  0.00E-1          -> 0.000
872dqbast872 toEng  0.00E-2          -> 0.0000
873dqbast873 toEng  0.00E-3          -> 0.00000
874dqbast874 toEng  0.00E-4          -> 0.000000
875dqbast875 toEng  0.00E-5          -> 0.0E-6
876dqbast876 toEng  0.00E-6          -> 0.00E-6
877dqbast877 toEng  0.00E-7          -> 0E-9
878dqbast878 toEng  0.00E-8          -> 0.0E-9
879dqbast879 toEng  0.00E-9          -> 0.00E-9
880
881-- long input strings
882dqbas801 tosci '01234567890123456' -> 1234567890123456
883dqbas802 tosci '001234567890123456' -> 1234567890123456
884dqbas803 tosci '0001234567890123456' -> 1234567890123456
885dqbas804 tosci '00001234567890123456' -> 1234567890123456
886dqbas805 tosci '000001234567890123456' -> 1234567890123456
887dqbas806 tosci '0000001234567890123456' -> 1234567890123456
888dqbas807 tosci '00000001234567890123456' -> 1234567890123456
889dqbas808 tosci '000000001234567890123456' -> 1234567890123456
890dqbas809 tosci '0000000001234567890123456' -> 1234567890123456
891dqbas810 tosci '00000000001234567890123456' -> 1234567890123456
892
893dqbas811 tosci '0.1234567890123456' -> 0.1234567890123456
894dqbas812 tosci '0.01234567890123456' -> 0.01234567890123456
895dqbas813 tosci '0.001234567890123456' -> 0.001234567890123456
896dqbas814 tosci '0.0001234567890123456' -> 0.0001234567890123456
897dqbas815 tosci '0.00001234567890123456' -> 0.00001234567890123456
898dqbas816 tosci '0.000001234567890123456' -> 0.000001234567890123456
899dqbas817 tosci '0.0000001234567890123456' -> 1.234567890123456E-7
900dqbas818 tosci '0.00000001234567890123456' -> 1.234567890123456E-8
901dqbas819 tosci '0.000000001234567890123456' -> 1.234567890123456E-9
902dqbas820 tosci '0.0000000001234567890123456' -> 1.234567890123456E-10
903
904dqbas821 tosci '12345678912345678901234567801234567890' -> 1.234567891234567890123456780123457E+37 Inexact Rounded
905dqbas822 tosci '123456789123456789012345678012345678901' -> 1.234567891234567890123456780123457E+38 Inexact Rounded
906dqbas823 tosci '1234567891234567890123456780123456789012' -> 1.234567891234567890123456780123457E+39 Inexact Rounded
907dqbas824 tosci '12345678912345678901234567801234567890123' -> 1.234567891234567890123456780123457E+40 Inexact Rounded
908dqbas825 tosci '123456789123456789012345678012345678901234' -> 1.234567891234567890123456780123457E+41 Inexact Rounded
909dqbas826 tosci '1234567891234567890123456780123456789012345' -> 1.234567891234567890123456780123457E+42 Inexact Rounded
910dqbas827 tosci '12345678912345678901234567801234567890123456' -> 1.234567891234567890123456780123457E+43 Inexact Rounded
911dqbas828 tosci '123456789123456789012345678012345678901234567' -> 1.234567891234567890123456780123457E+44 Inexact Rounded
912dqbas829 tosci '1234567891234567890123456780123456789012345678' -> 1.234567891234567890123456780123457E+45 Inexact Rounded
913
914-- subnormals and overflows
915dqbas906 toSci '99e999999999'       -> Infinity Overflow  Inexact Rounded
916dqbas907 toSci '999e999999999'      -> Infinity Overflow  Inexact Rounded
917dqbas908 toSci '0.9e-999999999'     -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
918dqbas909 toSci '0.09e-999999999'    -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
919dqbas910 toSci '0.1e1000000000'     -> Infinity Overflow  Inexact Rounded
920dqbas911 toSci '10e-1000000000'     -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
921dqbas912 toSci '0.9e9999999999'     -> Infinity Overflow  Inexact Rounded
922dqbas913 toSci '99e-9999999999'     -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
923dqbas914 toSci '111e9999999999'     -> Infinity Overflow  Inexact Rounded
924dqbas915 toSci '1111e-9999999999'   -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
925dqbas916 toSci '1111e-99999999999'  -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
926dqbas917 toSci '7e1000000000'       -> Infinity Overflow  Inexact Rounded
927-- negatives the same
928dqbas918 toSci '-99e999999999'      -> -Infinity Overflow  Inexact Rounded
929dqbas919 toSci '-999e999999999'     -> -Infinity Overflow  Inexact Rounded
930dqbas920 toSci '-0.9e-999999999'    -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
931dqbas921 toSci '-0.09e-999999999'   -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
932dqbas922 toSci '-0.1e1000000000'    -> -Infinity Overflow  Inexact Rounded
933dqbas923 toSci '-10e-1000000000'    -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
934dqbas924 toSci '-0.9e9999999999'    -> -Infinity Overflow  Inexact Rounded
935dqbas925 toSci '-99e-9999999999'    -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
936dqbas926 toSci '-111e9999999999'    -> -Infinity Overflow  Inexact Rounded
937dqbas927 toSci '-1111e-9999999999'  -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
938dqbas928 toSci '-1111e-99999999999' -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
939dqbas929 toSci '-7e1000000000'      -> -Infinity Overflow  Inexact Rounded
940
941-- overflow results at different rounding modes
942rounding:  ceiling
943dqbas930 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
944dqbas931 toSci '-7e10000'  -> -9.999999999999999999999999999999999E+6144 Overflow  Inexact Rounded
945rounding:  up
946dqbas932 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
947dqbas933 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
948rounding:  down
949dqbas934 toSci  '7e10000'  ->  9.999999999999999999999999999999999E+6144 Overflow  Inexact Rounded
950dqbas935 toSci '-7e10000'  -> -9.999999999999999999999999999999999E+6144 Overflow  Inexact Rounded
951rounding:  floor
952dqbas936 toSci  '7e10000'  ->  9.999999999999999999999999999999999E+6144 Overflow  Inexact Rounded
953dqbas937 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
954
955rounding:  half_up
956dqbas938 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
957dqbas939 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
958rounding:  half_even
959dqbas940 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
960dqbas941 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
961rounding:  half_down
962dqbas942 toSci  '7e10000'  ->  Infinity Overflow  Inexact Rounded
963dqbas943 toSci '-7e10000'  -> -Infinity Overflow  Inexact Rounded
964
965rounding:  half_even
966
967-- Now check 854/754r some subnormals and underflow to 0
968dqbem400 toSci  1.0000E-383     -> 1.0000E-383
969dqbem401 toSci  0.1E-6172        -> 1E-6173       Subnormal
970dqbem402 toSci  0.1000E-6172     -> 1.000E-6173   Subnormal
971dqbem403 toSci  0.0100E-6172     -> 1.00E-6174    Subnormal
972dqbem404 toSci  0.0010E-6172     -> 1.0E-6175     Subnormal
973dqbem405 toSci  0.0001E-6172     -> 1E-6176       Subnormal
974dqbem406 toSci  0.00010E-6172    -> 1E-6176     Subnormal Rounded
975dqbem407 toSci  0.00013E-6172    -> 1E-6176     Underflow Subnormal Inexact Rounded
976dqbem408 toSci  0.00015E-6172    -> 2E-6176     Underflow Subnormal Inexact Rounded
977dqbem409 toSci  0.00017E-6172    -> 2E-6176     Underflow Subnormal Inexact Rounded
978dqbem410 toSci  0.00023E-6172    -> 2E-6176     Underflow Subnormal Inexact Rounded
979dqbem411 toSci  0.00025E-6172    -> 2E-6176     Underflow Subnormal Inexact Rounded
980dqbem412 toSci  0.00027E-6172    -> 3E-6176     Underflow Subnormal Inexact Rounded
981dqbem413 toSci  0.000149E-6172   -> 1E-6176     Underflow Subnormal Inexact Rounded
982dqbem414 toSci  0.000150E-6172   -> 2E-6176     Underflow Subnormal Inexact Rounded
983dqbem415 toSci  0.000151E-6172   -> 2E-6176     Underflow Subnormal Inexact Rounded
984dqbem416 toSci  0.000249E-6172   -> 2E-6176     Underflow Subnormal Inexact Rounded
985dqbem417 toSci  0.000250E-6172   -> 2E-6176     Underflow Subnormal Inexact Rounded
986dqbem418 toSci  0.000251E-6172   -> 3E-6176     Underflow Subnormal Inexact Rounded
987dqbem419 toSci  0.00009E-6172    -> 1E-6176     Underflow Subnormal Inexact Rounded
988dqbem420 toSci  0.00005E-6172    -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
989dqbem421 toSci  0.00003E-6172    -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
990dqbem422 toSci  0.000009E-6172   -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
991dqbem423 toSci  0.000005E-6172   -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
992dqbem424 toSci  0.000003E-6172   -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
993
994dqbem425 toSci  0.001049E-6172   -> 1.0E-6175   Underflow Subnormal Inexact Rounded
995dqbem426 toSci  0.001050E-6172   -> 1.0E-6175   Underflow Subnormal Inexact Rounded
996dqbem427 toSci  0.001051E-6172   -> 1.1E-6175   Underflow Subnormal Inexact Rounded
997dqbem428 toSci  0.001149E-6172   -> 1.1E-6175   Underflow Subnormal Inexact Rounded
998dqbem429 toSci  0.001150E-6172   -> 1.2E-6175   Underflow Subnormal Inexact Rounded
999dqbem430 toSci  0.001151E-6172   -> 1.2E-6175   Underflow Subnormal Inexact Rounded
1000
1001dqbem432 toSci  0.010049E-6172   -> 1.00E-6174  Underflow Subnormal Inexact Rounded
1002dqbem433 toSci  0.010050E-6172   -> 1.00E-6174  Underflow Subnormal Inexact Rounded
1003dqbem434 toSci  0.010051E-6172   -> 1.01E-6174  Underflow Subnormal Inexact Rounded
1004dqbem435 toSci  0.010149E-6172   -> 1.01E-6174  Underflow Subnormal Inexact Rounded
1005dqbem436 toSci  0.010150E-6172   -> 1.02E-6174  Underflow Subnormal Inexact Rounded
1006dqbem437 toSci  0.010151E-6172   -> 1.02E-6174  Underflow Subnormal Inexact Rounded
1007
1008dqbem440 toSci  0.10103E-6172    -> 1.010E-6173 Underflow Subnormal Inexact Rounded
1009dqbem441 toSci  0.10105E-6172    -> 1.010E-6173 Underflow Subnormal Inexact Rounded
1010dqbem442 toSci  0.10107E-6172    -> 1.011E-6173 Underflow Subnormal Inexact Rounded
1011dqbem443 toSci  0.10113E-6172    -> 1.011E-6173 Underflow Subnormal Inexact Rounded
1012dqbem444 toSci  0.10115E-6172    -> 1.012E-6173 Underflow Subnormal Inexact Rounded
1013dqbem445 toSci  0.10117E-6172    -> 1.012E-6173 Underflow Subnormal Inexact Rounded
1014
1015dqbem450 toSci  1.10730E-6173   -> 1.107E-6173 Underflow Subnormal Inexact Rounded
1016dqbem451 toSci  1.10750E-6173   -> 1.108E-6173 Underflow Subnormal Inexact Rounded
1017dqbem452 toSci  1.10770E-6173   -> 1.108E-6173 Underflow Subnormal Inexact Rounded
1018dqbem453 toSci  1.10830E-6173   -> 1.108E-6173 Underflow Subnormal Inexact Rounded
1019dqbem454 toSci  1.10850E-6173   -> 1.108E-6173 Underflow Subnormal Inexact Rounded
1020dqbem455 toSci  1.10870E-6173   -> 1.109E-6173 Underflow Subnormal Inexact Rounded
1021
1022-- make sure sign OK
1023dqbem456 toSci  -0.10103E-6172   -> -1.010E-6173 Underflow Subnormal Inexact Rounded
1024dqbem457 toSci  -0.10105E-6172   -> -1.010E-6173 Underflow Subnormal Inexact Rounded
1025dqbem458 toSci  -0.10107E-6172   -> -1.011E-6173 Underflow Subnormal Inexact Rounded
1026dqbem459 toSci  -0.10113E-6172   -> -1.011E-6173 Underflow Subnormal Inexact Rounded
1027dqbem460 toSci  -0.10115E-6172   -> -1.012E-6173 Underflow Subnormal Inexact Rounded
1028dqbem461 toSci  -0.10117E-6172   -> -1.012E-6173 Underflow Subnormal Inexact Rounded
1029
1030-- '999s' cases
1031dqbem464 toSci  999999E-6173         -> 9.99999E-6168 Subnormal
1032dqbem465 toSci  99999.0E-6172        -> 9.99990E-6168 Subnormal
1033dqbem466 toSci  99999.E-6172         -> 9.9999E-6168  Subnormal
1034dqbem467 toSci  9999.9E-6172         -> 9.9999E-6169  Subnormal
1035dqbem468 toSci  999.99E-6172         -> 9.9999E-6170  Subnormal
1036dqbem469 toSci  99.999E-6172         -> 9.9999E-6171  Subnormal
1037dqbem470 toSci  9.9999E-6172         -> 9.9999E-6172  Subnormal
1038dqbem471 toSci  0.99999E-6172        -> 1.0000E-6172 Underflow Subnormal Inexact Rounded
1039dqbem472 toSci  0.099999E-6172       -> 1.000E-6173 Underflow Subnormal Inexact Rounded
1040dqbem473 toSci  0.0099999E-6172      -> 1.00E-6174  Underflow Subnormal Inexact Rounded
1041dqbem474 toSci  0.00099999E-6172     -> 1.0E-6175   Underflow Subnormal Inexact Rounded
1042dqbem475 toSci  0.000099999E-6172    -> 1E-6176     Underflow Subnormal Inexact Rounded
1043dqbem476 toSci  0.0000099999E-6172   -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
1044dqbem477 toSci  0.00000099999E-6172  -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
1045dqbem478 toSci  0.000000099999E-6172 -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
1046
1047-- Exponents with insignificant leading zeros
1048dqbas1001 toSci  1e999999999 -> Infinity Overflow Inexact Rounded
1049dqbas1002 toSci  1e0999999999 -> Infinity Overflow Inexact Rounded
1050dqbas1003 toSci  1e00999999999 -> Infinity Overflow Inexact Rounded
1051dqbas1004 toSci  1e000999999999 -> Infinity Overflow Inexact Rounded
1052dqbas1005 toSci  1e000000000000999999999 -> Infinity Overflow Inexact Rounded
1053dqbas1006 toSci  1e000000000001000000007 -> Infinity Overflow Inexact Rounded
1054dqbas1007 toSci  1e-999999999 -> 0E-6176             Underflow Subnormal Inexact Rounded Clamped
1055dqbas1008 toSci  1e-0999999999 -> 0E-6176            Underflow Subnormal Inexact Rounded Clamped
1056dqbas1009 toSci  1e-00999999999 -> 0E-6176           Underflow Subnormal Inexact Rounded Clamped
1057dqbas1010 toSci  1e-000999999999 -> 0E-6176          Underflow Subnormal Inexact Rounded Clamped
1058dqbas1011 toSci  1e-000000000000999999999 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
1059dqbas1012 toSci  1e-000000000001000000007 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
1060
1061-- check for double-rounded subnormals
1062dqbas1041 toSci     1.1111111111111111111111111111152444E-6144 ->  1.11111111111111111111111111111524E-6144 Inexact Rounded Subnormal Underflow
1063dqbas1042 toSci     1.1111111111111111111111111111152445E-6144 ->  1.11111111111111111111111111111524E-6144 Inexact Rounded Subnormal Underflow
1064dqbas1043 toSci     1.1111111111111111111111111111152446E-6144 ->  1.11111111111111111111111111111524E-6144 Inexact Rounded Subnormal Underflow
1065
1066-- clamped zeros [see also clamp.decTest]
1067dqbas1075 toSci   0e+10000  ->  0E+6111 Clamped
1068dqbas1076 toSci   0e-10000  ->  0E-6176  Clamped
1069dqbas1077 toSci  -0e+10000  -> -0E+6111 Clamped
1070dqbas1078 toSci  -0e-10000  -> -0E-6176  Clamped
1071
1072-- extreme values from next-wider
1073dqbas1101 toSci -9.9999999999999999999999999999999999999999999999999999999999999999999E+1572864 -> -Infinity Overflow Inexact Rounded
1074dqbas1102 toSci -1E-1572863 -> -0E-6176 Inexact Rounded Subnormal Underflow Clamped
1075dqbas1103 toSci -1E-1572932 -> -0E-6176 Inexact Rounded Subnormal Underflow Clamped
1076dqbas1104 toSci -0 -> -0
1077dqbas1105 toSci +0 ->  0
1078dqbas1106 toSci +1E-1572932 ->  0E-6176 Inexact Rounded Subnormal Underflow Clamped
1079dqbas1107 toSci +1E-1572863 ->  0E-6176 Inexact Rounded Subnormal Underflow Clamped
1080dqbas1108 toSci +9.9999999999999999999999999999999999999999999999999999999999999999999E+1572864 ->  Infinity Overflow Inexact Rounded
1081
1082