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