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