ddBase.decTest 52 KB

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