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