Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / lib / python2.4 / test / decimaltestdata / base.decTest
CommitLineData
920dae64
AT
1------------------------------------------------------------------------
2-- base.decTest -- base decimal <--> string conversions --
3-- Copyright (c) IBM Corporation, 1981, 2003. 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.39
21
22-- This file tests base conversions from string to a decimal number
23-- and back to a string (in either Scientific or Engineering 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).
28
29precision: 15
30rounding: half_up
31maxExponent: 999999999
32minExponent: -999999999
33extended: 1
34
35basx001 toSci 0 -> 0
36basx002 toSci 1 -> 1
37basx003 toSci 1.0 -> 1.0
38basx004 toSci 1.00 -> 1.00
39basx005 toSci 10 -> 10
40basx006 toSci 1000 -> 1000
41basx007 toSci 10.0 -> 10.0
42basx008 toSci 10.1 -> 10.1
43basx009 toSci 10.4 -> 10.4
44basx010 toSci 10.5 -> 10.5
45basx011 toSci 10.6 -> 10.6
46basx012 toSci 10.9 -> 10.9
47basx013 toSci 11.0 -> 11.0
48basx014 toSci 1.234 -> 1.234
49basx015 toSci 0.123 -> 0.123
50basx016 toSci 0.012 -> 0.012
51basx017 toSci -0 -> -0
52basx018 toSci -0.0 -> -0.0
53basx019 toSci -00.00 -> -0.00
54
55basx021 toSci -1 -> -1
56basx022 toSci -1.0 -> -1.0
57basx023 toSci -0.1 -> -0.1
58basx024 toSci -9.1 -> -9.1
59basx025 toSci -9.11 -> -9.11
60basx026 toSci -9.119 -> -9.119
61basx027 toSci -9.999 -> -9.999
62
63basx030 toSci '123456789.123456' -> '123456789.123456'
64basx031 toSci '123456789.000000' -> '123456789.000000'
65basx032 toSci '123456789123456' -> '123456789123456'
66basx033 toSci '0.0000123456789' -> '0.0000123456789'
67basx034 toSci '0.00000123456789' -> '0.00000123456789'
68basx035 toSci '0.000000123456789' -> '1.23456789E-7'
69basx036 toSci '0.0000000123456789' -> '1.23456789E-8'
70
71basx037 toSci '0.123456789012344' -> '0.123456789012344'
72basx038 toSci '0.123456789012345' -> '0.123456789012345'
73
74-- String [many more examples are implicitly tested elsewhere]
75-- strings without E cannot generate E in result
76basx100 toSci "12" -> '12'
77basx101 toSci "-76" -> '-76'
78basx102 toSci "12.76" -> '12.76'
79basx103 toSci "+12.76" -> '12.76'
80basx104 toSci "012.76" -> '12.76'
81basx105 toSci "+0.003" -> '0.003'
82basx106 toSci "17." -> '17'
83basx107 toSci ".5" -> '0.5'
84basx108 toSci "044" -> '44'
85basx109 toSci "0044" -> '44'
86basx110 toSci "0.0005" -> '0.0005'
87basx111 toSci "00.00005" -> '0.00005'
88basx112 toSci "0.000005" -> '0.000005'
89basx113 toSci "0.0000050" -> '0.0000050'
90basx114 toSci "0.0000005" -> '5E-7'
91basx115 toSci "0.00000005" -> '5E-8'
92basx116 toSci "12345678.543210" -> '12345678.543210'
93basx117 toSci "2345678.543210" -> '2345678.543210'
94basx118 toSci "345678.543210" -> '345678.543210'
95basx119 toSci "0345678.54321" -> '345678.54321'
96basx120 toSci "345678.5432" -> '345678.5432'
97basx121 toSci "+345678.5432" -> '345678.5432'
98basx122 toSci "+0345678.5432" -> '345678.5432'
99basx123 toSci "+00345678.5432" -> '345678.5432'
100basx124 toSci "-345678.5432" -> '-345678.5432'
101basx125 toSci "-0345678.5432" -> '-345678.5432'
102basx126 toSci "-00345678.5432" -> '-345678.5432'
103-- examples
104basx127 toSci "5E-6" -> '0.000005'
105basx128 toSci "50E-7" -> '0.0000050'
106basx129 toSci "5E-7" -> '5E-7'
107
108
109-- [No exotics as no Unicode]
110
111-- Numbers with E
112basx130 toSci "0.000E-1" -> '0.0000'
113basx131 toSci "0.000E-2" -> '0.00000'
114basx132 toSci "0.000E-3" -> '0.000000'
115basx133 toSci "0.000E-4" -> '0E-7'
116basx134 toSci "0.00E-2" -> '0.0000'
117basx135 toSci "0.00E-3" -> '0.00000'
118basx136 toSci "0.00E-4" -> '0.000000'
119basx137 toSci "0.00E-5" -> '0E-7'
120basx138 toSci "+0E+9" -> '0E+9'
121basx139 toSci "-0E+9" -> '-0E+9'
122basx140 toSci "1E+9" -> '1E+9'
123basx141 toSci "1e+09" -> '1E+9'
124basx142 toSci "1E+90" -> '1E+90'
125basx143 toSci "+1E+009" -> '1E+9'
126basx144 toSci "0E+9" -> '0E+9'
127basx145 toSci "1E+9" -> '1E+9'
128basx146 toSci "1E+09" -> '1E+9'
129basx147 toSci "1e+90" -> '1E+90'
130basx148 toSci "1E+009" -> '1E+9'
131basx149 toSci "000E+9" -> '0E+9'
132basx150 toSci "1E9" -> '1E+9'
133basx151 toSci "1e09" -> '1E+9'
134basx152 toSci "1E90" -> '1E+90'
135basx153 toSci "1E009" -> '1E+9'
136basx154 toSci "0E9" -> '0E+9'
137basx155 toSci "0.000e+0" -> '0.000'
138basx156 toSci "0.000E-1" -> '0.0000'
139basx157 toSci "4E+9" -> '4E+9'
140basx158 toSci "44E+9" -> '4.4E+10'
141basx159 toSci "0.73e-7" -> '7.3E-8'
142basx160 toSci "00E+9" -> '0E+9'
143basx161 toSci "00E-9" -> '0E-9'
144basx162 toSci "10E+9" -> '1.0E+10'
145basx163 toSci "10E+09" -> '1.0E+10'
146basx164 toSci "10e+90" -> '1.0E+91'
147basx165 toSci "10E+009" -> '1.0E+10'
148basx166 toSci "100e+9" -> '1.00E+11'
149basx167 toSci "100e+09" -> '1.00E+11'
150basx168 toSci "100E+90" -> '1.00E+92'
151basx169 toSci "100e+009" -> '1.00E+11'
152
153basx170 toSci "1.265" -> '1.265'
154basx171 toSci "1.265E-20" -> '1.265E-20'
155basx172 toSci "1.265E-8" -> '1.265E-8'
156basx173 toSci "1.265E-4" -> '0.0001265'
157basx174 toSci "1.265E-3" -> '0.001265'
158basx175 toSci "1.265E-2" -> '0.01265'
159basx176 toSci "1.265E-1" -> '0.1265'
160basx177 toSci "1.265E-0" -> '1.265'
161basx178 toSci "1.265E+1" -> '12.65'
162basx179 toSci "1.265E+2" -> '126.5'
163basx180 toSci "1.265E+3" -> '1265'
164basx181 toSci "1.265E+4" -> '1.265E+4'
165basx182 toSci "1.265E+8" -> '1.265E+8'
166basx183 toSci "1.265E+20" -> '1.265E+20'
167
168basx190 toSci "12.65" -> '12.65'
169basx191 toSci "12.65E-20" -> '1.265E-19'
170basx192 toSci "12.65E-8" -> '1.265E-7'
171basx193 toSci "12.65E-4" -> '0.001265'
172basx194 toSci "12.65E-3" -> '0.01265'
173basx195 toSci "12.65E-2" -> '0.1265'
174basx196 toSci "12.65E-1" -> '1.265'
175basx197 toSci "12.65E-0" -> '12.65'
176basx198 toSci "12.65E+1" -> '126.5'
177basx199 toSci "12.65E+2" -> '1265'
178basx200 toSci "12.65E+3" -> '1.265E+4'
179basx201 toSci "12.65E+4" -> '1.265E+5'
180basx202 toSci "12.65E+8" -> '1.265E+9'
181basx203 toSci "12.65E+20" -> '1.265E+21'
182
183basx210 toSci "126.5" -> '126.5'
184basx211 toSci "126.5E-20" -> '1.265E-18'
185basx212 toSci "126.5E-8" -> '0.000001265'
186basx213 toSci "126.5E-4" -> '0.01265'
187basx214 toSci "126.5E-3" -> '0.1265'
188basx215 toSci "126.5E-2" -> '1.265'
189basx216 toSci "126.5E-1" -> '12.65'
190basx217 toSci "126.5E-0" -> '126.5'
191basx218 toSci "126.5E+1" -> '1265'
192basx219 toSci "126.5E+2" -> '1.265E+4'
193basx220 toSci "126.5E+3" -> '1.265E+5'
194basx221 toSci "126.5E+4" -> '1.265E+6'
195basx222 toSci "126.5E+8" -> '1.265E+10'
196basx223 toSci "126.5E+20" -> '1.265E+22'
197
198basx230 toSci "1265" -> '1265'
199basx231 toSci "1265E-20" -> '1.265E-17'
200basx232 toSci "1265E-8" -> '0.00001265'
201basx233 toSci "1265E-4" -> '0.1265'
202basx234 toSci "1265E-3" -> '1.265'
203basx235 toSci "1265E-2" -> '12.65'
204basx236 toSci "1265E-1" -> '126.5'
205basx237 toSci "1265E-0" -> '1265'
206basx238 toSci "1265E+1" -> '1.265E+4'
207basx239 toSci "1265E+2" -> '1.265E+5'
208basx240 toSci "1265E+3" -> '1.265E+6'
209basx241 toSci "1265E+4" -> '1.265E+7'
210basx242 toSci "1265E+8" -> '1.265E+11'
211basx243 toSci "1265E+20" -> '1.265E+23'
212
213basx250 toSci "0.1265" -> '0.1265'
214basx251 toSci "0.1265E-20" -> '1.265E-21'
215basx252 toSci "0.1265E-8" -> '1.265E-9'
216basx253 toSci "0.1265E-4" -> '0.00001265'
217basx254 toSci "0.1265E-3" -> '0.0001265'
218basx255 toSci "0.1265E-2" -> '0.001265'
219basx256 toSci "0.1265E-1" -> '0.01265'
220basx257 toSci "0.1265E-0" -> '0.1265'
221basx258 toSci "0.1265E+1" -> '1.265'
222basx259 toSci "0.1265E+2" -> '12.65'
223basx260 toSci "0.1265E+3" -> '126.5'
224basx261 toSci "0.1265E+4" -> '1265'
225basx262 toSci "0.1265E+8" -> '1.265E+7'
226basx263 toSci "0.1265E+20" -> '1.265E+19'
227
228basx270 toSci "0.09e999" -> '9E+997'
229basx271 toSci "0.9e999" -> '9E+998'
230basx272 toSci "9e999" -> '9E+999'
231basx273 toSci "9.9e999" -> '9.9E+999'
232basx274 toSci "9.99e999" -> '9.99E+999'
233basx275 toSci "9.99e-999" -> '9.99E-999'
234basx276 toSci "9.9e-999" -> '9.9E-999'
235basx277 toSci "9e-999" -> '9E-999'
236basx279 toSci "99e-999" -> '9.9E-998'
237basx280 toSci "999e-999" -> '9.99E-997'
238basx281 toSci '0.9e-998' -> '9E-999'
239basx282 toSci '0.09e-997' -> '9E-999'
240basx283 toSci '0.1e1000' -> '1E+999'
241basx284 toSci '10e-1000' -> '1.0E-999'
242
243-- some more negative zeros [systematic tests below]
244basx290 toSci "-0.000E-1" -> '-0.0000'
245basx291 toSci "-0.000E-2" -> '-0.00000'
246basx292 toSci "-0.000E-3" -> '-0.000000'
247basx293 toSci "-0.000E-4" -> '-0E-7'
248basx294 toSci "-0.00E-2" -> '-0.0000'
249basx295 toSci "-0.00E-3" -> '-0.00000'
250basx296 toSci "-0.0E-2" -> '-0.000'
251basx297 toSci "-0.0E-3" -> '-0.0000'
252basx298 toSci "-0E-2" -> '-0.00'
253basx299 toSci "-0E-3" -> '-0.000'
254
255-- Engineering notation tests
256basx301 toSci 10e12 -> 1.0E+13
257basx302 toEng 10e12 -> 10E+12
258basx303 toSci 10e11 -> 1.0E+12
259basx304 toEng 10e11 -> 1.0E+12
260basx305 toSci 10e10 -> 1.0E+11
261basx306 toEng 10e10 -> 100E+9
262basx307 toSci 10e9 -> 1.0E+10
263basx308 toEng 10e9 -> 10E+9
264basx309 toSci 10e8 -> 1.0E+9
265basx310 toEng 10e8 -> 1.0E+9
266basx311 toSci 10e7 -> 1.0E+8
267basx312 toEng 10e7 -> 100E+6
268basx313 toSci 10e6 -> 1.0E+7
269basx314 toEng 10e6 -> 10E+6
270basx315 toSci 10e5 -> 1.0E+6
271basx316 toEng 10e5 -> 1.0E+6
272basx317 toSci 10e4 -> 1.0E+5
273basx318 toEng 10e4 -> 100E+3
274basx319 toSci 10e3 -> 1.0E+4
275basx320 toEng 10e3 -> 10E+3
276basx321 toSci 10e2 -> 1.0E+3
277basx322 toEng 10e2 -> 1.0E+3
278basx323 toSci 10e1 -> 1.0E+2
279basx324 toEng 10e1 -> 100
280basx325 toSci 10e0 -> 10
281basx326 toEng 10e0 -> 10
282basx327 toSci 10e-1 -> 1.0
283basx328 toEng 10e-1 -> 1.0
284basx329 toSci 10e-2 -> 0.10
285basx330 toEng 10e-2 -> 0.10
286basx331 toSci 10e-3 -> 0.010
287basx332 toEng 10e-3 -> 0.010
288basx333 toSci 10e-4 -> 0.0010
289basx334 toEng 10e-4 -> 0.0010
290basx335 toSci 10e-5 -> 0.00010
291basx336 toEng 10e-5 -> 0.00010
292basx337 toSci 10e-6 -> 0.000010
293basx338 toEng 10e-6 -> 0.000010
294basx339 toSci 10e-7 -> 0.0000010
295basx340 toEng 10e-7 -> 0.0000010
296basx341 toSci 10e-8 -> 1.0E-7
297basx342 toEng 10e-8 -> 100E-9
298basx343 toSci 10e-9 -> 1.0E-8
299basx344 toEng 10e-9 -> 10E-9
300basx345 toSci 10e-10 -> 1.0E-9
301basx346 toEng 10e-10 -> 1.0E-9
302basx347 toSci 10e-11 -> 1.0E-10
303basx348 toEng 10e-11 -> 100E-12
304basx349 toSci 10e-12 -> 1.0E-11
305basx350 toEng 10e-12 -> 10E-12
306basx351 toSci 10e-13 -> 1.0E-12
307basx352 toEng 10e-13 -> 1.0E-12
308
309basx361 toSci 7E12 -> 7E+12
310basx362 toEng 7E12 -> 7E+12
311basx363 toSci 7E11 -> 7E+11
312basx364 toEng 7E11 -> 700E+9
313basx365 toSci 7E10 -> 7E+10
314basx366 toEng 7E10 -> 70E+9
315basx367 toSci 7E9 -> 7E+9
316basx368 toEng 7E9 -> 7E+9
317basx369 toSci 7E8 -> 7E+8
318basx370 toEng 7E8 -> 700E+6
319basx371 toSci 7E7 -> 7E+7
320basx372 toEng 7E7 -> 70E+6
321basx373 toSci 7E6 -> 7E+6
322basx374 toEng 7E6 -> 7E+6
323basx375 toSci 7E5 -> 7E+5
324basx376 toEng 7E5 -> 700E+3
325basx377 toSci 7E4 -> 7E+4
326basx378 toEng 7E4 -> 70E+3
327basx379 toSci 7E3 -> 7E+3
328basx380 toEng 7E3 -> 7E+3
329basx381 toSci 7E2 -> 7E+2
330basx382 toEng 7E2 -> 700
331basx383 toSci 7E1 -> 7E+1
332basx384 toEng 7E1 -> 70
333basx385 toSci 7E0 -> 7
334basx386 toEng 7E0 -> 7
335basx387 toSci 7E-1 -> 0.7
336basx388 toEng 7E-1 -> 0.7
337basx389 toSci 7E-2 -> 0.07
338basx390 toEng 7E-2 -> 0.07
339basx391 toSci 7E-3 -> 0.007
340basx392 toEng 7E-3 -> 0.007
341basx393 toSci 7E-4 -> 0.0007
342basx394 toEng 7E-4 -> 0.0007
343basx395 toSci 7E-5 -> 0.00007
344basx396 toEng 7E-5 -> 0.00007
345basx397 toSci 7E-6 -> 0.000007
346basx398 toEng 7E-6 -> 0.000007
347basx399 toSci 7E-7 -> 7E-7
348basx400 toEng 7E-7 -> 700E-9
349basx401 toSci 7E-8 -> 7E-8
350basx402 toEng 7E-8 -> 70E-9
351basx403 toSci 7E-9 -> 7E-9
352basx404 toEng 7E-9 -> 7E-9
353basx405 toSci 7E-10 -> 7E-10
354basx406 toEng 7E-10 -> 700E-12
355basx407 toSci 7E-11 -> 7E-11
356basx408 toEng 7E-11 -> 70E-12
357basx409 toSci 7E-12 -> 7E-12
358basx410 toEng 7E-12 -> 7E-12
359basx411 toSci 7E-13 -> 7E-13
360basx412 toEng 7E-13 -> 700E-15
361
362-- Exacts remain exact up to precision ..
363precision: 9
364basx420 toSci 100 -> 100
365basx421 toEng 100 -> 100
366basx422 toSci 1000 -> 1000
367basx423 toEng 1000 -> 1000
368basx424 toSci 999.9 -> 999.9
369basx425 toEng 999.9 -> 999.9
370basx426 toSci 1000.0 -> 1000.0
371basx427 toEng 1000.0 -> 1000.0
372basx428 toSci 1000.1 -> 1000.1
373basx429 toEng 1000.1 -> 1000.1
374basx430 toSci 10000 -> 10000
375basx431 toEng 10000 -> 10000
376basx432 toSci 100000 -> 100000
377basx433 toEng 100000 -> 100000
378basx434 toSci 1000000 -> 1000000
379basx435 toEng 1000000 -> 1000000
380basx436 toSci 10000000 -> 10000000
381basx437 toEng 10000000 -> 10000000
382basx438 toSci 100000000 -> 100000000
383basx439 toEng 100000000 -> 100000000
384basx440 toSci 1000000000 -> 1.00000000E+9 Rounded
385basx441 toEng 1000000000 -> 1.00000000E+9 Rounded
386basx442 toSci 1000000000 -> 1.00000000E+9 Rounded
387basx443 toEng 1000000000 -> 1.00000000E+9 Rounded
388basx444 toSci 1000000003 -> 1.00000000E+9 Rounded Inexact
389basx445 toEng 1000000003 -> 1.00000000E+9 Rounded Inexact
390basx446 toSci 1000000005 -> 1.00000001E+9 Rounded Inexact
391basx447 toEng 1000000005 -> 1.00000001E+9 Rounded Inexact
392basx448 toSci 10000000050 -> 1.00000001E+10 Rounded Inexact
393basx449 toEng 10000000050 -> 10.0000001E+9 Rounded Inexact
394basx450 toSci 1000000009 -> 1.00000001E+9 Rounded Inexact
395basx451 toEng 1000000009 -> 1.00000001E+9 Rounded Inexact
396basx452 toSci 10000000000 -> 1.00000000E+10 Rounded
397basx453 toEng 10000000000 -> 10.0000000E+9 Rounded
398basx454 toSci 10000000003 -> 1.00000000E+10 Rounded Inexact
399basx455 toEng 10000000003 -> 10.0000000E+9 Rounded Inexact
400basx456 toSci 10000000005 -> 1.00000000E+10 Rounded Inexact
401basx457 toEng 10000000005 -> 10.0000000E+9 Rounded Inexact
402basx458 toSci 10000000009 -> 1.00000000E+10 Rounded Inexact
403basx459 toEng 10000000009 -> 10.0000000E+9 Rounded Inexact
404basx460 toSci 100000000000 -> 1.00000000E+11 Rounded
405basx461 toEng 100000000000 -> 100.000000E+9 Rounded
406basx462 toSci 100000000300 -> 1.00000000E+11 Rounded Inexact
407basx463 toEng 100000000300 -> 100.000000E+9 Rounded Inexact
408basx464 toSci 100000000500 -> 1.00000001E+11 Rounded Inexact
409basx465 toEng 100000000500 -> 100.000001E+9 Rounded Inexact
410basx466 toSci 100000000900 -> 1.00000001E+11 Rounded Inexact
411basx467 toEng 100000000900 -> 100.000001E+9 Rounded Inexact
412basx468 toSci 1000000000000 -> 1.00000000E+12 Rounded
413basx469 toEng 1000000000000 -> 1.00000000E+12 Rounded
414basx470 toSci 1000000003000 -> 1.00000000E+12 Rounded Inexact
415basx471 toEng 1000000003000 -> 1.00000000E+12 Rounded Inexact
416basx472 toSci 1000000005000 -> 1.00000001E+12 Rounded Inexact
417basx473 toEng 1000000005000 -> 1.00000001E+12 Rounded Inexact
418basx474 toSci 1000000009000 -> 1.00000001E+12 Rounded Inexact
419basx475 toEng 1000000009000 -> 1.00000001E+12 Rounded Inexact
420
421-- check rounding modes heeded
422precision: 5
423rounding: ceiling
424bsrx401 toSci 1.23450 -> 1.2345 Rounded
425bsrx402 toSci 1.234549 -> 1.2346 Rounded Inexact
426bsrx403 toSci 1.234550 -> 1.2346 Rounded Inexact
427bsrx404 toSci 1.234551 -> 1.2346 Rounded Inexact
428rounding: down
429bsrx405 toSci 1.23450 -> 1.2345 Rounded
430bsrx406 toSci 1.234549 -> 1.2345 Rounded Inexact
431bsrx407 toSci 1.234550 -> 1.2345 Rounded Inexact
432bsrx408 toSci 1.234551 -> 1.2345 Rounded Inexact
433rounding: floor
434bsrx410 toSci 1.23450 -> 1.2345 Rounded
435bsrx411 toSci 1.234549 -> 1.2345 Rounded Inexact
436bsrx412 toSci 1.234550 -> 1.2345 Rounded Inexact
437bsrx413 toSci 1.234551 -> 1.2345 Rounded Inexact
438rounding: half_down
439bsrx415 toSci 1.23450 -> 1.2345 Rounded
440bsrx416 toSci 1.234549 -> 1.2345 Rounded Inexact
441bsrx417 toSci 1.234550 -> 1.2345 Rounded Inexact
442bsrx418 toSci 1.234650 -> 1.2346 Rounded Inexact
443bsrx419 toSci 1.234551 -> 1.2346 Rounded Inexact
444rounding: half_even
445bsrx421 toSci 1.23450 -> 1.2345 Rounded
446bsrx422 toSci 1.234549 -> 1.2345 Rounded Inexact
447bsrx423 toSci 1.234550 -> 1.2346 Rounded Inexact
448bsrx424 toSci 1.234650 -> 1.2346 Rounded Inexact
449bsrx425 toSci 1.234551 -> 1.2346 Rounded Inexact
450rounding: down
451bsrx426 toSci 1.23450 -> 1.2345 Rounded
452bsrx427 toSci 1.234549 -> 1.2345 Rounded Inexact
453bsrx428 toSci 1.234550 -> 1.2345 Rounded Inexact
454bsrx429 toSci 1.234551 -> 1.2345 Rounded Inexact
455rounding: half_up
456bsrx431 toSci 1.23450 -> 1.2345 Rounded
457bsrx432 toSci 1.234549 -> 1.2345 Rounded Inexact
458bsrx433 toSci 1.234550 -> 1.2346 Rounded Inexact
459bsrx434 toSci 1.234650 -> 1.2347 Rounded Inexact
460bsrx435 toSci 1.234551 -> 1.2346 Rounded Inexact
461-- negatives
462rounding: ceiling
463bsrx501 toSci -1.23450 -> -1.2345 Rounded
464bsrx502 toSci -1.234549 -> -1.2345 Rounded Inexact
465bsrx503 toSci -1.234550 -> -1.2345 Rounded Inexact
466bsrx504 toSci -1.234551 -> -1.2345 Rounded Inexact
467rounding: down
468bsrx505 toSci -1.23450 -> -1.2345 Rounded
469bsrx506 toSci -1.234549 -> -1.2345 Rounded Inexact
470bsrx507 toSci -1.234550 -> -1.2345 Rounded Inexact
471bsrx508 toSci -1.234551 -> -1.2345 Rounded Inexact
472rounding: floor
473bsrx510 toSci -1.23450 -> -1.2345 Rounded
474bsrx511 toSci -1.234549 -> -1.2346 Rounded Inexact
475bsrx512 toSci -1.234550 -> -1.2346 Rounded Inexact
476bsrx513 toSci -1.234551 -> -1.2346 Rounded Inexact
477rounding: half_down
478bsrx515 toSci -1.23450 -> -1.2345 Rounded
479bsrx516 toSci -1.234549 -> -1.2345 Rounded Inexact
480bsrx517 toSci -1.234550 -> -1.2345 Rounded Inexact
481bsrx518 toSci -1.234650 -> -1.2346 Rounded Inexact
482bsrx519 toSci -1.234551 -> -1.2346 Rounded Inexact
483rounding: half_even
484bsrx521 toSci -1.23450 -> -1.2345 Rounded
485bsrx522 toSci -1.234549 -> -1.2345 Rounded Inexact
486bsrx523 toSci -1.234550 -> -1.2346 Rounded Inexact
487bsrx524 toSci -1.234650 -> -1.2346 Rounded Inexact
488bsrx525 toSci -1.234551 -> -1.2346 Rounded Inexact
489rounding: down
490bsrx526 toSci -1.23450 -> -1.2345 Rounded
491bsrx527 toSci -1.234549 -> -1.2345 Rounded Inexact
492bsrx528 toSci -1.234550 -> -1.2345 Rounded Inexact
493bsrx529 toSci -1.234551 -> -1.2345 Rounded Inexact
494rounding: half_up
495bsrx531 toSci -1.23450 -> -1.2345 Rounded
496bsrx532 toSci -1.234549 -> -1.2345 Rounded Inexact
497bsrx533 toSci -1.234550 -> -1.2346 Rounded Inexact
498bsrx534 toSci -1.234650 -> -1.2347 Rounded Inexact
499bsrx535 toSci -1.234551 -> -1.2346 Rounded Inexact
500
501rounding: half_up
502precision: 9
503
504-- The 'baddies' tests from DiagBigDecimal, plus some new ones
505basx500 toSci '1..2' -> NaN Conversion_syntax
506basx501 toSci '.' -> NaN Conversion_syntax
507basx502 toSci '..' -> NaN Conversion_syntax
508basx503 toSci '++1' -> NaN Conversion_syntax
509basx504 toSci '--1' -> NaN Conversion_syntax
510basx505 toSci '-+1' -> NaN Conversion_syntax
511basx506 toSci '+-1' -> NaN Conversion_syntax
512basx507 toSci '12e' -> NaN Conversion_syntax
513basx508 toSci '12e++' -> NaN Conversion_syntax
514basx509 toSci '12f4' -> NaN Conversion_syntax
515basx510 toSci ' +1' -> NaN Conversion_syntax
516basx511 toSci '+ 1' -> NaN Conversion_syntax
517basx512 toSci '12 ' -> NaN Conversion_syntax
518basx513 toSci ' + 1' -> NaN Conversion_syntax
519basx514 toSci ' - 1 ' -> NaN Conversion_syntax
520basx515 toSci 'x' -> NaN Conversion_syntax
521basx516 toSci '-1-' -> NaN Conversion_syntax
522basx517 toSci '12-' -> NaN Conversion_syntax
523basx518 toSci '3+' -> NaN Conversion_syntax
524basx519 toSci '' -> NaN Conversion_syntax
525basx520 toSci '1e-' -> NaN Conversion_syntax
526basx521 toSci '7e99999a' -> NaN Conversion_syntax
527basx522 toSci '7e123567890x' -> NaN Conversion_syntax
528basx523 toSci '7e12356789012x' -> NaN Conversion_syntax
529basx524 toSci '' -> NaN Conversion_syntax
530basx525 toSci 'e100' -> NaN Conversion_syntax
531basx526 toSci '\u0e5a' -> NaN Conversion_syntax
532basx527 toSci '\u0b65' -> NaN Conversion_syntax
533basx528 toSci '123,65' -> NaN Conversion_syntax
534basx529 toSci '1.34.5' -> NaN Conversion_syntax
535basx530 toSci '.123.5' -> NaN Conversion_syntax
536basx531 toSci '01.35.' -> NaN Conversion_syntax
537basx532 toSci '01.35-' -> NaN Conversion_syntax
538basx533 toSci '0000..' -> NaN Conversion_syntax
539basx534 toSci '.0000.' -> NaN Conversion_syntax
540basx535 toSci '00..00' -> NaN Conversion_syntax
541basx536 toSci '111e*123' -> NaN Conversion_syntax
542basx537 toSci '111e123-' -> NaN Conversion_syntax
543basx538 toSci '111e+12+' -> NaN Conversion_syntax
544basx539 toSci '111e1-3-' -> NaN Conversion_syntax
545basx540 toSci '111e1*23' -> NaN Conversion_syntax
546basx541 toSci '111e1e+3' -> NaN Conversion_syntax
547basx542 toSci '1e1.0' -> NaN Conversion_syntax
548basx543 toSci '1e123e' -> NaN Conversion_syntax
549basx544 toSci 'ten' -> NaN Conversion_syntax
550basx545 toSci 'ONE' -> NaN Conversion_syntax
551basx546 toSci '1e.1' -> NaN Conversion_syntax
552basx547 toSci '1e1.' -> NaN Conversion_syntax
553basx548 toSci '1ee' -> NaN Conversion_syntax
554basx549 toSci 'e+1' -> NaN Conversion_syntax
555basx550 toSci '1.23.4' -> NaN Conversion_syntax
556basx551 toSci '1.2.1' -> NaN Conversion_syntax
557basx552 toSci '1E+1.2' -> NaN Conversion_syntax
558basx553 toSci '1E+1.2.3' -> NaN Conversion_syntax
559basx554 toSci '1E++1' -> NaN Conversion_syntax
560basx555 toSci '1E--1' -> NaN Conversion_syntax
561basx556 toSci '1E+-1' -> NaN Conversion_syntax
562basx557 toSci '1E-+1' -> NaN Conversion_syntax
563basx558 toSci '1E''1' -> NaN Conversion_syntax
564basx559 toSci "1E""1" -> NaN Conversion_syntax
565basx560 toSci "1E""""" -> NaN Conversion_syntax
566-- Near-specials
567basx561 toSci "qNaN" -> NaN Conversion_syntax
568basx562 toSci "NaNq" -> NaN Conversion_syntax
569basx563 toSci "NaNs" -> NaN Conversion_syntax
570basx564 toSci "Infi" -> NaN Conversion_syntax
571basx565 toSci "Infin" -> NaN Conversion_syntax
572basx566 toSci "Infini" -> NaN Conversion_syntax
573basx567 toSci "Infinit" -> NaN Conversion_syntax
574basx568 toSci "-Infinit" -> NaN Conversion_syntax
575basx569 toSci "0Inf" -> NaN Conversion_syntax
576basx570 toSci "9Inf" -> NaN Conversion_syntax
577basx571 toSci "-0Inf" -> NaN Conversion_syntax
578basx572 toSci "-9Inf" -> NaN Conversion_syntax
579basx573 toSci "-sNa" -> NaN Conversion_syntax
580basx574 toSci "xNaN" -> NaN Conversion_syntax
581basx575 toSci "0sNaN" -> NaN Conversion_syntax
582
583-- subnormals and overflows
584basx576 toSci '99e999999999' -> Infinity Overflow Inexact Rounded
585basx577 toSci '999e999999999' -> Infinity Overflow Inexact Rounded
586basx578 toSci '0.9e-999999999' -> 9E-1000000000 Subnormal
587basx579 toSci '0.09e-999999999' -> 9E-1000000001 Subnormal
588basx580 toSci '0.1e1000000000' -> 1E+999999999
589basx581 toSci '10e-1000000000' -> 1.0E-999999999
590basx582 toSci '0.9e9999999999' -> Infinity Overflow Inexact Rounded
591basx583 toSci '99e-9999999999' -> 0E-1000000007 Underflow Subnormal Inexact Rounded
592basx584 toSci '111e9999999999' -> Infinity Overflow Inexact Rounded
593basx585 toSci '1111e-9999999999' -> 0E-1000000007 Underflow Subnormal Inexact Rounded
594basx586 toSci '1111e-99999999999' -> 0E-1000000007 Underflow Subnormal Inexact Rounded
595basx587 toSci '7e1000000000' -> Infinity Overflow Inexact Rounded
596-- negatives the same
597basx588 toSci '-99e999999999' -> -Infinity Overflow Inexact Rounded
598basx589 toSci '-999e999999999' -> -Infinity Overflow Inexact Rounded
599basx590 toSci '-0.9e-999999999' -> -9E-1000000000 Subnormal
600basx591 toSci '-0.09e-999999999' -> -9E-1000000001 Subnormal
601basx592 toSci '-0.1e1000000000' -> -1E+999999999
602basx593 toSci '-10e-1000000000' -> -1.0E-999999999
603basx594 toSci '-0.9e9999999999' -> -Infinity Overflow Inexact Rounded
604basx595 toSci '-99e-9999999999' -> -0E-1000000007 Underflow Subnormal Inexact Rounded
605basx596 toSci '-111e9999999999' -> -Infinity Overflow Inexact Rounded
606basx597 toSci '-1111e-9999999999' -> -0E-1000000007 Underflow Subnormal Inexact Rounded
607basx598 toSci '-1111e-99999999999' -> -0E-1000000007 Underflow Subnormal Inexact Rounded
608basx599 toSci '-7e1000000000' -> -Infinity Overflow Inexact Rounded
609
610-- Zeros
611basx601 toSci 0.000000000 -> 0E-9
612basx602 toSci 0.00000000 -> 0E-8
613basx603 toSci 0.0000000 -> 0E-7
614basx604 toSci 0.000000 -> 0.000000
615basx605 toSci 0.00000 -> 0.00000
616basx606 toSci 0.0000 -> 0.0000
617basx607 toSci 0.000 -> 0.000
618basx608 toSci 0.00 -> 0.00
619basx609 toSci 0.0 -> 0.0
620basx610 toSci .0 -> 0.0
621basx611 toSci 0. -> 0
622basx612 toSci -.0 -> -0.0
623basx613 toSci -0. -> -0
624basx614 toSci -0.0 -> -0.0
625basx615 toSci -0.00 -> -0.00
626basx616 toSci -0.000 -> -0.000
627basx617 toSci -0.0000 -> -0.0000
628basx618 toSci -0.00000 -> -0.00000
629basx619 toSci -0.000000 -> -0.000000
630basx620 toSci -0.0000000 -> -0E-7
631basx621 toSci -0.00000000 -> -0E-8
632basx622 toSci -0.000000000 -> -0E-9
633
634basx630 toSci 0.00E+0 -> 0.00
635basx631 toSci 0.00E+1 -> 0.0
636basx632 toSci 0.00E+2 -> 0
637basx633 toSci 0.00E+3 -> 0E+1
638basx634 toSci 0.00E+4 -> 0E+2
639basx635 toSci 0.00E+5 -> 0E+3
640basx636 toSci 0.00E+6 -> 0E+4
641basx637 toSci 0.00E+7 -> 0E+5
642basx638 toSci 0.00E+8 -> 0E+6
643basx639 toSci 0.00E+9 -> 0E+7
644
645basx640 toSci 0.0E+0 -> 0.0
646basx641 toSci 0.0E+1 -> 0
647basx642 toSci 0.0E+2 -> 0E+1
648basx643 toSci 0.0E+3 -> 0E+2
649basx644 toSci 0.0E+4 -> 0E+3
650basx645 toSci 0.0E+5 -> 0E+4
651basx646 toSci 0.0E+6 -> 0E+5
652basx647 toSci 0.0E+7 -> 0E+6
653basx648 toSci 0.0E+8 -> 0E+7
654basx649 toSci 0.0E+9 -> 0E+8
655
656basx650 toSci 0E+0 -> 0
657basx651 toSci 0E+1 -> 0E+1
658basx652 toSci 0E+2 -> 0E+2
659basx653 toSci 0E+3 -> 0E+3
660basx654 toSci 0E+4 -> 0E+4
661basx655 toSci 0E+5 -> 0E+5
662basx656 toSci 0E+6 -> 0E+6
663basx657 toSci 0E+7 -> 0E+7
664basx658 toSci 0E+8 -> 0E+8
665basx659 toSci 0E+9 -> 0E+9
666
667basx660 toSci 0.0E-0 -> 0.0
668basx661 toSci 0.0E-1 -> 0.00
669basx662 toSci 0.0E-2 -> 0.000
670basx663 toSci 0.0E-3 -> 0.0000
671basx664 toSci 0.0E-4 -> 0.00000
672basx665 toSci 0.0E-5 -> 0.000000
673basx666 toSci 0.0E-6 -> 0E-7
674basx667 toSci 0.0E-7 -> 0E-8
675basx668 toSci 0.0E-8 -> 0E-9
676basx669 toSci 0.0E-9 -> 0E-10
677
678basx670 toSci 0.00E-0 -> 0.00
679basx671 toSci 0.00E-1 -> 0.000
680basx672 toSci 0.00E-2 -> 0.0000
681basx673 toSci 0.00E-3 -> 0.00000
682basx674 toSci 0.00E-4 -> 0.000000
683basx675 toSci 0.00E-5 -> 0E-7
684basx676 toSci 0.00E-6 -> 0E-8
685basx677 toSci 0.00E-7 -> 0E-9
686basx678 toSci 0.00E-8 -> 0E-10
687basx679 toSci 0.00E-9 -> 0E-11
688
689-- Specials
690precision: 4
691basx700 toSci "NaN" -> NaN
692basx701 toSci "nan" -> NaN
693basx702 toSci "nAn" -> NaN
694basx703 toSci "NAN" -> NaN
695basx704 toSci "+NaN" -> NaN
696basx705 toSci "+nan" -> NaN
697basx706 toSci "+nAn" -> NaN
698basx707 toSci "+NAN" -> NaN
699basx708 toSci "-NaN" -> -NaN
700basx709 toSci "-nan" -> -NaN
701basx710 toSci "-nAn" -> -NaN
702basx711 toSci "-NAN" -> -NaN
703basx712 toSci 'NaN0' -> NaN
704basx713 toSci 'NaN1' -> NaN1
705basx714 toSci 'NaN12' -> NaN12
706basx715 toSci 'NaN123' -> NaN123
707basx716 toSci 'NaN1234' -> NaN1234
708basx717 toSci 'NaN01' -> NaN1
709basx718 toSci 'NaN012' -> NaN12
710basx719 toSci 'NaN0123' -> NaN123
711basx720 toSci 'NaN01234' -> NaN1234
712basx721 toSci 'NaN001' -> NaN1
713basx722 toSci 'NaN0012' -> NaN12
714basx723 toSci 'NaN00123' -> NaN123
715basx724 toSci 'NaN001234' -> NaN1234
716basx725 toSci 'NaN12345' -> NaN Conversion_syntax
717basx726 toSci 'NaN123e+1' -> NaN Conversion_syntax
718basx727 toSci 'NaN12.45' -> NaN Conversion_syntax
719basx728 toSci 'NaN-12' -> NaN Conversion_syntax
720basx729 toSci 'NaN+12' -> NaN Conversion_syntax
721
722basx730 toSci "sNaN" -> sNaN
723basx731 toSci "snan" -> sNaN
724basx732 toSci "SnAn" -> sNaN
725basx733 toSci "SNAN" -> sNaN
726basx734 toSci "+sNaN" -> sNaN
727basx735 toSci "+snan" -> sNaN
728basx736 toSci "+SnAn" -> sNaN
729basx737 toSci "+SNAN" -> sNaN
730basx738 toSci "-sNaN" -> -sNaN
731basx739 toSci "-snan" -> -sNaN
732basx740 toSci "-SnAn" -> -sNaN
733basx741 toSci "-SNAN" -> -sNaN
734basx742 toSci 'sNaN0000' -> sNaN
735basx743 toSci 'sNaN7' -> sNaN7
736basx744 toSci 'sNaN007234' -> sNaN7234
737basx745 toSci 'sNaN72345' -> NaN Conversion_syntax
738basx746 toSci 'sNaN72.45' -> NaN Conversion_syntax
739basx747 toSci 'sNaN-72' -> NaN Conversion_syntax
740
741basx748 toSci "Inf" -> Infinity
742basx749 toSci "inf" -> Infinity
743basx750 toSci "iNf" -> Infinity
744basx751 toSci "INF" -> Infinity
745basx752 toSci "+Inf" -> Infinity
746basx753 toSci "+inf" -> Infinity
747basx754 toSci "+iNf" -> Infinity
748basx755 toSci "+INF" -> Infinity
749basx756 toSci "-Inf" -> -Infinity
750basx757 toSci "-inf" -> -Infinity
751basx758 toSci "-iNf" -> -Infinity
752basx759 toSci "-INF" -> -Infinity
753
754basx760 toSci "Infinity" -> Infinity
755basx761 toSci "infinity" -> Infinity
756basx762 toSci "iNfInItY" -> Infinity
757basx763 toSci "INFINITY" -> Infinity
758basx764 toSci "+Infinity" -> Infinity
759basx765 toSci "+infinity" -> Infinity
760basx766 toSci "+iNfInItY" -> Infinity
761basx767 toSci "+INFINITY" -> Infinity
762basx768 toSci "-Infinity" -> -Infinity
763basx769 toSci "-infinity" -> -Infinity
764basx770 toSci "-iNfInItY" -> -Infinity
765basx771 toSci "-INFINITY" -> -Infinity
766
767-- Specials and zeros for toEng
768basx772 toEng "NaN" -> NaN
769basx773 toEng "-Infinity" -> -Infinity
770basx774 toEng "-sNaN" -> -sNaN
771basx775 toEng "-NaN" -> -NaN
772basx776 toEng "+Infinity" -> Infinity
773basx778 toEng "+sNaN" -> sNaN
774basx779 toEng "+NaN" -> NaN
775basx780 toEng "INFINITY" -> Infinity
776basx781 toEng "SNAN" -> sNaN
777basx782 toEng "NAN" -> NaN
778basx783 toEng "infinity" -> Infinity
779basx784 toEng "snan" -> sNaN
780basx785 toEng "nan" -> NaN
781basx786 toEng "InFINITY" -> Infinity
782basx787 toEng "SnAN" -> sNaN
783basx788 toEng "nAN" -> NaN
784basx789 toEng "iNfinity" -> Infinity
785basx790 toEng "sNan" -> sNaN
786basx791 toEng "Nan" -> NaN
787basx792 toEng "Infinity" -> Infinity
788basx793 toEng "sNaN" -> sNaN
789
790-- Zero toEng, etc.
791basx800 toEng 0e+1 -> "0.00E+3" -- doc example
792
793basx801 toEng 0.000000000 -> 0E-9
794basx802 toEng 0.00000000 -> 0.00E-6
795basx803 toEng 0.0000000 -> 0.0E-6
796basx804 toEng 0.000000 -> 0.000000
797basx805 toEng 0.00000 -> 0.00000
798basx806 toEng 0.0000 -> 0.0000
799basx807 toEng 0.000 -> 0.000
800basx808 toEng 0.00 -> 0.00
801basx809 toEng 0.0 -> 0.0
802basx810 toEng .0 -> 0.0
803basx811 toEng 0. -> 0
804basx812 toEng -.0 -> -0.0
805basx813 toEng -0. -> -0
806basx814 toEng -0.0 -> -0.0
807basx815 toEng -0.00 -> -0.00
808basx816 toEng -0.000 -> -0.000
809basx817 toEng -0.0000 -> -0.0000
810basx818 toEng -0.00000 -> -0.00000
811basx819 toEng -0.000000 -> -0.000000
812basx820 toEng -0.0000000 -> -0.0E-6
813basx821 toEng -0.00000000 -> -0.00E-6
814basx822 toEng -0.000000000 -> -0E-9
815
816basx830 toEng 0.00E+0 -> 0.00
817basx831 toEng 0.00E+1 -> 0.0
818basx832 toEng 0.00E+2 -> 0
819basx833 toEng 0.00E+3 -> 0.00E+3
820basx834 toEng 0.00E+4 -> 0.0E+3
821basx835 toEng 0.00E+5 -> 0E+3
822basx836 toEng 0.00E+6 -> 0.00E+6
823basx837 toEng 0.00E+7 -> 0.0E+6
824basx838 toEng 0.00E+8 -> 0E+6
825basx839 toEng 0.00E+9 -> 0.00E+9
826
827basx840 toEng 0.0E+0 -> 0.0
828basx841 toEng 0.0E+1 -> 0
829basx842 toEng 0.0E+2 -> 0.00E+3
830basx843 toEng 0.0E+3 -> 0.0E+3
831basx844 toEng 0.0E+4 -> 0E+3
832basx845 toEng 0.0E+5 -> 0.00E+6
833basx846 toEng 0.0E+6 -> 0.0E+6
834basx847 toEng 0.0E+7 -> 0E+6
835basx848 toEng 0.0E+8 -> 0.00E+9
836basx849 toEng 0.0E+9 -> 0.0E+9
837
838basx850 toEng 0E+0 -> 0
839basx851 toEng 0E+1 -> 0.00E+3
840basx852 toEng 0E+2 -> 0.0E+3
841basx853 toEng 0E+3 -> 0E+3
842basx854 toEng 0E+4 -> 0.00E+6
843basx855 toEng 0E+5 -> 0.0E+6
844basx856 toEng 0E+6 -> 0E+6
845basx857 toEng 0E+7 -> 0.00E+9
846basx858 toEng 0E+8 -> 0.0E+9
847basx859 toEng 0E+9 -> 0E+9
848
849basx860 toEng 0.0E-0 -> 0.0
850basx861 toEng 0.0E-1 -> 0.00
851basx862 toEng 0.0E-2 -> 0.000
852basx863 toEng 0.0E-3 -> 0.0000
853basx864 toEng 0.0E-4 -> 0.00000
854basx865 toEng 0.0E-5 -> 0.000000
855basx866 toEng 0.0E-6 -> 0.0E-6
856basx867 toEng 0.0E-7 -> 0.00E-6
857basx868 toEng 0.0E-8 -> 0E-9
858basx869 toEng 0.0E-9 -> 0.0E-9
859
860basx870 toEng 0.00E-0 -> 0.00
861basx871 toEng 0.00E-1 -> 0.000
862basx872 toEng 0.00E-2 -> 0.0000
863basx873 toEng 0.00E-3 -> 0.00000
864basx874 toEng 0.00E-4 -> 0.000000
865basx875 toEng 0.00E-5 -> 0.0E-6
866basx876 toEng 0.00E-6 -> 0.00E-6
867basx877 toEng 0.00E-7 -> 0E-9
868basx878 toEng 0.00E-8 -> 0.0E-9
869basx879 toEng 0.00E-9 -> 0.00E-9
870
871-- Giga exponent initial tests
872maxExponent: 999999999
873minExponent: -999999999
874
875basx951 toSci '99e999' -> '9.9E+1000'
876basx952 toSci '999e999' -> '9.99E+1001'
877basx953 toSci '0.9e-999' -> '9E-1000'
878basx954 toSci '0.09e-999' -> '9E-1001'
879basx955 toSci '0.1e1001' -> '1E+1000'
880basx956 toSci '10e-1001' -> '1.0E-1000'
881basx957 toSci '0.9e9999' -> '9E+9998'
882basx958 toSci '99e-9999' -> '9.9E-9998'
883basx959 toSci '111e9997' -> '1.11E+9999'
884basx960 toSci '1111e-9999' -> '1.111E-9996'
885basx961 toSci '99e9999' -> '9.9E+10000'
886basx962 toSci '999e9999' -> '9.99E+10001'
887basx963 toSci '0.9e-9999' -> '9E-10000'
888basx964 toSci '0.09e-9999' -> '9E-10001'
889basx965 toSci '0.1e10001' -> '1E+10000'
890basx966 toSci '10e-10001' -> '1.0E-10000'
891basx967 toSci '0.9e99999' -> '9E+99998'
892basx968 toSci '99e-99999' -> '9.9E-99998'
893basx969 toSci '111e99999' -> '1.11E+100001'
894basx970 toSci '1111e-99999' -> '1.111E-99996'
895basx971 toSci "0.09e999999999" -> '9E+999999997'
896basx972 toSci "0.9e999999999" -> '9E+999999998'
897basx973 toSci "9e999999999" -> '9E+999999999'
898basx974 toSci "9.9e999999999" -> '9.9E+999999999'
899basx975 toSci "9.99e999999999" -> '9.99E+999999999'
900basx976 toSci "9.99e-999999999" -> '9.99E-999999999'
901basx977 toSci "9.9e-999999999" -> '9.9E-999999999'
902basx978 toSci "9e-999999999" -> '9E-999999999'
903basx979 toSci "99e-999999999" -> '9.9E-999999998'
904basx980 toSci "999e-999999999" -> '9.99E-999999997'
905
906-- Varying exponent maximums
907precision: 5
908maxexponent: 0
909minexponent: 0
910emax001 toSci -1E+2 -> -Infinity Overflow Inexact Rounded
911emax002 toSci -100 -> -Infinity Overflow Inexact Rounded
912emax003 toSci -10 -> -Infinity Overflow Inexact Rounded
913emax004 toSci -9.9 -> -9.9
914emax005 toSci -9 -> -9
915emax006 toSci -1 -> -1
916emax007 toSci 0 -> 0
917emax008 toSci 1 -> 1
918emax009 toSci 9 -> 9
919emax010 toSci 9.9 -> 9.9
920emax011 toSci 10 -> Infinity Overflow Inexact Rounded
921emax012 toSci 100 -> Infinity Overflow Inexact Rounded
922emax013 toSci 1E+2 -> Infinity Overflow Inexact Rounded
923emax014 toSci 0.99 -> 0.99 Subnormal
924emax015 toSci 0.1 -> 0.1 Subnormal
925emax016 toSci 0.01 -> 0.01 Subnormal
926emax017 toSci 1E-1 -> 0.1 Subnormal
927emax018 toSci 1E-2 -> 0.01 Subnormal
928
929maxexponent: 1
930minexponent: -1
931emax100 toSci -1E+3 -> -Infinity Overflow Inexact Rounded
932emax101 toSci -1E+2 -> -Infinity Overflow Inexact Rounded
933emax102 toSci -100 -> -Infinity Overflow Inexact Rounded
934emax103 toSci -10 -> -10
935emax104 toSci -9.9 -> -9.9
936emax105 toSci -9 -> -9
937emax106 toSci -1 -> -1
938emax107 toSci 0 -> 0
939emax108 toSci 1 -> 1
940emax109 toSci 9 -> 9
941emax110 toSci 9.9 -> 9.9
942emax111 toSci 10 -> 10
943emax112 toSci 100 -> Infinity Overflow Inexact Rounded
944emax113 toSci 1E+2 -> Infinity Overflow Inexact Rounded
945emax114 toSci 1E+3 -> Infinity Overflow Inexact Rounded
946emax115 toSci 0.99 -> 0.99
947emax116 toSci 0.1 -> 0.1
948emax117 toSci 0.01 -> 0.01 Subnormal
949emax118 toSci 1E-1 -> 0.1
950emax119 toSci 1E-2 -> 0.01 Subnormal
951emax120 toSci 1E-3 -> 0.001 Subnormal
952emax121 toSci 1.1E-3 -> 0.0011 Subnormal
953emax122 toSci 1.11E-3 -> 0.00111 Subnormal
954emax123 toSci 1.111E-3 -> 0.00111 Subnormal Underflow Inexact Rounded
955emax124 toSci 1.1111E-3 -> 0.00111 Subnormal Underflow Inexact Rounded
956emax125 toSci 1.11111E-3 -> 0.00111 Subnormal Underflow Inexact Rounded
957
958maxexponent: 2
959minexponent: -2
960precision: 9
961emax200 toSci -1E+3 -> -Infinity Overflow Inexact Rounded
962emax201 toSci -1E+2 -> -1E+2
963emax202 toSci -100 -> -100
964emax203 toSci -10 -> -10
965emax204 toSci -9.9 -> -9.9
966emax205 toSci -9 -> -9
967emax206 toSci -1 -> -1
968emax207 toSci 0 -> 0
969emax208 toSci 1 -> 1
970emax209 toSci 9 -> 9
971emax210 toSci 9.9 -> 9.9
972emax211 toSci 10 -> 10
973emax212 toSci 100 -> 100
974emax213 toSci 1E+2 -> 1E+2
975emax214 toSci 1E+3 -> Infinity Overflow Inexact Rounded
976emax215 toSci 0.99 -> 0.99
977emax216 toSci 0.1 -> 0.1
978emax217 toSci 0.01 -> 0.01
979emax218 toSci 0.001 -> 0.001 Subnormal
980emax219 toSci 1E-1 -> 0.1
981emax220 toSci 1E-2 -> 0.01
982emax221 toSci 1E-3 -> 0.001 Subnormal
983emax222 toSci 1E-4 -> 0.0001 Subnormal
984emax223 toSci 1E-5 -> 0.00001 Subnormal
985emax224 toSci 1E-6 -> 0.000001 Subnormal
986emax225 toSci 1E-7 -> 1E-7 Subnormal
987emax226 toSci 1E-8 -> 1E-8 Subnormal
988emax227 toSci 1E-9 -> 1E-9 Subnormal
989emax228 toSci 1E-10 -> 1E-10 Subnormal
990emax229 toSci 1E-11 -> 0E-10 Underflow Subnormal Inexact Rounded
991emax230 toSci 1E-12 -> 0E-10 Underflow Subnormal Inexact Rounded
992
993maxexponent: 7
994minexponent: -7
995emax231 toSci 1E-8 -> 1E-8 Subnormal
996emax232 toSci 1E-7 -> 1E-7
997emax233 toSci 1E-6 -> 0.000001
998emax234 toSci 1E-5 -> 0.00001
999emax235 toSci 1E+5 -> 1E+5
1000emax236 toSci 1E+6 -> 1E+6
1001emax237 toSci 1E+7 -> 1E+7
1002emax238 toSci 1E+8 -> Infinity Overflow Inexact Rounded
1003
1004maxexponent: 9
1005minexponent: -9
1006emax240 toSci 1E-21 -> 0E-17 Subnormal Underflow Inexact Rounded
1007emax241 toSci 1E-10 -> 1E-10 Subnormal
1008emax242 toSci 1E-9 -> 1E-9
1009emax243 toSci 1E-8 -> 1E-8
1010emax244 toSci 1E-7 -> 1E-7
1011emax245 toSci 1E+7 -> 1E+7
1012emax246 toSci 1E+8 -> 1E+8
1013emax247 toSci 1E+9 -> 1E+9
1014emax248 toSci 1E+10 -> Infinity Overflow Inexact Rounded
1015
1016maxexponent: 10 -- boundary
1017minexponent: -10
1018emax250 toSci 1E-21 -> 0E-18 Underflow Subnormal Inexact Rounded
1019emax251 toSci 1E-11 -> 1E-11 Subnormal
1020emax252 toSci 1E-10 -> 1E-10
1021emax253 toSci 1E-9 -> 1E-9
1022emax254 toSci 1E-8 -> 1E-8
1023emax255 toSci 1E+8 -> 1E+8
1024emax256 toSci 1E+9 -> 1E+9
1025emax257 toSci 1E+10 -> 1E+10
1026emax258 toSci 1E+11 -> Infinity Overflow Inexact Rounded
1027
1028emax260 toSci 1.00E-21 -> 0E-18 Underflow Subnormal Inexact Rounded
1029emax261 toSci 1.00E-11 -> 1.00E-11 Subnormal
1030emax262 toSci 1.00E-10 -> 1.00E-10
1031emax263 toSci 1.00E-9 -> 1.00E-9
1032emax264 toSci 1.00E-8 -> 1.00E-8
1033emax265 toSci 1.00E+8 -> 1.00E+8
1034emax266 toSci 1.00E+9 -> 1.00E+9
1035emax267 toSci 1.00E+10 -> 1.00E+10
1036emax268 toSci 1.00E+11 -> Infinity Overflow Inexact Rounded
1037emax270 toSci 9.99E-21 -> 0E-18 Underflow Subnormal Inexact Rounded
1038emax271 toSci 9.99E-11 -> 9.99E-11 Subnormal
1039emax272 toSci 9.99E-10 -> 9.99E-10
1040emax273 toSci 9.99E-9 -> 9.99E-9
1041emax274 toSci 9.99E-8 -> 9.99E-8
1042emax275 toSci 9.99E+8 -> 9.99E+8
1043emax276 toSci 9.99E+9 -> 9.99E+9
1044emax277 toSci 9.99E+10 -> 9.99E+10
1045emax278 toSci 9.99E+11 -> Infinity Overflow Inexact Rounded
1046
1047maxexponent: 99
1048minexponent: -99
1049emax280 toSci 1E-120 -> 0E-107 Underflow Subnormal Inexact Rounded
1050emax281 toSci 1E-100 -> 1E-100 Subnormal
1051emax282 toSci 1E-99 -> 1E-99
1052emax283 toSci 1E-98 -> 1E-98
1053emax284 toSci 1E+98 -> 1E+98
1054emax285 toSci 1E+99 -> 1E+99
1055emax286 toSci 1E+100 -> Infinity Overflow Inexact Rounded
1056
1057maxexponent: 999
1058minexponent: -999
1059emax291 toSci 1E-1000 -> 1E-1000 Subnormal
1060emax292 toSci 1E-999 -> 1E-999
1061emax293 toSci 1E+999 -> 1E+999
1062emax294 toSci 1E+1000 -> Infinity Overflow Inexact Rounded
1063maxexponent: 9999
1064minexponent: -9999
1065emax301 toSci 1E-10000 -> 1E-10000 Subnormal
1066emax302 toSci 1E-9999 -> 1E-9999
1067emax303 toSci 1E+9999 -> 1E+9999
1068emax304 toSci 1E+10000 -> Infinity Overflow Inexact Rounded
1069maxexponent: 99999
1070minexponent: -99999
1071emax311 toSci 1E-100000 -> 1E-100000 Subnormal
1072emax312 toSci 1E-99999 -> 1E-99999
1073emax313 toSci 1E+99999 -> 1E+99999
1074emax314 toSci 1E+100000 -> Infinity Overflow Inexact Rounded
1075maxexponent: 999999
1076minexponent: -999999
1077emax321 toSci 1E-1000000 -> 1E-1000000 Subnormal
1078emax322 toSci 1E-999999 -> 1E-999999
1079emax323 toSci 1E+999999 -> 1E+999999
1080emax324 toSci 1E+1000000 -> Infinity Overflow Inexact Rounded
1081maxexponent: 9999999
1082minexponent: -9999999
1083emax331 toSci 1E-10000000 -> 1E-10000000 Subnormal
1084emax332 toSci 1E-9999999 -> 1E-9999999
1085emax333 toSci 1E+9999999 -> 1E+9999999
1086emax334 toSci 1E+10000000 -> Infinity Overflow Inexact Rounded
1087maxexponent: 99999999
1088minexponent: -99999999
1089emax341 toSci 1E-100000000 -> 1E-100000000 Subnormal
1090emax342 toSci 1E-99999999 -> 1E-99999999
1091emax343 toSci 1E+99999999 -> 1E+99999999
1092emax344 toSci 1E+100000000 -> Infinity Overflow Inexact Rounded
1093
1094maxexponent: 999999999
1095minexponent: -999999999
1096emax347 toSci 1E-1000000008 -> 0E-1000000007 Underflow Subnormal Inexact Rounded
1097emax348 toSci 1E-1000000007 -> 1E-1000000007 Subnormal
1098emax349 toSci 1E-1000000000 -> 1E-1000000000 Subnormal
1099emax350 toSci 1E-999999999 -> 1E-999999999
1100emax351 toSci 1E+999999999 -> 1E+999999999
1101emax352 toSci 1E+1000000000 -> Infinity Overflow Inexact Rounded
1102emax353 toSci 1.000E-1000000000 -> 1.000E-1000000000 Subnormal
1103emax354 toSci 1.000E-999999999 -> 1.000E-999999999
1104emax355 toSci 1.000E+999999999 -> 1.000E+999999999
1105emax356 toSci 1.000E+1000000000 -> Infinity Overflow Inexact Rounded
1106emax357 toSci 1.001E-1000000008 -> 0E-1000000007 Underflow Subnormal Inexact Rounded
1107emax358 toSci 1.001E-1000000007 -> 1E-1000000007 Subnormal Inexact Rounded Underflow
1108emax359 toSci 1.001E-1000000000 -> 1.001E-1000000000 Subnormal
1109emax360 toSci 1.001E-999999999 -> 1.001E-999999999
1110emax361 toSci 1.001E+999999999 -> 1.001E+999999999
1111emax362 toSci 1.001E+1000000000 -> Infinity Overflow Inexact Rounded
1112emax363 toSci 9.000E-1000000000 -> 9.000E-1000000000 Subnormal
1113emax364 toSci 9.000E-999999999 -> 9.000E-999999999
1114emax365 toSci 9.000E+999999999 -> 9.000E+999999999
1115emax366 toSci 9.000E+1000000000 -> Infinity Overflow Inexact Rounded
1116emax367 toSci 9.999E-1000000009 -> 0E-1000000007 Underflow Subnormal Inexact Rounded
1117emax368 toSci 9.999E-1000000008 -> 1E-1000000007 Underflow Subnormal Inexact Rounded
1118emax369 toSci 9.999E-1000000007 -> 1.0E-1000000006 Underflow Subnormal Inexact Rounded
1119emax370 toSci 9.999E-1000000000 -> 9.999E-1000000000 Subnormal
1120emax371 toSci 9.999E-999999999 -> 9.999E-999999999
1121emax372 toSci 9.999E+999999999 -> 9.999E+999999999
1122
1123emax373 toSci 9.999E+1000000000 -> Infinity Overflow Inexact Rounded
1124emax374 toSci -1E-1000000000 -> -1E-1000000000 Subnormal
1125emax375 toSci -1E-999999999 -> -1E-999999999
1126emax376 toSci -1E+999999999 -> -1E+999999999
1127emax377 toSci -1E+1000000000 -> -Infinity Overflow Inexact Rounded
1128emax378 toSci -1.000E-1000000000 -> -1.000E-1000000000 Subnormal
1129emax379 toSci -1.000E-999999999 -> -1.000E-999999999
1130emax380 toSci -1.000E+999999999 -> -1.000E+999999999
1131emax381 toSci -1.000E+1000000000 -> -Infinity Overflow Inexact Rounded
1132emax382 toSci -1.001E-1000000008 -> -0E-1000000007 Underflow Subnormal Inexact Rounded
1133emax383 toSci -1.001E-999999999 -> -1.001E-999999999
1134emax384 toSci -1.001E+999999999 -> -1.001E+999999999
1135emax385 toSci -1.001E+1000000000 -> -Infinity Overflow Inexact Rounded
1136emax386 toSci -9.000E-1000000123 -> -0E-1000000007 Underflow Subnormal Inexact Rounded
1137emax387 toSci -9.000E-999999999 -> -9.000E-999999999
1138emax388 toSci -9.000E+999999999 -> -9.000E+999999999
1139emax389 toSci -9.000E+1000000000 -> -Infinity Overflow Inexact Rounded
1140emax390 toSci -9.999E-1000000008 -> -1E-1000000007 Underflow Subnormal Inexact Rounded
1141emax391 toSci -9.999E-999999999 -> -9.999E-999999999
1142emax392 toSci -9.999E+999999999 -> -9.999E+999999999
1143emax393 toSci -9.999E+1000000000 -> -Infinity Overflow Inexact Rounded
1144
1145-- Now check 854 rounding of subnormals and proper underflow to 0
1146precision: 5
1147maxExponent: 999
1148minexponent: -999
1149rounding: half_even
1150
1151emax400 toSci 1.0000E-999 -> 1.0000E-999
1152emax401 toSci 0.1E-999 -> 1E-1000 Subnormal
1153emax402 toSci 0.1000E-999 -> 1.000E-1000 Subnormal
1154emax403 toSci 0.0100E-999 -> 1.00E-1001 Subnormal
1155emax404 toSci 0.0010E-999 -> 1.0E-1002 Subnormal
1156emax405 toSci 0.0001E-999 -> 1E-1003 Subnormal
1157emax406 toSci 0.00010E-999 -> 1E-1003 Subnormal Rounded
1158emax407 toSci 0.00013E-999 -> 1E-1003 Underflow Subnormal Inexact Rounded
1159emax408 toSci 0.00015E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1160emax409 toSci 0.00017E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1161emax410 toSci 0.00023E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1162emax411 toSci 0.00025E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1163emax412 toSci 0.00027E-999 -> 3E-1003 Underflow Subnormal Inexact Rounded
1164emax413 toSci 0.000149E-999 -> 1E-1003 Underflow Subnormal Inexact Rounded
1165emax414 toSci 0.000150E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1166emax415 toSci 0.000151E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1167emax416 toSci 0.000249E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1168emax417 toSci 0.000250E-999 -> 2E-1003 Underflow Subnormal Inexact Rounded
1169emax418 toSci 0.000251E-999 -> 3E-1003 Underflow Subnormal Inexact Rounded
1170emax419 toSci 0.00009E-999 -> 1E-1003 Underflow Subnormal Inexact Rounded
1171emax420 toSci 0.00005E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1172emax421 toSci 0.00003E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1173emax422 toSci 0.000009E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1174emax423 toSci 0.000005E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1175emax424 toSci 0.000003E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1176
1177emax425 toSci 0.001049E-999 -> 1.0E-1002 Underflow Subnormal Inexact Rounded
1178emax426 toSci 0.001050E-999 -> 1.0E-1002 Underflow Subnormal Inexact Rounded
1179emax427 toSci 0.001051E-999 -> 1.1E-1002 Underflow Subnormal Inexact Rounded
1180emax428 toSci 0.001149E-999 -> 1.1E-1002 Underflow Subnormal Inexact Rounded
1181emax429 toSci 0.001150E-999 -> 1.2E-1002 Underflow Subnormal Inexact Rounded
1182emax430 toSci 0.001151E-999 -> 1.2E-1002 Underflow Subnormal Inexact Rounded
1183
1184emax432 toSci 0.010049E-999 -> 1.00E-1001 Underflow Subnormal Inexact Rounded
1185emax433 toSci 0.010050E-999 -> 1.00E-1001 Underflow Subnormal Inexact Rounded
1186emax434 toSci 0.010051E-999 -> 1.01E-1001 Underflow Subnormal Inexact Rounded
1187emax435 toSci 0.010149E-999 -> 1.01E-1001 Underflow Subnormal Inexact Rounded
1188emax436 toSci 0.010150E-999 -> 1.02E-1001 Underflow Subnormal Inexact Rounded
1189emax437 toSci 0.010151E-999 -> 1.02E-1001 Underflow Subnormal Inexact Rounded
1190
1191emax440 toSci 0.10103E-999 -> 1.010E-1000 Underflow Subnormal Inexact Rounded
1192emax441 toSci 0.10105E-999 -> 1.010E-1000 Underflow Subnormal Inexact Rounded
1193emax442 toSci 0.10107E-999 -> 1.011E-1000 Underflow Subnormal Inexact Rounded
1194emax443 toSci 0.10113E-999 -> 1.011E-1000 Underflow Subnormal Inexact Rounded
1195emax444 toSci 0.10115E-999 -> 1.012E-1000 Underflow Subnormal Inexact Rounded
1196emax445 toSci 0.10117E-999 -> 1.012E-1000 Underflow Subnormal Inexact Rounded
1197
1198emax450 toSci 1.10730E-1000 -> 1.107E-1000 Underflow Subnormal Inexact Rounded
1199emax451 toSci 1.10750E-1000 -> 1.108E-1000 Underflow Subnormal Inexact Rounded
1200emax452 toSci 1.10770E-1000 -> 1.108E-1000 Underflow Subnormal Inexact Rounded
1201emax453 toSci 1.10830E-1000 -> 1.108E-1000 Underflow Subnormal Inexact Rounded
1202emax454 toSci 1.10850E-1000 -> 1.108E-1000 Underflow Subnormal Inexact Rounded
1203emax455 toSci 1.10870E-1000 -> 1.109E-1000 Underflow Subnormal Inexact Rounded
1204
1205-- make sure sign OK
1206emax456 toSci -0.10103E-999 -> -1.010E-1000 Underflow Subnormal Inexact Rounded
1207emax457 toSci -0.10105E-999 -> -1.010E-1000 Underflow Subnormal Inexact Rounded
1208emax458 toSci -0.10107E-999 -> -1.011E-1000 Underflow Subnormal Inexact Rounded
1209emax459 toSci -0.10113E-999 -> -1.011E-1000 Underflow Subnormal Inexact Rounded
1210emax460 toSci -0.10115E-999 -> -1.012E-1000 Underflow Subnormal Inexact Rounded
1211emax461 toSci -0.10117E-999 -> -1.012E-1000 Underflow Subnormal Inexact Rounded
1212
1213-- '999s' cases
1214emax464 toSci 999999E-999 -> 1.0000E-993 Inexact Rounded
1215emax465 toSci 99999.0E-999 -> 9.9999E-995 Rounded
1216emax466 toSci 99999.E-999 -> 9.9999E-995
1217emax467 toSci 9999.9E-999 -> 9.9999E-996
1218emax468 toSci 999.99E-999 -> 9.9999E-997
1219emax469 toSci 99.999E-999 -> 9.9999E-998
1220emax470 toSci 9.9999E-999 -> 9.9999E-999
1221emax471 toSci 0.99999E-999 -> 1.0000E-999 Underflow Subnormal Inexact Rounded
1222emax472 toSci 0.099999E-999 -> 1.000E-1000 Underflow Subnormal Inexact Rounded
1223emax473 toSci 0.0099999E-999 -> 1.00E-1001 Underflow Subnormal Inexact Rounded
1224emax474 toSci 0.00099999E-999 -> 1.0E-1002 Underflow Subnormal Inexact Rounded
1225emax475 toSci 0.000099999E-999 -> 1E-1003 Underflow Subnormal Inexact Rounded
1226emax476 toSci 0.0000099999E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1227emax477 toSci 0.00000099999E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1228emax478 toSci 0.000000099999E-999 -> 0E-1003 Underflow Subnormal Inexact Rounded
1229
1230-- Exponents with insignificant leading zeros
1231precision: 16
1232maxExponent: 999999999
1233minexponent: -999999999
1234basx1001 toSci 1e999999999 -> 1E+999999999
1235basx1002 toSci 1e0999999999 -> 1E+999999999
1236basx1003 toSci 1e00999999999 -> 1E+999999999
1237basx1004 toSci 1e000999999999 -> 1E+999999999
1238basx1005 toSci 1e000000000000999999999 -> 1E+999999999
1239basx1006 toSci 1e000000000001000000007 -> Infinity Overflow Inexact Rounded
1240basx1007 toSci 1e-999999999 -> 1E-999999999
1241basx1008 toSci 1e-0999999999 -> 1E-999999999
1242basx1009 toSci 1e-00999999999 -> 1E-999999999
1243basx1010 toSci 1e-000999999999 -> 1E-999999999
1244basx1011 toSci 1e-000000000000999999999 -> 1E-999999999
1245basx1012 toSci 1e-000000000001000000007 -> 1E-1000000007 Subnormal
1246
1247-- Edge cases for int32 exponents...
1248basx1021 tosci 1e+2147483649 -> Infinity Overflow Inexact Rounded
1249basx1022 tosci 1e+2147483648 -> Infinity Overflow Inexact Rounded
1250basx1023 tosci 1e+2147483647 -> Infinity Overflow Inexact Rounded
1251basx1024 tosci 1e-2147483647 -> 0E-1000000014 Underflow Subnormal Inexact Rounded
1252basx1025 tosci 1e-2147483648 -> 0E-1000000014 Underflow Subnormal Inexact Rounded
1253basx1026 tosci 1e-2147483649 -> 0E-1000000014 Underflow Subnormal Inexact Rounded
1254-- same unbalanced
1255precision: 7
1256maxExponent: 96
1257minexponent: -95
1258basx1031 tosci 1e+2147483649 -> Infinity Overflow Inexact Rounded
1259basx1032 tosci 1e+2147483648 -> Infinity Overflow Inexact Rounded
1260basx1033 tosci 1e+2147483647 -> Infinity Overflow Inexact Rounded
1261basx1034 tosci 1e-2147483647 -> 0E-101 Underflow Subnormal Inexact Rounded
1262basx1035 tosci 1e-2147483648 -> 0E-101 Underflow Subnormal Inexact Rounded
1263basx1036 tosci 1e-2147483649 -> 0E-101 Underflow Subnormal Inexact Rounded
1264
1265-- check for double-rounded subnormals
1266precision: 5
1267maxexponent: 79
1268minexponent: -79
1269basx1041 toSci 1.52444E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1270basx1042 toSci 1.52445E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1271basx1043 toSci 1.52446E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1272