1 ------------------------------------------------------------------------ 2 -- ddBase.decTest -- base decDouble <--> string conversions -- 3 -- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. -- 4 ------------------------------------------------------------------------ 5 -- Please see the document "General Decimal Arithmetic Testcases" -- 6 -- at http://www2.hursley.ibm.com/decimal for the description of -- 7 -- these testcases. -- 8 -- -- 9 -- These testcases are experimental ('beta' versions), and they -- 10 -- may contain errors. They are offered on an as-is basis. In -- 11 -- particular, achieving the same results as the tests here is not -- 12 -- a guarantee that an implementation complies with any Standard -- 13 -- or specification. The tests are not exhaustive. -- 14 -- -- 15 -- Please send comments, suggestions, and corrections to the author: -- 16 -- Mike Cowlishaw, IBM Fellow -- 17 -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- 18 -- mfc (a] uk.ibm.com -- 19 ------------------------------------------------------------------------ 20 version: 2.59 21 22 -- This file tests base conversions from string to a decimal number 23 -- and back to a string (in Scientific form) 24 25 -- Note that unlike other operations the operand is subject to rounding 26 -- to conform to emax and precision settings (that is, numbers will 27 -- conform to rules and exponent will be in permitted range). The 28 -- 'left hand side', therefore, may have numbers that cannot be 29 -- represented in a decDouble. Some testcases go to the limit of the 30 -- next-wider format, and hence these testcases may also be used to 31 -- test narrowing and widening operations. 32 33 precision: 16 34 maxExponent: 384 35 minExponent: -383 36 extended: 1 37 clamp: 1 38 rounding: half_even 39 40 ddbas001 toSci 0 -> 0 41 ddbas002 toSci 1 -> 1 42 ddbas003 toSci 1.0 -> 1.0 43 ddbas004 toSci 1.00 -> 1.00 44 ddbas005 toSci 10 -> 10 45 ddbas006 toSci 1000 -> 1000 46 ddbas007 toSci 10.0 -> 10.0 47 ddbas008 toSci 10.1 -> 10.1 48 ddbas009 toSci 10.4 -> 10.4 49 ddbas010 toSci 10.5 -> 10.5 50 ddbas011 toSci 10.6 -> 10.6 51 ddbas012 toSci 10.9 -> 10.9 52 ddbas013 toSci 11.0 -> 11.0 53 ddbas014 toSci 1.234 -> 1.234 54 ddbas015 toSci 0.123 -> 0.123 55 ddbas016 toSci 0.012 -> 0.012 56 ddbas017 toSci -0 -> -0 57 ddbas018 toSci -0.0 -> -0.0 58 ddbas019 toSci -00.00 -> -0.00 59 60 ddbas021 toSci -1 -> -1 61 ddbas022 toSci -1.0 -> -1.0 62 ddbas023 toSci -0.1 -> -0.1 63 ddbas024 toSci -9.1 -> -9.1 64 ddbas025 toSci -9.11 -> -9.11 65 ddbas026 toSci -9.119 -> -9.119 66 ddbas027 toSci -9.999 -> -9.999 67 68 ddbas030 toSci '123456789.123456' -> '123456789.123456' 69 ddbas031 toSci '123456789.000000' -> '123456789.000000' 70 ddbas032 toSci '123456789123456' -> '123456789123456' 71 ddbas033 toSci '0.0000123456789' -> '0.0000123456789' 72 ddbas034 toSci '0.00000123456789' -> '0.00000123456789' 73 ddbas035 toSci '0.000000123456789' -> '1.23456789E-7' 74 ddbas036 toSci '0.0000000123456789' -> '1.23456789E-8' 75 76 ddbas037 toSci '0.123456789012344' -> '0.123456789012344' 77 ddbas038 toSci '0.123456789012345' -> '0.123456789012345' 78 79 -- test finite bounds (Negs of, then 0, Ntiny, Nmin, other, Nmax) 80 ddbsn001 toSci -9.999999999999999E+384 -> -9.999999999999999E+384 81 ddbsn002 toSci -1E-383 -> -1E-383 82 ddbsn003 toSci -1E-398 -> -1E-398 Subnormal 83 ddbsn004 toSci -0 -> -0 84 ddbsn005 toSci +0 -> 0 85 ddbsn006 toSci +1E-398 -> 1E-398 Subnormal 86 ddbsn007 toSci +1E-383 -> 1E-383 87 ddbsn008 toSci +9.999999999999999E+384 -> 9.999999999999999E+384 88 89 -- String [many more examples are implicitly tested elsewhere] 90 -- strings without E cannot generate E in result 91 ddbas040 toSci "12" -> '12' 92 ddbas041 toSci "-76" -> '-76' 93 ddbas042 toSci "12.76" -> '12.76' 94 ddbas043 toSci "+12.76" -> '12.76' 95 ddbas044 toSci "012.76" -> '12.76' 96 ddbas045 toSci "+0.003" -> '0.003' 97 ddbas046 toSci "17." -> '17' 98 ddbas047 toSci ".5" -> '0.5' 99 ddbas048 toSci "044" -> '44' 100 ddbas049 toSci "0044" -> '44' 101 ddbas050 toSci "0.0005" -> '0.0005' 102 ddbas051 toSci "00.00005" -> '0.00005' 103 ddbas052 toSci "0.000005" -> '0.000005' 104 ddbas053 toSci "0.0000050" -> '0.0000050' 105 ddbas054 toSci "0.0000005" -> '5E-7' 106 ddbas055 toSci "0.00000005" -> '5E-8' 107 ddbas056 toSci "12345678.543210" -> '12345678.543210' 108 ddbas057 toSci "2345678.543210" -> '2345678.543210' 109 ddbas058 toSci "345678.543210" -> '345678.543210' 110 ddbas059 toSci "0345678.54321" -> '345678.54321' 111 ddbas060 toSci "345678.5432" -> '345678.5432' 112 ddbas061 toSci "+345678.5432" -> '345678.5432' 113 ddbas062 toSci "+0345678.5432" -> '345678.5432' 114 ddbas063 toSci "+00345678.5432" -> '345678.5432' 115 ddbas064 toSci "-345678.5432" -> '-345678.5432' 116 ddbas065 toSci "-0345678.5432" -> '-345678.5432' 117 ddbas066 toSci "-00345678.5432" -> '-345678.5432' 118 -- examples 119 ddbas067 toSci "5E-6" -> '0.000005' 120 ddbas068 toSci "50E-7" -> '0.0000050' 121 ddbas069 toSci "5E-7" -> '5E-7' 122 123 -- [No exotics as no Unicode] 124 125 -- rounded with dots in all (including edge) places 126 ddbas071 toSci .1234567890123456123 -> 0.1234567890123456 Inexact Rounded 127 ddbas072 toSci 1.234567890123456123 -> 1.234567890123456 Inexact Rounded 128 ddbas073 toSci 12.34567890123456123 -> 12.34567890123456 Inexact Rounded 129 ddbas074 toSci 123.4567890123456123 -> 123.4567890123456 Inexact Rounded 130 ddbas075 toSci 1234.567890123456123 -> 1234.567890123456 Inexact Rounded 131 ddbas076 toSci 12345.67890123456123 -> 12345.67890123456 Inexact Rounded 132 ddbas077 toSci 123456.7890123456123 -> 123456.7890123456 Inexact Rounded 133 ddbas078 toSci 1234567.890123456123 -> 1234567.890123456 Inexact Rounded 134 ddbas079 toSci 12345678.90123456123 -> 12345678.90123456 Inexact Rounded 135 ddbas080 toSci 123456789.0123456123 -> 123456789.0123456 Inexact Rounded 136 ddbas081 toSci 1234567890.123456123 -> 1234567890.123456 Inexact Rounded 137 ddbas082 toSci 12345678901.23456123 -> 12345678901.23456 Inexact Rounded 138 ddbas083 toSci 123456789012.3456123 -> 123456789012.3456 Inexact Rounded 139 ddbas084 toSci 1234567890123.456123 -> 1234567890123.456 Inexact Rounded 140 ddbas085 toSci 12345678901234.56123 -> 12345678901234.56 Inexact Rounded 141 ddbas086 toSci 123456789012345.6123 -> 123456789012345.6 Inexact Rounded 142 ddbas087 toSci 1234567890123456.123 -> 1234567890123456 Inexact Rounded 143 ddbas088 toSci 12345678901234561.23 -> 1.234567890123456E+16 Inexact Rounded 144 ddbas089 toSci 123456789012345612.3 -> 1.234567890123456E+17 Inexact Rounded 145 ddbas090 toSci 1234567890123456123. -> 1.234567890123456E+18 Inexact Rounded 146 147 148 -- Numbers with E 149 ddbas130 toSci "0.000E-1" -> '0.0000' 150 ddbas131 toSci "0.000E-2" -> '0.00000' 151 ddbas132 toSci "0.000E-3" -> '0.000000' 152 ddbas133 toSci "0.000E-4" -> '0E-7' 153 ddbas134 toSci "0.00E-2" -> '0.0000' 154 ddbas135 toSci "0.00E-3" -> '0.00000' 155 ddbas136 toSci "0.00E-4" -> '0.000000' 156 ddbas137 toSci "0.00E-5" -> '0E-7' 157 ddbas138 toSci "+0E+9" -> '0E+9' 158 ddbas139 toSci "-0E+9" -> '-0E+9' 159 ddbas140 toSci "1E+9" -> '1E+9' 160 ddbas141 toSci "1e+09" -> '1E+9' 161 ddbas142 toSci "1E+90" -> '1E+90' 162 ddbas143 toSci "+1E+009" -> '1E+9' 163 ddbas144 toSci "0E+9" -> '0E+9' 164 ddbas145 toSci "1E+9" -> '1E+9' 165 ddbas146 toSci "1E+09" -> '1E+9' 166 ddbas147 toSci "1e+90" -> '1E+90' 167 ddbas148 toSci "1E+009" -> '1E+9' 168 ddbas149 toSci "000E+9" -> '0E+9' 169 ddbas150 toSci "1E9" -> '1E+9' 170 ddbas151 toSci "1e09" -> '1E+9' 171 ddbas152 toSci "1E90" -> '1E+90' 172 ddbas153 toSci "1E009" -> '1E+9' 173 ddbas154 toSci "0E9" -> '0E+9' 174 ddbas155 toSci "0.000e+0" -> '0.000' 175 ddbas156 toSci "0.000E-1" -> '0.0000' 176 ddbas157 toSci "4E+9" -> '4E+9' 177 ddbas158 toSci "44E+9" -> '4.4E+10' 178 ddbas159 toSci "0.73e-7" -> '7.3E-8' 179 ddbas160 toSci "00E+9" -> '0E+9' 180 ddbas161 toSci "00E-9" -> '0E-9' 181 ddbas162 toSci "10E+9" -> '1.0E+10' 182 ddbas163 toSci "10E+09" -> '1.0E+10' 183 ddbas164 toSci "10e+90" -> '1.0E+91' 184 ddbas165 toSci "10E+009" -> '1.0E+10' 185 ddbas166 toSci "100e+9" -> '1.00E+11' 186 ddbas167 toSci "100e+09" -> '1.00E+11' 187 ddbas168 toSci "100E+90" -> '1.00E+92' 188 ddbas169 toSci "100e+009" -> '1.00E+11' 189 190 ddbas170 toSci "1.265" -> '1.265' 191 ddbas171 toSci "1.265E-20" -> '1.265E-20' 192 ddbas172 toSci "1.265E-8" -> '1.265E-8' 193 ddbas173 toSci "1.265E-4" -> '0.0001265' 194 ddbas174 toSci "1.265E-3" -> '0.001265' 195 ddbas175 toSci "1.265E-2" -> '0.01265' 196 ddbas176 toSci "1.265E-1" -> '0.1265' 197 ddbas177 toSci "1.265E-0" -> '1.265' 198 ddbas178 toSci "1.265E+1" -> '12.65' 199 ddbas179 toSci "1.265E+2" -> '126.5' 200 ddbas180 toSci "1.265E+3" -> '1265' 201 ddbas181 toSci "1.265E+4" -> '1.265E+4' 202 ddbas182 toSci "1.265E+8" -> '1.265E+8' 203 ddbas183 toSci "1.265E+20" -> '1.265E+20' 204 205 ddbas190 toSci "12.65" -> '12.65' 206 ddbas191 toSci "12.65E-20" -> '1.265E-19' 207 ddbas192 toSci "12.65E-8" -> '1.265E-7' 208 ddbas193 toSci "12.65E-4" -> '0.001265' 209 ddbas194 toSci "12.65E-3" -> '0.01265' 210 ddbas195 toSci "12.65E-2" -> '0.1265' 211 ddbas196 toSci "12.65E-1" -> '1.265' 212 ddbas197 toSci "12.65E-0" -> '12.65' 213 ddbas198 toSci "12.65E+1" -> '126.5' 214 ddbas199 toSci "12.65E+2" -> '1265' 215 ddbas200 toSci "12.65E+3" -> '1.265E+4' 216 ddbas201 toSci "12.65E+4" -> '1.265E+5' 217 ddbas202 toSci "12.65E+8" -> '1.265E+9' 218 ddbas203 toSci "12.65E+20" -> '1.265E+21' 219 220 ddbas210 toSci "126.5" -> '126.5' 221 ddbas211 toSci "126.5E-20" -> '1.265E-18' 222 ddbas212 toSci "126.5E-8" -> '0.000001265' 223 ddbas213 toSci "126.5E-4" -> '0.01265' 224 ddbas214 toSci "126.5E-3" -> '0.1265' 225 ddbas215 toSci "126.5E-2" -> '1.265' 226 ddbas216 toSci "126.5E-1" -> '12.65' 227 ddbas217 toSci "126.5E-0" -> '126.5' 228 ddbas218 toSci "126.5E+1" -> '1265' 229 ddbas219 toSci "126.5E+2" -> '1.265E+4' 230 ddbas220 toSci "126.5E+3" -> '1.265E+5' 231 ddbas221 toSci "126.5E+4" -> '1.265E+6' 232 ddbas222 toSci "126.5E+8" -> '1.265E+10' 233 ddbas223 toSci "126.5E+20" -> '1.265E+22' 234 235 ddbas230 toSci "1265" -> '1265' 236 ddbas231 toSci "1265E-20" -> '1.265E-17' 237 ddbas232 toSci "1265E-8" -> '0.00001265' 238 ddbas233 toSci "1265E-4" -> '0.1265' 239 ddbas234 toSci "1265E-3" -> '1.265' 240 ddbas235 toSci "1265E-2" -> '12.65' 241 ddbas236 toSci "1265E-1" -> '126.5' 242 ddbas237 toSci "1265E-0" -> '1265' 243 ddbas238 toSci "1265E+1" -> '1.265E+4' 244 ddbas239 toSci "1265E+2" -> '1.265E+5' 245 ddbas240 toSci "1265E+3" -> '1.265E+6' 246 ddbas241 toSci "1265E+4" -> '1.265E+7' 247 ddbas242 toSci "1265E+8" -> '1.265E+11' 248 ddbas243 toSci "1265E+20" -> '1.265E+23' 249 ddbas244 toSci "1265E-9" -> '0.000001265' 250 ddbas245 toSci "1265E-10" -> '1.265E-7' 251 ddbas246 toSci "1265E-11" -> '1.265E-8' 252 ddbas247 toSci "1265E-12" -> '1.265E-9' 253 254 ddbas250 toSci "0.1265" -> '0.1265' 255 ddbas251 toSci "0.1265E-20" -> '1.265E-21' 256 ddbas252 toSci "0.1265E-8" -> '1.265E-9' 257 ddbas253 toSci "0.1265E-4" -> '0.00001265' 258 ddbas254 toSci "0.1265E-3" -> '0.0001265' 259 ddbas255 toSci "0.1265E-2" -> '0.001265' 260 ddbas256 toSci "0.1265E-1" -> '0.01265' 261 ddbas257 toSci "0.1265E-0" -> '0.1265' 262 ddbas258 toSci "0.1265E+1" -> '1.265' 263 ddbas259 toSci "0.1265E+2" -> '12.65' 264 ddbas260 toSci "0.1265E+3" -> '126.5' 265 ddbas261 toSci "0.1265E+4" -> '1265' 266 ddbas262 toSci "0.1265E+8" -> '1.265E+7' 267 ddbas263 toSci "0.1265E+20" -> '1.265E+19' 268 269 -- some more negative zeros [systematic tests below] 270 ddbas290 toSci "-0.000E-1" -> '-0.0000' 271 ddbas291 toSci "-0.000E-2" -> '-0.00000' 272 ddbas292 toSci "-0.000E-3" -> '-0.000000' 273 ddbas293 toSci "-0.000E-4" -> '-0E-7' 274 ddbas294 toSci "-0.00E-2" -> '-0.0000' 275 ddbas295 toSci "-0.00E-3" -> '-0.00000' 276 ddbas296 toSci "-0.0E-2" -> '-0.000' 277 ddbas297 toSci "-0.0E-3" -> '-0.0000' 278 ddbas298 toSci "-0E-2" -> '-0.00' 279 ddbas299 toSci "-0E-3" -> '-0.000' 280 281 -- Engineering notation tests 282 ddbas301 toSci 10e12 -> 1.0E+13 283 ddbas302 toEng 10e12 -> 10E+12 284 ddbas303 toSci 10e11 -> 1.0E+12 285 ddbas304 toEng 10e11 -> 1.0E+12 286 ddbas305 toSci 10e10 -> 1.0E+11 287 ddbas306 toEng 10e10 -> 100E+9 288 ddbas307 toSci 10e9 -> 1.0E+10 289 ddbas308 toEng 10e9 -> 10E+9 290 ddbas309 toSci 10e8 -> 1.0E+9 291 ddbas310 toEng 10e8 -> 1.0E+9 292 ddbas311 toSci 10e7 -> 1.0E+8 293 ddbas312 toEng 10e7 -> 100E+6 294 ddbas313 toSci 10e6 -> 1.0E+7 295 ddbas314 toEng 10e6 -> 10E+6 296 ddbas315 toSci 10e5 -> 1.0E+6 297 ddbas316 toEng 10e5 -> 1.0E+6 298 ddbas317 toSci 10e4 -> 1.0E+5 299 ddbas318 toEng 10e4 -> 100E+3 300 ddbas319 toSci 10e3 -> 1.0E+4 301 ddbas320 toEng 10e3 -> 10E+3 302 ddbas321 toSci 10e2 -> 1.0E+3 303 ddbas322 toEng 10e2 -> 1.0E+3 304 ddbas323 toSci 10e1 -> 1.0E+2 305 ddbas324 toEng 10e1 -> 100 306 ddbas325 toSci 10e0 -> 10 307 ddbas326 toEng 10e0 -> 10 308 ddbas327 toSci 10e-1 -> 1.0 309 ddbas328 toEng 10e-1 -> 1.0 310 ddbas329 toSci 10e-2 -> 0.10 311 ddbas330 toEng 10e-2 -> 0.10 312 ddbas331 toSci 10e-3 -> 0.010 313 ddbas332 toEng 10e-3 -> 0.010 314 ddbas333 toSci 10e-4 -> 0.0010 315 ddbas334 toEng 10e-4 -> 0.0010 316 ddbas335 toSci 10e-5 -> 0.00010 317 ddbas336 toEng 10e-5 -> 0.00010 318 ddbas337 toSci 10e-6 -> 0.000010 319 ddbas338 toEng 10e-6 -> 0.000010 320 ddbas339 toSci 10e-7 -> 0.0000010 321 ddbas340 toEng 10e-7 -> 0.0000010 322 ddbas341 toSci 10e-8 -> 1.0E-7 323 ddbas342 toEng 10e-8 -> 100E-9 324 ddbas343 toSci 10e-9 -> 1.0E-8 325 ddbas344 toEng 10e-9 -> 10E-9 326 ddbas345 toSci 10e-10 -> 1.0E-9 327 ddbas346 toEng 10e-10 -> 1.0E-9 328 ddbas347 toSci 10e-11 -> 1.0E-10 329 ddbas348 toEng 10e-11 -> 100E-12 330 ddbas349 toSci 10e-12 -> 1.0E-11 331 ddbas350 toEng 10e-12 -> 10E-12 332 ddbas351 toSci 10e-13 -> 1.0E-12 333 ddbas352 toEng 10e-13 -> 1.0E-12 334 335 ddbas361 toSci 7E12 -> 7E+12 336 ddbas362 toEng 7E12 -> 7E+12 337 ddbas363 toSci 7E11 -> 7E+11 338 ddbas364 toEng 7E11 -> 700E+9 339 ddbas365 toSci 7E10 -> 7E+10 340 ddbas366 toEng 7E10 -> 70E+9 341 ddbas367 toSci 7E9 -> 7E+9 342 ddbas368 toEng 7E9 -> 7E+9 343 ddbas369 toSci 7E8 -> 7E+8 344 ddbas370 toEng 7E8 -> 700E+6 345 ddbas371 toSci 7E7 -> 7E+7 346 ddbas372 toEng 7E7 -> 70E+6 347 ddbas373 toSci 7E6 -> 7E+6 348 ddbas374 toEng 7E6 -> 7E+6 349 ddbas375 toSci 7E5 -> 7E+5 350 ddbas376 toEng 7E5 -> 700E+3 351 ddbas377 toSci 7E4 -> 7E+4 352 ddbas378 toEng 7E4 -> 70E+3 353 ddbas379 toSci 7E3 -> 7E+3 354 ddbas380 toEng 7E3 -> 7E+3 355 ddbas381 toSci 7E2 -> 7E+2 356 ddbas382 toEng 7E2 -> 700 357 ddbas383 toSci 7E1 -> 7E+1 358 ddbas384 toEng 7E1 -> 70 359 ddbas385 toSci 7E0 -> 7 360 ddbas386 toEng 7E0 -> 7 361 ddbas387 toSci 7E-1 -> 0.7 362 ddbas388 toEng 7E-1 -> 0.7 363 ddbas389 toSci 7E-2 -> 0.07 364 ddbas390 toEng 7E-2 -> 0.07 365 ddbas391 toSci 7E-3 -> 0.007 366 ddbas392 toEng 7E-3 -> 0.007 367 ddbas393 toSci 7E-4 -> 0.0007 368 ddbas394 toEng 7E-4 -> 0.0007 369 ddbas395 toSci 7E-5 -> 0.00007 370 ddbas396 toEng 7E-5 -> 0.00007 371 ddbas397 toSci 7E-6 -> 0.000007 372 ddbas398 toEng 7E-6 -> 0.000007 373 ddbas399 toSci 7E-7 -> 7E-7 374 ddbas400 toEng 7E-7 -> 700E-9 375 ddbas401 toSci 7E-8 -> 7E-8 376 ddbas402 toEng 7E-8 -> 70E-9 377 ddbas403 toSci 7E-9 -> 7E-9 378 ddbas404 toEng 7E-9 -> 7E-9 379 ddbas405 toSci 7E-10 -> 7E-10 380 ddbas406 toEng 7E-10 -> 700E-12 381 ddbas407 toSci 7E-11 -> 7E-11 382 ddbas408 toEng 7E-11 -> 70E-12 383 ddbas409 toSci 7E-12 -> 7E-12 384 ddbas410 toEng 7E-12 -> 7E-12 385 ddbas411 toSci 7E-13 -> 7E-13 386 ddbas412 toEng 7E-13 -> 700E-15 387 388 -- Exacts remain exact up to precision .. 389 rounding: half_up 390 ddbas420 toSci 100 -> 100 391 ddbas421 toEng 100 -> 100 392 ddbas422 toSci 1000 -> 1000 393 ddbas423 toEng 1000 -> 1000 394 ddbas424 toSci 999.9 -> 999.9 395 ddbas425 toEng 999.9 -> 999.9 396 ddbas426 toSci 1000.0 -> 1000.0 397 ddbas427 toEng 1000.0 -> 1000.0 398 ddbas428 toSci 1000.1 -> 1000.1 399 ddbas429 toEng 1000.1 -> 1000.1 400 ddbas430 toSci 10000 -> 10000 401 ddbas431 toEng 10000 -> 10000 402 ddbas432 toSci 100000 -> 100000 403 ddbas433 toEng 100000 -> 100000 404 ddbas434 toSci 1000000 -> 1000000 405 ddbas435 toEng 1000000 -> 1000000 406 ddbas436 toSci 10000000 -> 10000000 407 ddbas437 toEng 10000000 -> 10000000 408 ddbas438 toSci 100000000 -> 100000000 409 ddbas439 toEng 1000000000000000 -> 1000000000000000 410 ddbas440 toSci 10000000000000000 -> 1.000000000000000E+16 Rounded 411 ddbas441 toEng 10000000000000000 -> 10.00000000000000E+15 Rounded 412 ddbas442 toSci 10000000000000001 -> 1.000000000000000E+16 Rounded Inexact 413 ddbas443 toEng 10000000000000001 -> 10.00000000000000E+15 Rounded Inexact 414 ddbas444 toSci 10000000000000003 -> 1.000000000000000E+16 Rounded Inexact 415 ddbas445 toEng 10000000000000003 -> 10.00000000000000E+15 Rounded Inexact 416 ddbas446 toSci 10000000000000005 -> 1.000000000000001E+16 Rounded Inexact 417 ddbas447 toEng 10000000000000005 -> 10.00000000000001E+15 Rounded Inexact 418 ddbas448 toSci 100000000000000050 -> 1.000000000000001E+17 Rounded Inexact 419 ddbas449 toEng 100000000000000050 -> 100.0000000000001E+15 Rounded Inexact 420 ddbas450 toSci 10000000000000009 -> 1.000000000000001E+16 Rounded Inexact 421 ddbas451 toEng 10000000000000009 -> 10.00000000000001E+15 Rounded Inexact 422 ddbas452 toSci 100000000000000000 -> 1.000000000000000E+17 Rounded 423 ddbas453 toEng 100000000000000000 -> 100.0000000000000E+15 Rounded 424 ddbas454 toSci 100000000000000003 -> 1.000000000000000E+17 Rounded Inexact 425 ddbas455 toEng 100000000000000003 -> 100.0000000000000E+15 Rounded Inexact 426 ddbas456 toSci 100000000000000005 -> 1.000000000000000E+17 Rounded Inexact 427 ddbas457 toEng 100000000000000005 -> 100.0000000000000E+15 Rounded Inexact 428 ddbas458 toSci 100000000000000009 -> 1.000000000000000E+17 Rounded Inexact 429 ddbas459 toEng 100000000000000009 -> 100.0000000000000E+15 Rounded Inexact 430 ddbas460 toSci 1000000000000000000 -> 1.000000000000000E+18 Rounded 431 ddbas461 toEng 1000000000000000000 -> 1.000000000000000E+18 Rounded 432 ddbas462 toSci 1000000000000000300 -> 1.000000000000000E+18 Rounded Inexact 433 ddbas463 toEng 1000000000000000300 -> 1.000000000000000E+18 Rounded Inexact 434 ddbas464 toSci 1000000000000000500 -> 1.000000000000001E+18 Rounded Inexact 435 ddbas465 toEng 1000000000000000500 -> 1.000000000000001E+18 Rounded Inexact 436 ddbas466 toSci 1000000000000000900 -> 1.000000000000001E+18 Rounded Inexact 437 ddbas467 toEng 1000000000000000900 -> 1.000000000000001E+18 Rounded Inexact 438 ddbas468 toSci 10000000000000000000 -> 1.000000000000000E+19 Rounded 439 ddbas469 toEng 10000000000000000000 -> 10.00000000000000E+18 Rounded 440 ddbas470 toSci 10000000000000003000 -> 1.000000000000000E+19 Rounded Inexact 441 ddbas471 toEng 10000000000000003000 -> 10.00000000000000E+18 Rounded Inexact 442 ddbas472 toSci 10000000000000005000 -> 1.000000000000001E+19 Rounded Inexact 443 ddbas473 toEng 10000000000000005000 -> 10.00000000000001E+18 Rounded Inexact 444 ddbas474 toSci 10000000000000009000 -> 1.000000000000001E+19 Rounded Inexact 445 ddbas475 toEng 10000000000000009000 -> 10.00000000000001E+18 Rounded Inexact 446 447 -- check rounding modes heeded 448 rounding: ceiling 449 ddbsr401 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 450 ddbsr402 toSci 1.11111111111234549 -> 1.111111111112346 Rounded Inexact 451 ddbsr403 toSci 1.11111111111234550 -> 1.111111111112346 Rounded Inexact 452 ddbsr404 toSci 1.11111111111234551 -> 1.111111111112346 Rounded Inexact 453 rounding: up 454 ddbsr405 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 455 ddbsr406 toSci 1.11111111111234549 -> 1.111111111112346 Rounded Inexact 456 ddbsr407 toSci 1.11111111111234550 -> 1.111111111112346 Rounded Inexact 457 ddbsr408 toSci 1.11111111111234551 -> 1.111111111112346 Rounded Inexact 458 rounding: floor 459 ddbsr410 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 460 ddbsr411 toSci 1.11111111111234549 -> 1.111111111112345 Rounded Inexact 461 ddbsr412 toSci 1.11111111111234550 -> 1.111111111112345 Rounded Inexact 462 ddbsr413 toSci 1.11111111111234551 -> 1.111111111112345 Rounded Inexact 463 rounding: half_down 464 ddbsr415 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 465 ddbsr416 toSci 1.11111111111234549 -> 1.111111111112345 Rounded Inexact 466 ddbsr417 toSci 1.11111111111234550 -> 1.111111111112345 Rounded Inexact 467 ddbsr418 toSci 1.11111111111234650 -> 1.111111111112346 Rounded Inexact 468 ddbsr419 toSci 1.11111111111234551 -> 1.111111111112346 Rounded Inexact 469 rounding: half_even 470 ddbsr421 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 471 ddbsr422 toSci 1.11111111111234549 -> 1.111111111112345 Rounded Inexact 472 ddbsr423 toSci 1.11111111111234550 -> 1.111111111112346 Rounded Inexact 473 ddbsr424 toSci 1.11111111111234650 -> 1.111111111112346 Rounded Inexact 474 ddbsr425 toSci 1.11111111111234551 -> 1.111111111112346 Rounded Inexact 475 rounding: down 476 ddbsr426 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 477 ddbsr427 toSci 1.11111111111234549 -> 1.111111111112345 Rounded Inexact 478 ddbsr428 toSci 1.11111111111234550 -> 1.111111111112345 Rounded Inexact 479 ddbsr429 toSci 1.11111111111234551 -> 1.111111111112345 Rounded Inexact 480 rounding: half_up 481 ddbsr431 toSci 1.1111111111123450 -> 1.111111111112345 Rounded 482 ddbsr432 toSci 1.11111111111234549 -> 1.111111111112345 Rounded Inexact 483 ddbsr433 toSci 1.11111111111234550 -> 1.111111111112346 Rounded Inexact 484 ddbsr434 toSci 1.11111111111234650 -> 1.111111111112347 Rounded Inexact 485 ddbsr435 toSci 1.11111111111234551 -> 1.111111111112346 Rounded Inexact 486 -- negatives 487 rounding: ceiling 488 ddbsr501 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 489 ddbsr502 toSci -1.11111111111234549 -> -1.111111111112345 Rounded Inexact 490 ddbsr503 toSci -1.11111111111234550 -> -1.111111111112345 Rounded Inexact 491 ddbsr504 toSci -1.11111111111234551 -> -1.111111111112345 Rounded Inexact 492 rounding: up 493 ddbsr505 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 494 ddbsr506 toSci -1.11111111111234549 -> -1.111111111112346 Rounded Inexact 495 ddbsr507 toSci -1.11111111111234550 -> -1.111111111112346 Rounded Inexact 496 ddbsr508 toSci -1.11111111111234551 -> -1.111111111112346 Rounded Inexact 497 rounding: floor 498 ddbsr510 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 499 ddbsr511 toSci -1.11111111111234549 -> -1.111111111112346 Rounded Inexact 500 ddbsr512 toSci -1.11111111111234550 -> -1.111111111112346 Rounded Inexact 501 ddbsr513 toSci -1.11111111111234551 -> -1.111111111112346 Rounded Inexact 502 rounding: half_down 503 ddbsr515 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 504 ddbsr516 toSci -1.11111111111234549 -> -1.111111111112345 Rounded Inexact 505 ddbsr517 toSci -1.11111111111234550 -> -1.111111111112345 Rounded Inexact 506 ddbsr518 toSci -1.11111111111234650 -> -1.111111111112346 Rounded Inexact 507 ddbsr519 toSci -1.11111111111234551 -> -1.111111111112346 Rounded Inexact 508 rounding: half_even 509 ddbsr521 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 510 ddbsr522 toSci -1.11111111111234549 -> -1.111111111112345 Rounded Inexact 511 ddbsr523 toSci -1.11111111111234550 -> -1.111111111112346 Rounded Inexact 512 ddbsr524 toSci -1.11111111111234650 -> -1.111111111112346 Rounded Inexact 513 ddbsr525 toSci -1.11111111111234551 -> -1.111111111112346 Rounded Inexact 514 rounding: down 515 ddbsr526 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 516 ddbsr527 toSci -1.11111111111234549 -> -1.111111111112345 Rounded Inexact 517 ddbsr528 toSci -1.11111111111234550 -> -1.111111111112345 Rounded Inexact 518 ddbsr529 toSci -1.11111111111234551 -> -1.111111111112345 Rounded Inexact 519 rounding: half_up 520 ddbsr531 toSci -1.1111111111123450 -> -1.111111111112345 Rounded 521 ddbsr532 toSci -1.11111111111234549 -> -1.111111111112345 Rounded Inexact 522 ddbsr533 toSci -1.11111111111234550 -> -1.111111111112346 Rounded Inexact 523 ddbsr534 toSci -1.11111111111234650 -> -1.111111111112347 Rounded Inexact 524 ddbsr535 toSci -1.11111111111234551 -> -1.111111111112346 Rounded Inexact 525 526 rounding: half_even 527 528 -- The 'baddies' tests from DiagBigDecimal, plus some new ones 529 ddbas500 toSci '1..2' -> NaN Conversion_syntax 530 ddbas501 toSci '.' -> NaN Conversion_syntax 531 ddbas502 toSci '..' -> NaN Conversion_syntax 532 ddbas503 toSci '++1' -> NaN Conversion_syntax 533 ddbas504 toSci '--1' -> NaN Conversion_syntax 534 ddbas505 toSci '-+1' -> NaN Conversion_syntax 535 ddbas506 toSci '+-1' -> NaN Conversion_syntax 536 ddbas507 toSci '12e' -> NaN Conversion_syntax 537 ddbas508 toSci '12e++' -> NaN Conversion_syntax 538 ddbas509 toSci '12f4' -> NaN Conversion_syntax 539 ddbas510 toSci ' +1' -> NaN Conversion_syntax 540 ddbas511 toSci '+ 1' -> NaN Conversion_syntax 541 ddbas512 toSci '12 ' -> NaN Conversion_syntax 542 ddbas513 toSci ' + 1' -> NaN Conversion_syntax 543 ddbas514 toSci ' - 1 ' -> NaN Conversion_syntax 544 ddbas515 toSci 'x' -> NaN Conversion_syntax 545 ddbas516 toSci '-1-' -> NaN Conversion_syntax 546 ddbas517 toSci '12-' -> NaN Conversion_syntax 547 ddbas518 toSci '3+' -> NaN Conversion_syntax 548 ddbas519 toSci '' -> NaN Conversion_syntax 549 ddbas520 toSci '1e-' -> NaN Conversion_syntax 550 ddbas521 toSci '7e99999a' -> NaN Conversion_syntax 551 ddbas522 toSci '7e123567890x' -> NaN Conversion_syntax 552 ddbas523 toSci '7e12356789012x' -> NaN Conversion_syntax 553 ddbas524 toSci '' -> NaN Conversion_syntax 554 ddbas525 toSci 'e100' -> NaN Conversion_syntax 555 ddbas526 toSci '\u0e5a' -> NaN Conversion_syntax 556 ddbas527 toSci '\u0b65' -> NaN Conversion_syntax 557 ddbas528 toSci '123,65' -> NaN Conversion_syntax 558 ddbas529 toSci '1.34.5' -> NaN Conversion_syntax 559 ddbas530 toSci '.123.5' -> NaN Conversion_syntax 560 ddbas531 toSci '01.35.' -> NaN Conversion_syntax 561 ddbas532 toSci '01.35-' -> NaN Conversion_syntax 562 ddbas533 toSci '0000..' -> NaN Conversion_syntax 563 ddbas534 toSci '.0000.' -> NaN Conversion_syntax 564 ddbas535 toSci '00..00' -> NaN Conversion_syntax 565 ddbas536 toSci '111e*123' -> NaN Conversion_syntax 566 ddbas537 toSci '111e123-' -> NaN Conversion_syntax 567 ddbas538 toSci '111e+12+' -> NaN Conversion_syntax 568 ddbas539 toSci '111e1-3-' -> NaN Conversion_syntax 569 ddbas540 toSci '111e1*23' -> NaN Conversion_syntax 570 ddbas541 toSci '111e1e+3' -> NaN Conversion_syntax 571 ddbas542 toSci '1e1.0' -> NaN Conversion_syntax 572 ddbas543 toSci '1e123e' -> NaN Conversion_syntax 573 ddbas544 toSci 'ten' -> NaN Conversion_syntax 574 ddbas545 toSci 'ONE' -> NaN Conversion_syntax 575 ddbas546 toSci '1e.1' -> NaN Conversion_syntax 576 ddbas547 toSci '1e1.' -> NaN Conversion_syntax 577 ddbas548 toSci '1ee' -> NaN Conversion_syntax 578 ddbas549 toSci 'e+1' -> NaN Conversion_syntax 579 ddbas550 toSci '1.23.4' -> NaN Conversion_syntax 580 ddbas551 toSci '1.2.1' -> NaN Conversion_syntax 581 ddbas552 toSci '1E+1.2' -> NaN Conversion_syntax 582 ddbas553 toSci '1E+1.2.3' -> NaN Conversion_syntax 583 ddbas554 toSci '1E++1' -> NaN Conversion_syntax 584 ddbas555 toSci '1E--1' -> NaN Conversion_syntax 585 ddbas556 toSci '1E+-1' -> NaN Conversion_syntax 586 ddbas557 toSci '1E-+1' -> NaN Conversion_syntax 587 ddbas558 toSci '1E''1' -> NaN Conversion_syntax 588 ddbas559 toSci "1E""1" -> NaN Conversion_syntax 589 ddbas560 toSci "1E""""" -> NaN Conversion_syntax 590 -- Near-specials 591 ddbas561 toSci "qNaN" -> NaN Conversion_syntax 592 ddbas562 toSci "NaNq" -> NaN Conversion_syntax 593 ddbas563 toSci "NaNs" -> NaN Conversion_syntax 594 ddbas564 toSci "Infi" -> NaN Conversion_syntax 595 ddbas565 toSci "Infin" -> NaN Conversion_syntax 596 ddbas566 toSci "Infini" -> NaN Conversion_syntax 597 ddbas567 toSci "Infinit" -> NaN Conversion_syntax 598 ddbas568 toSci "-Infinit" -> NaN Conversion_syntax 599 ddbas569 toSci "0Inf" -> NaN Conversion_syntax 600 ddbas570 toSci "9Inf" -> NaN Conversion_syntax 601 ddbas571 toSci "-0Inf" -> NaN Conversion_syntax 602 ddbas572 toSci "-9Inf" -> NaN Conversion_syntax 603 ddbas573 toSci "-sNa" -> NaN Conversion_syntax 604 ddbas574 toSci "xNaN" -> NaN Conversion_syntax 605 ddbas575 toSci "0sNaN" -> NaN Conversion_syntax 606 607 -- some baddies with dots and Es and dots and specials 608 ddbas576 toSci 'e+1' -> NaN Conversion_syntax 609 ddbas577 toSci '.e+1' -> NaN Conversion_syntax 610 ddbas578 toSci '+.e+1' -> NaN Conversion_syntax 611 ddbas579 toSci '-.e+' -> NaN Conversion_syntax 612 ddbas580 toSci '-.e' -> NaN Conversion_syntax 613 ddbas581 toSci 'E+1' -> NaN Conversion_syntax 614 ddbas582 toSci '.E+1' -> NaN Conversion_syntax 615 ddbas583 toSci '+.E+1' -> NaN Conversion_syntax 616 ddbas584 toSci '-.E+' -> NaN Conversion_syntax 617 ddbas585 toSci '-.E' -> NaN Conversion_syntax 618 619 ddbas586 toSci '.NaN' -> NaN Conversion_syntax 620 ddbas587 toSci '-.NaN' -> NaN Conversion_syntax 621 ddbas588 toSci '+.sNaN' -> NaN Conversion_syntax 622 ddbas589 toSci '+.Inf' -> NaN Conversion_syntax 623 ddbas590 toSci '.Infinity' -> NaN Conversion_syntax 624 625 -- Zeros 626 ddbas601 toSci 0.000000000 -> 0E-9 627 ddbas602 toSci 0.00000000 -> 0E-8 628 ddbas603 toSci 0.0000000 -> 0E-7 629 ddbas604 toSci 0.000000 -> 0.000000 630 ddbas605 toSci 0.00000 -> 0.00000 631 ddbas606 toSci 0.0000 -> 0.0000 632 ddbas607 toSci 0.000 -> 0.000 633 ddbas608 toSci 0.00 -> 0.00 634 ddbas609 toSci 0.0 -> 0.0 635 ddbas610 toSci .0 -> 0.0 636 ddbas611 toSci 0. -> 0 637 ddbas612 toSci -.0 -> -0.0 638 ddbas613 toSci -0. -> -0 639 ddbas614 toSci -0.0 -> -0.0 640 ddbas615 toSci -0.00 -> -0.00 641 ddbas616 toSci -0.000 -> -0.000 642 ddbas617 toSci -0.0000 -> -0.0000 643 ddbas618 toSci -0.00000 -> -0.00000 644 ddbas619 toSci -0.000000 -> -0.000000 645 ddbas620 toSci -0.0000000 -> -0E-7 646 ddbas621 toSci -0.00000000 -> -0E-8 647 ddbas622 toSci -0.000000000 -> -0E-9 648 649 ddbas630 toSci 0.00E+0 -> 0.00 650 ddbas631 toSci 0.00E+1 -> 0.0 651 ddbas632 toSci 0.00E+2 -> 0 652 ddbas633 toSci 0.00E+3 -> 0E+1 653 ddbas634 toSci 0.00E+4 -> 0E+2 654 ddbas635 toSci 0.00E+5 -> 0E+3 655 ddbas636 toSci 0.00E+6 -> 0E+4 656 ddbas637 toSci 0.00E+7 -> 0E+5 657 ddbas638 toSci 0.00E+8 -> 0E+6 658 ddbas639 toSci 0.00E+9 -> 0E+7 659 660 ddbas640 toSci 0.0E+0 -> 0.0 661 ddbas641 toSci 0.0E+1 -> 0 662 ddbas642 toSci 0.0E+2 -> 0E+1 663 ddbas643 toSci 0.0E+3 -> 0E+2 664 ddbas644 toSci 0.0E+4 -> 0E+3 665 ddbas645 toSci 0.0E+5 -> 0E+4 666 ddbas646 toSci 0.0E+6 -> 0E+5 667 ddbas647 toSci 0.0E+7 -> 0E+6 668 ddbas648 toSci 0.0E+8 -> 0E+7 669 ddbas649 toSci 0.0E+9 -> 0E+8 670 671 ddbas650 toSci 0E+0 -> 0 672 ddbas651 toSci 0E+1 -> 0E+1 673 ddbas652 toSci 0E+2 -> 0E+2 674 ddbas653 toSci 0E+3 -> 0E+3 675 ddbas654 toSci 0E+4 -> 0E+4 676 ddbas655 toSci 0E+5 -> 0E+5 677 ddbas656 toSci 0E+6 -> 0E+6 678 ddbas657 toSci 0E+7 -> 0E+7 679 ddbas658 toSci 0E+8 -> 0E+8 680 ddbas659 toSci 0E+9 -> 0E+9 681 682 ddbas660 toSci 0.0E-0 -> 0.0 683 ddbas661 toSci 0.0E-1 -> 0.00 684 ddbas662 toSci 0.0E-2 -> 0.000 685 ddbas663 toSci 0.0E-3 -> 0.0000 686 ddbas664 toSci 0.0E-4 -> 0.00000 687 ddbas665 toSci 0.0E-5 -> 0.000000 688 ddbas666 toSci 0.0E-6 -> 0E-7 689 ddbas667 toSci 0.0E-7 -> 0E-8 690 ddbas668 toSci 0.0E-8 -> 0E-9 691 ddbas669 toSci 0.0E-9 -> 0E-10 692 693 ddbas670 toSci 0.00E-0 -> 0.00 694 ddbas671 toSci 0.00E-1 -> 0.000 695 ddbas672 toSci 0.00E-2 -> 0.0000 696 ddbas673 toSci 0.00E-3 -> 0.00000 697 ddbas674 toSci 0.00E-4 -> 0.000000 698 ddbas675 toSci 0.00E-5 -> 0E-7 699 ddbas676 toSci 0.00E-6 -> 0E-8 700 ddbas677 toSci 0.00E-7 -> 0E-9 701 ddbas678 toSci 0.00E-8 -> 0E-10 702 ddbas679 toSci 0.00E-9 -> 0E-11 703 704 ddbas680 toSci 000000. -> 0 705 ddbas681 toSci 00000. -> 0 706 ddbas682 toSci 0000. -> 0 707 ddbas683 toSci 000. -> 0 708 ddbas684 toSci 00. -> 0 709 ddbas685 toSci 0. -> 0 710 ddbas686 toSci +00000. -> 0 711 ddbas687 toSci -00000. -> -0 712 ddbas688 toSci +0. -> 0 713 ddbas689 toSci -0. -> -0 714 715 -- Specials 716 ddbas700 toSci "NaN" -> NaN 717 ddbas701 toSci "nan" -> NaN 718 ddbas702 toSci "nAn" -> NaN 719 ddbas703 toSci "NAN" -> NaN 720 ddbas704 toSci "+NaN" -> NaN 721 ddbas705 toSci "+nan" -> NaN 722 ddbas706 toSci "+nAn" -> NaN 723 ddbas707 toSci "+NAN" -> NaN 724 ddbas708 toSci "-NaN" -> -NaN 725 ddbas709 toSci "-nan" -> -NaN 726 ddbas710 toSci "-nAn" -> -NaN 727 ddbas711 toSci "-NAN" -> -NaN 728 ddbas712 toSci 'NaN0' -> NaN 729 ddbas713 toSci 'NaN1' -> NaN1 730 ddbas714 toSci 'NaN12' -> NaN12 731 ddbas715 toSci 'NaN123' -> NaN123 732 ddbas716 toSci 'NaN1234' -> NaN1234 733 ddbas717 toSci 'NaN01' -> NaN1 734 ddbas718 toSci 'NaN012' -> NaN12 735 ddbas719 toSci 'NaN0123' -> NaN123 736 ddbas720 toSci 'NaN01234' -> NaN1234 737 ddbas721 toSci 'NaN001' -> NaN1 738 ddbas722 toSci 'NaN0012' -> NaN12 739 ddbas723 toSci 'NaN00123' -> NaN123 740 ddbas724 toSci 'NaN001234' -> NaN1234 741 ddbas725 toSci 'NaN1234567890123456' -> NaN Conversion_syntax 742 ddbas726 toSci 'NaN123e+1' -> NaN Conversion_syntax 743 ddbas727 toSci 'NaN12.45' -> NaN Conversion_syntax 744 ddbas728 toSci 'NaN-12' -> NaN Conversion_syntax 745 ddbas729 toSci 'NaN+12' -> NaN Conversion_syntax 746 747 ddbas730 toSci "sNaN" -> sNaN 748 ddbas731 toSci "snan" -> sNaN 749 ddbas732 toSci "SnAn" -> sNaN 750 ddbas733 toSci "SNAN" -> sNaN 751 ddbas734 toSci "+sNaN" -> sNaN 752 ddbas735 toSci "+snan" -> sNaN 753 ddbas736 toSci "+SnAn" -> sNaN 754 ddbas737 toSci "+SNAN" -> sNaN 755 ddbas738 toSci "-sNaN" -> -sNaN 756 ddbas739 toSci "-snan" -> -sNaN 757 ddbas740 toSci "-SnAn" -> -sNaN 758 ddbas741 toSci "-SNAN" -> -sNaN 759 ddbas742 toSci 'sNaN0000' -> sNaN 760 ddbas743 toSci 'sNaN7' -> sNaN7 761 ddbas744 toSci 'sNaN007234' -> sNaN7234 762 ddbas745 toSci 'sNaN7234561234567890' -> NaN Conversion_syntax 763 ddbas746 toSci 'sNaN72.45' -> NaN Conversion_syntax 764 ddbas747 toSci 'sNaN-72' -> NaN Conversion_syntax 765 766 ddbas748 toSci "Inf" -> Infinity 767 ddbas749 toSci "inf" -> Infinity 768 ddbas750 toSci "iNf" -> Infinity 769 ddbas751 toSci "INF" -> Infinity 770 ddbas752 toSci "+Inf" -> Infinity 771 ddbas753 toSci "+inf" -> Infinity 772 ddbas754 toSci "+iNf" -> Infinity 773 ddbas755 toSci "+INF" -> Infinity 774 ddbas756 toSci "-Inf" -> -Infinity 775 ddbas757 toSci "-inf" -> -Infinity 776 ddbas758 toSci "-iNf" -> -Infinity 777 ddbas759 toSci "-INF" -> -Infinity 778 779 ddbas760 toSci "Infinity" -> Infinity 780 ddbas761 toSci "infinity" -> Infinity 781 ddbas762 toSci "iNfInItY" -> Infinity 782 ddbas763 toSci "INFINITY" -> Infinity 783 ddbas764 toSci "+Infinity" -> Infinity 784 ddbas765 toSci "+infinity" -> Infinity 785 ddbas766 toSci "+iNfInItY" -> Infinity 786 ddbas767 toSci "+INFINITY" -> Infinity 787 ddbas768 toSci "-Infinity" -> -Infinity 788 ddbas769 toSci "-infinity" -> -Infinity 789 ddbas770 toSci "-iNfInItY" -> -Infinity 790 ddbas771 toSci "-INFINITY" -> -Infinity 791 792 -- Specials and zeros for toEng 793 ddbast772 toEng "NaN" -> NaN 794 ddbast773 toEng "-Infinity" -> -Infinity 795 ddbast774 toEng "-sNaN" -> -sNaN 796 ddbast775 toEng "-NaN" -> -NaN 797 ddbast776 toEng "+Infinity" -> Infinity 798 ddbast778 toEng "+sNaN" -> sNaN 799 ddbast779 toEng "+NaN" -> NaN 800 ddbast780 toEng "INFINITY" -> Infinity 801 ddbast781 toEng "SNAN" -> sNaN 802 ddbast782 toEng "NAN" -> NaN 803 ddbast783 toEng "infinity" -> Infinity 804 ddbast784 toEng "snan" -> sNaN 805 ddbast785 toEng "nan" -> NaN 806 ddbast786 toEng "InFINITY" -> Infinity 807 ddbast787 toEng "SnAN" -> sNaN 808 ddbast788 toEng "nAN" -> NaN 809 ddbast789 toEng "iNfinity" -> Infinity 810 ddbast790 toEng "sNan" -> sNaN 811 ddbast791 toEng "Nan" -> NaN 812 ddbast792 toEng "Infinity" -> Infinity 813 ddbast793 toEng "sNaN" -> sNaN 814 815 -- Zero toEng, etc. 816 ddbast800 toEng 0e+1 -> "0.00E+3" -- doc example 817 818 ddbast801 toEng 0.000000000 -> 0E-9 819 ddbast802 toEng 0.00000000 -> 0.00E-6 820 ddbast803 toEng 0.0000000 -> 0.0E-6 821 ddbast804 toEng 0.000000 -> 0.000000 822 ddbast805 toEng 0.00000 -> 0.00000 823 ddbast806 toEng 0.0000 -> 0.0000 824 ddbast807 toEng 0.000 -> 0.000 825 ddbast808 toEng 0.00 -> 0.00 826 ddbast809 toEng 0.0 -> 0.0 827 ddbast810 toEng .0 -> 0.0 828 ddbast811 toEng 0. -> 0 829 ddbast812 toEng -.0 -> -0.0 830 ddbast813 toEng -0. -> -0 831 ddbast814 toEng -0.0 -> -0.0 832 ddbast815 toEng -0.00 -> -0.00 833 ddbast816 toEng -0.000 -> -0.000 834 ddbast817 toEng -0.0000 -> -0.0000 835 ddbast818 toEng -0.00000 -> -0.00000 836 ddbast819 toEng -0.000000 -> -0.000000 837 ddbast820 toEng -0.0000000 -> -0.0E-6 838 ddbast821 toEng -0.00000000 -> -0.00E-6 839 ddbast822 toEng -0.000000000 -> -0E-9 840 841 ddbast830 toEng 0.00E+0 -> 0.00 842 ddbast831 toEng 0.00E+1 -> 0.0 843 ddbast832 toEng 0.00E+2 -> 0 844 ddbast833 toEng 0.00E+3 -> 0.00E+3 845 ddbast834 toEng 0.00E+4 -> 0.0E+3 846 ddbast835 toEng 0.00E+5 -> 0E+3 847 ddbast836 toEng 0.00E+6 -> 0.00E+6 848 ddbast837 toEng 0.00E+7 -> 0.0E+6 849 ddbast838 toEng 0.00E+8 -> 0E+6 850 ddbast839 toEng 0.00E+9 -> 0.00E+9 851 852 ddbast840 toEng 0.0E+0 -> 0.0 853 ddbast841 toEng 0.0E+1 -> 0 854 ddbast842 toEng 0.0E+2 -> 0.00E+3 855 ddbast843 toEng 0.0E+3 -> 0.0E+3 856 ddbast844 toEng 0.0E+4 -> 0E+3 857 ddbast845 toEng 0.0E+5 -> 0.00E+6 858 ddbast846 toEng 0.0E+6 -> 0.0E+6 859 ddbast847 toEng 0.0E+7 -> 0E+6 860 ddbast848 toEng 0.0E+8 -> 0.00E+9 861 ddbast849 toEng 0.0E+9 -> 0.0E+9 862 863 ddbast850 toEng 0E+0 -> 0 864 ddbast851 toEng 0E+1 -> 0.00E+3 865 ddbast852 toEng 0E+2 -> 0.0E+3 866 ddbast853 toEng 0E+3 -> 0E+3 867 ddbast854 toEng 0E+4 -> 0.00E+6 868 ddbast855 toEng 0E+5 -> 0.0E+6 869 ddbast856 toEng 0E+6 -> 0E+6 870 ddbast857 toEng 0E+7 -> 0.00E+9 871 ddbast858 toEng 0E+8 -> 0.0E+9 872 ddbast859 toEng 0E+9 -> 0E+9 873 874 ddbast860 toEng 0.0E-0 -> 0.0 875 ddbast861 toEng 0.0E-1 -> 0.00 876 ddbast862 toEng 0.0E-2 -> 0.000 877 ddbast863 toEng 0.0E-3 -> 0.0000 878 ddbast864 toEng 0.0E-4 -> 0.00000 879 ddbast865 toEng 0.0E-5 -> 0.000000 880 ddbast866 toEng 0.0E-6 -> 0.0E-6 881 ddbast867 toEng 0.0E-7 -> 0.00E-6 882 ddbast868 toEng 0.0E-8 -> 0E-9 883 ddbast869 toEng 0.0E-9 -> 0.0E-9 884 885 ddbast870 toEng 0.00E-0 -> 0.00 886 ddbast871 toEng 0.00E-1 -> 0.000 887 ddbast872 toEng 0.00E-2 -> 0.0000 888 ddbast873 toEng 0.00E-3 -> 0.00000 889 ddbast874 toEng 0.00E-4 -> 0.000000 890 ddbast875 toEng 0.00E-5 -> 0.0E-6 891 ddbast876 toEng 0.00E-6 -> 0.00E-6 892 ddbast877 toEng 0.00E-7 -> 0E-9 893 ddbast878 toEng 0.00E-8 -> 0.0E-9 894 ddbast879 toEng 0.00E-9 -> 0.00E-9 895 896 -- long input strings 897 ddbas801 tosci '01234567890123456' -> 1234567890123456 898 ddbas802 tosci '001234567890123456' -> 1234567890123456 899 ddbas803 tosci '0001234567890123456' -> 1234567890123456 900 ddbas804 tosci '00001234567890123456' -> 1234567890123456 901 ddbas805 tosci '000001234567890123456' -> 1234567890123456 902 ddbas806 tosci '0000001234567890123456' -> 1234567890123456 903 ddbas807 tosci '00000001234567890123456' -> 1234567890123456 904 ddbas808 tosci '000000001234567890123456' -> 1234567890123456 905 ddbas809 tosci '0000000001234567890123456' -> 1234567890123456 906 ddbas810 tosci '00000000001234567890123456' -> 1234567890123456 907 908 ddbas811 tosci '0.1234567890123456' -> 0.1234567890123456 909 ddbas812 tosci '0.01234567890123456' -> 0.01234567890123456 910 ddbas813 tosci '0.001234567890123456' -> 0.001234567890123456 911 ddbas814 tosci '0.0001234567890123456' -> 0.0001234567890123456 912 ddbas815 tosci '0.00001234567890123456' -> 0.00001234567890123456 913 ddbas816 tosci '0.000001234567890123456' -> 0.000001234567890123456 914 ddbas817 tosci '0.0000001234567890123456' -> 1.234567890123456E-7 915 ddbas818 tosci '0.00000001234567890123456' -> 1.234567890123456E-8 916 ddbas819 tosci '0.000000001234567890123456' -> 1.234567890123456E-9 917 ddbas820 tosci '0.0000000001234567890123456' -> 1.234567890123456E-10 918 919 ddbas821 tosci '12345678901234567890' -> 1.234567890123457E+19 Inexact Rounded 920 ddbas822 tosci '123456789012345678901' -> 1.234567890123457E+20 Inexact Rounded 921 ddbas823 tosci '1234567890123456789012' -> 1.234567890123457E+21 Inexact Rounded 922 ddbas824 tosci '12345678901234567890123' -> 1.234567890123457E+22 Inexact Rounded 923 ddbas825 tosci '123456789012345678901234' -> 1.234567890123457E+23 Inexact Rounded 924 ddbas826 tosci '1234567890123456789012345' -> 1.234567890123457E+24 Inexact Rounded 925 ddbas827 tosci '12345678901234567890123456' -> 1.234567890123457E+25 Inexact Rounded 926 ddbas828 tosci '123456789012345678901234567' -> 1.234567890123457E+26 Inexact Rounded 927 ddbas829 tosci '1234567890123456789012345678' -> 1.234567890123457E+27 Inexact Rounded 928 929 -- subnormals and overflows 930 ddbas906 toSci '99e999999999' -> Infinity Overflow Inexact Rounded 931 ddbas907 toSci '999e999999999' -> Infinity Overflow Inexact Rounded 932 ddbas908 toSci '0.9e-999999999' -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 933 ddbas909 toSci '0.09e-999999999' -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 934 ddbas910 toSci '0.1e1000000000' -> Infinity Overflow Inexact Rounded 935 ddbas911 toSci '10e-1000000000' -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 936 ddbas912 toSci '0.9e9999999999' -> Infinity Overflow Inexact Rounded 937 ddbas913 toSci '99e-9999999999' -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 938 ddbas914 toSci '111e9999999999' -> Infinity Overflow Inexact Rounded 939 ddbas915 toSci '1111e-9999999999' -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 940 ddbas916 toSci '1111e-99999999999' -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 941 ddbas917 toSci '7e1000000000' -> Infinity Overflow Inexact Rounded 942 -- negatives the same 943 ddbas918 toSci '-99e999999999' -> -Infinity Overflow Inexact Rounded 944 ddbas919 toSci '-999e999999999' -> -Infinity Overflow Inexact Rounded 945 ddbas920 toSci '-0.9e-999999999' -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 946 ddbas921 toSci '-0.09e-999999999' -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 947 ddbas922 toSci '-0.1e1000000000' -> -Infinity Overflow Inexact Rounded 948 ddbas923 toSci '-10e-1000000000' -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 949 ddbas924 toSci '-0.9e9999999999' -> -Infinity Overflow Inexact Rounded 950 ddbas925 toSci '-99e-9999999999' -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 951 ddbas926 toSci '-111e9999999999' -> -Infinity Overflow Inexact Rounded 952 ddbas927 toSci '-1111e-9999999999' -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 953 ddbas928 toSci '-1111e-99999999999' -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 954 ddbas929 toSci '-7e1000000000' -> -Infinity Overflow Inexact Rounded 955 956 -- overflow results at different rounding modes 957 rounding: ceiling 958 ddbas930 toSci '7e10000' -> Infinity Overflow Inexact Rounded 959 ddbas931 toSci '-7e10000' -> -9.999999999999999E+384 Overflow Inexact Rounded 960 rounding: up 961 ddbas932 toSci '7e10000' -> Infinity Overflow Inexact Rounded 962 ddbas933 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded 963 rounding: down 964 ddbas934 toSci '7e10000' -> 9.999999999999999E+384 Overflow Inexact Rounded 965 ddbas935 toSci '-7e10000' -> -9.999999999999999E+384 Overflow Inexact Rounded 966 rounding: floor 967 ddbas936 toSci '7e10000' -> 9.999999999999999E+384 Overflow Inexact Rounded 968 ddbas937 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded 969 970 rounding: half_up 971 ddbas938 toSci '7e10000' -> Infinity Overflow Inexact Rounded 972 ddbas939 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded 973 rounding: half_even 974 ddbas940 toSci '7e10000' -> Infinity Overflow Inexact Rounded 975 ddbas941 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded 976 rounding: half_down 977 ddbas942 toSci '7e10000' -> Infinity Overflow Inexact Rounded 978 ddbas943 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded 979 980 rounding: half_even 981 982 -- Now check 854/754r some subnormals and underflow to 0 983 ddbem400 toSci 1.0000E-383 -> 1.0000E-383 984 ddbem401 toSci 0.1E-394 -> 1E-395 Subnormal 985 ddbem402 toSci 0.1000E-394 -> 1.000E-395 Subnormal 986 ddbem403 toSci 0.0100E-394 -> 1.00E-396 Subnormal 987 ddbem404 toSci 0.0010E-394 -> 1.0E-397 Subnormal 988 ddbem405 toSci 0.0001E-394 -> 1E-398 Subnormal 989 ddbem406 toSci 0.00010E-394 -> 1E-398 Subnormal Rounded 990 ddbem407 toSci 0.00013E-394 -> 1E-398 Underflow Subnormal Inexact Rounded 991 ddbem408 toSci 0.00015E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 992 ddbem409 toSci 0.00017E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 993 ddbem410 toSci 0.00023E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 994 ddbem411 toSci 0.00025E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 995 ddbem412 toSci 0.00027E-394 -> 3E-398 Underflow Subnormal Inexact Rounded 996 ddbem413 toSci 0.000149E-394 -> 1E-398 Underflow Subnormal Inexact Rounded 997 ddbem414 toSci 0.000150E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 998 ddbem415 toSci 0.000151E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 999 ddbem416 toSci 0.000249E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 1000 ddbem417 toSci 0.000250E-394 -> 2E-398 Underflow Subnormal Inexact Rounded 1001 ddbem418 toSci 0.000251E-394 -> 3E-398 Underflow Subnormal Inexact Rounded 1002 ddbem419 toSci 0.00009E-394 -> 1E-398 Underflow Subnormal Inexact Rounded 1003 ddbem420 toSci 0.00005E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1004 ddbem421 toSci 0.00003E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1005 ddbem422 toSci 0.000009E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1006 ddbem423 toSci 0.000005E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1007 ddbem424 toSci 0.000003E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1008 1009 ddbem425 toSci 0.001049E-394 -> 1.0E-397 Underflow Subnormal Inexact Rounded 1010 ddbem426 toSci 0.001050E-394 -> 1.0E-397 Underflow Subnormal Inexact Rounded 1011 ddbem427 toSci 0.001051E-394 -> 1.1E-397 Underflow Subnormal Inexact Rounded 1012 ddbem428 toSci 0.001149E-394 -> 1.1E-397 Underflow Subnormal Inexact Rounded 1013 ddbem429 toSci 0.001150E-394 -> 1.2E-397 Underflow Subnormal Inexact Rounded 1014 ddbem430 toSci 0.001151E-394 -> 1.2E-397 Underflow Subnormal Inexact Rounded 1015 1016 ddbem432 toSci 0.010049E-394 -> 1.00E-396 Underflow Subnormal Inexact Rounded 1017 ddbem433 toSci 0.010050E-394 -> 1.00E-396 Underflow Subnormal Inexact Rounded 1018 ddbem434 toSci 0.010051E-394 -> 1.01E-396 Underflow Subnormal Inexact Rounded 1019 ddbem435 toSci 0.010149E-394 -> 1.01E-396 Underflow Subnormal Inexact Rounded 1020 ddbem436 toSci 0.010150E-394 -> 1.02E-396 Underflow Subnormal Inexact Rounded 1021 ddbem437 toSci 0.010151E-394 -> 1.02E-396 Underflow Subnormal Inexact Rounded 1022 1023 ddbem440 toSci 0.10103E-394 -> 1.010E-395 Underflow Subnormal Inexact Rounded 1024 ddbem441 toSci 0.10105E-394 -> 1.010E-395 Underflow Subnormal Inexact Rounded 1025 ddbem442 toSci 0.10107E-394 -> 1.011E-395 Underflow Subnormal Inexact Rounded 1026 ddbem443 toSci 0.10113E-394 -> 1.011E-395 Underflow Subnormal Inexact Rounded 1027 ddbem444 toSci 0.10115E-394 -> 1.012E-395 Underflow Subnormal Inexact Rounded 1028 ddbem445 toSci 0.10117E-394 -> 1.012E-395 Underflow Subnormal Inexact Rounded 1029 1030 ddbem450 toSci 1.10730E-395 -> 1.107E-395 Underflow Subnormal Inexact Rounded 1031 ddbem451 toSci 1.10750E-395 -> 1.108E-395 Underflow Subnormal Inexact Rounded 1032 ddbem452 toSci 1.10770E-395 -> 1.108E-395 Underflow Subnormal Inexact Rounded 1033 ddbem453 toSci 1.10830E-395 -> 1.108E-395 Underflow Subnormal Inexact Rounded 1034 ddbem454 toSci 1.10850E-395 -> 1.108E-395 Underflow Subnormal Inexact Rounded 1035 ddbem455 toSci 1.10870E-395 -> 1.109E-395 Underflow Subnormal Inexact Rounded 1036 1037 -- make sure sign OK 1038 ddbem456 toSci -0.10103E-394 -> -1.010E-395 Underflow Subnormal Inexact Rounded 1039 ddbem457 toSci -0.10105E-394 -> -1.010E-395 Underflow Subnormal Inexact Rounded 1040 ddbem458 toSci -0.10107E-394 -> -1.011E-395 Underflow Subnormal Inexact Rounded 1041 ddbem459 toSci -0.10113E-394 -> -1.011E-395 Underflow Subnormal Inexact Rounded 1042 ddbem460 toSci -0.10115E-394 -> -1.012E-395 Underflow Subnormal Inexact Rounded 1043 ddbem461 toSci -0.10117E-394 -> -1.012E-395 Underflow Subnormal Inexact Rounded 1044 1045 -- '999s' cases 1046 ddbem464 toSci 999999E-395 -> 9.99999E-390 Subnormal 1047 ddbem465 toSci 99999.0E-394 -> 9.99990E-390 Subnormal 1048 ddbem466 toSci 99999.E-394 -> 9.9999E-390 Subnormal 1049 ddbem467 toSci 9999.9E-394 -> 9.9999E-391 Subnormal 1050 ddbem468 toSci 999.99E-394 -> 9.9999E-392 Subnormal 1051 ddbem469 toSci 99.999E-394 -> 9.9999E-393 Subnormal 1052 ddbem470 toSci 9.9999E-394 -> 9.9999E-394 Subnormal 1053 ddbem471 toSci 0.99999E-394 -> 1.0000E-394 Underflow Subnormal Inexact Rounded 1054 ddbem472 toSci 0.099999E-394 -> 1.000E-395 Underflow Subnormal Inexact Rounded 1055 ddbem473 toSci 0.0099999E-394 -> 1.00E-396 Underflow Subnormal Inexact Rounded 1056 ddbem474 toSci 0.00099999E-394 -> 1.0E-397 Underflow Subnormal Inexact Rounded 1057 ddbem475 toSci 0.000099999E-394 -> 1E-398 Underflow Subnormal Inexact Rounded 1058 ddbem476 toSci 0.0000099999E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1059 ddbem477 toSci 0.00000099999E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1060 ddbem478 toSci 0.000000099999E-394 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1061 1062 -- Exponents with insignificant leading zeros 1063 ddbas1001 toSci 1e999999999 -> Infinity Overflow Inexact Rounded 1064 ddbas1002 toSci 1e0999999999 -> Infinity Overflow Inexact Rounded 1065 ddbas1003 toSci 1e00999999999 -> Infinity Overflow Inexact Rounded 1066 ddbas1004 toSci 1e000999999999 -> Infinity Overflow Inexact Rounded 1067 ddbas1005 toSci 1e000000000000999999999 -> Infinity Overflow Inexact Rounded 1068 ddbas1006 toSci 1e000000000001000000007 -> Infinity Overflow Inexact Rounded 1069 ddbas1007 toSci 1e-999999999 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1070 ddbas1008 toSci 1e-0999999999 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1071 ddbas1009 toSci 1e-00999999999 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1072 ddbas1010 toSci 1e-000999999999 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1073 ddbas1011 toSci 1e-000000000000999999999 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1074 ddbas1012 toSci 1e-000000000001000000007 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 1075 1076 -- check for double-rounded subnormals 1077 ddbas1041 toSci 1.1111111111152444E-384 -> 1.11111111111524E-384 Inexact Rounded Subnormal Underflow 1078 ddbas1042 toSci 1.1111111111152445E-384 -> 1.11111111111524E-384 Inexact Rounded Subnormal Underflow 1079 ddbas1043 toSci 1.1111111111152446E-384 -> 1.11111111111524E-384 Inexact Rounded Subnormal Underflow 1080 1081 -- clamped large normals 1082 ddbas1070 toSci 1E+369 -> 1E+369 1083 ddbas1071 toSci 1E+370 -> 1.0E+370 Clamped 1084 ddbas1072 toSci 1E+378 -> 1.000000000E+378 Clamped 1085 ddbas1073 toSci 1E+384 -> 1.000000000000000E+384 Clamped 1086 ddbas1074 toSci 1E+385 -> Infinity Overflow Inexact Rounded 1087 1088 1089 -- clamped zeros [see also clamp.decTest] 1090 ddbas1075 toSci 0e+10000 -> 0E+369 Clamped 1091 ddbas1076 toSci 0e-10000 -> 0E-398 Clamped 1092 ddbas1077 toSci -0e+10000 -> -0E+369 Clamped 1093 ddbas1078 toSci -0e-10000 -> -0E-398 Clamped 1094 1095 -- extreme values from next-wider 1096 ddbas1101 toSci -9.99999999999999999999999999999999E+6144 -> -Infinity Overflow Inexact Rounded 1097 ddbas1102 toSci -1E-6143 -> -0E-398 Inexact Rounded Subnormal Underflow Clamped 1098 ddbas1103 toSci -1E-6176 -> -0E-398 Inexact Rounded Subnormal Underflow Clamped 1099 ddbas1104 toSci -0 -> -0 1100 ddbas1105 toSci +0 -> 0 1101 ddbas1106 toSci +1E-6176 -> 0E-398 Inexact Rounded Subnormal Underflow Clamped 1102 ddbas1107 toSci +1E-6173 -> 0E-398 Inexact Rounded Subnormal Underflow Clamped 1103 ddbas1108 toSci +9.99999999999999999999999999999999E+6144 -> Infinity Overflow Inexact Rounded 1104 1105