dsBase.decTest 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  1. ------------------------------------------------------------------------
  2. -- dsBase.decTest -- base decSingle <--> 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 decSingle. 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. extended: 1
  31. clamp: 1
  32. precision: 7
  33. maxExponent: 96
  34. minExponent: -95
  35. rounding: half_even
  36. dsbas001 toSci 0 -> 0
  37. dsbas002 toSci 1 -> 1
  38. dsbas003 toSci 1.0 -> 1.0
  39. dsbas004 toSci 1.00 -> 1.00
  40. dsbas005 toSci 10 -> 10
  41. dsbas006 toSci 1000 -> 1000
  42. dsbas007 toSci 10.0 -> 10.0
  43. dsbas008 toSci 10.1 -> 10.1
  44. dsbas009 toSci 10.4 -> 10.4
  45. dsbas010 toSci 10.5 -> 10.5
  46. dsbas011 toSci 10.6 -> 10.6
  47. dsbas012 toSci 10.9 -> 10.9
  48. dsbas013 toSci 11.0 -> 11.0
  49. dsbas014 toSci 1.234 -> 1.234
  50. dsbas015 toSci 0.123 -> 0.123
  51. dsbas016 toSci 0.012 -> 0.012
  52. dsbas017 toSci -0 -> -0
  53. dsbas018 toSci -0.0 -> -0.0
  54. dsbas019 toSci -00.00 -> -0.00
  55. dsbas021 toSci -1 -> -1
  56. dsbas022 toSci -1.0 -> -1.0
  57. dsbas023 toSci -0.1 -> -0.1
  58. dsbas024 toSci -9.1 -> -9.1
  59. dsbas025 toSci -9.11 -> -9.11
  60. dsbas026 toSci -9.119 -> -9.119
  61. dsbas027 toSci -9.999 -> -9.999
  62. dsbas030 toSci '1234.567' -> '1234.567'
  63. dsbas031 toSci '1234.000' -> '1234.000'
  64. dsbas032 toSci '1234912' -> '1234912'
  65. dsbas033 toSci '0.00001234567' -> '0.00001234567'
  66. dsbas034 toSci '0.000001234567' -> '0.000001234567'
  67. dsbas035 toSci '0.0000001234567' -> '1.234567E-7'
  68. dsbas036 toSci '0.00000001234567' -> '1.234567E-8'
  69. dsbas037 toSci '0.1234564' -> '0.1234564'
  70. dsbas038 toSci '0.1234565' -> '0.1234565'
  71. -- test finite bounds (Negs of, then 0, Ntiny, Nmin, other, Nmax)
  72. dsbsn001 toSci -9.999999E+96 -> -9.999999E+96
  73. dsbsn002 toSci -1E-95 -> -1E-95
  74. dsbsn003 toSci -1E-101 -> -1E-101 Subnormal
  75. dsbsn004 toSci -0 -> -0
  76. dsbsn005 toSci +0 -> 0
  77. dsbsn006 toSci +1E-101 -> 1E-101 Subnormal
  78. dsbsn007 toSci +1E-95 -> 1E-95
  79. dsbsn008 toSci +9.999999E+96 -> 9.999999E+96
  80. -- String [many more examples are implicitly tested elsewhere]
  81. -- strings without E cannot generate E in result
  82. dsbas040 toSci "12" -> '12'
  83. dsbas041 toSci "-76" -> '-76'
  84. dsbas042 toSci "12.76" -> '12.76'
  85. dsbas043 toSci "+12.76" -> '12.76'
  86. dsbas044 toSci "012.76" -> '12.76'
  87. dsbas045 toSci "+0.003" -> '0.003'
  88. dsbas046 toSci "17." -> '17'
  89. dsbas047 toSci ".5" -> '0.5'
  90. dsbas048 toSci "044" -> '44'
  91. dsbas049 toSci "0044" -> '44'
  92. dsbas050 toSci "0.0005" -> '0.0005'
  93. dsbas051 toSci "00.00005" -> '0.00005'
  94. dsbas052 toSci "0.000005" -> '0.000005'
  95. dsbas053 toSci "0.0000050" -> '0.0000050'
  96. dsbas054 toSci "0.0000005" -> '5E-7'
  97. dsbas055 toSci "0.00000005" -> '5E-8'
  98. dsbas056 toSci "12678.54" -> '12678.54'
  99. dsbas057 toSci "2678.543" -> '2678.543'
  100. dsbas058 toSci "345678.5" -> '345678.5'
  101. dsbas059 toSci "0678.5432" -> '678.5432'
  102. dsbas060 toSci "678.5432" -> '678.5432'
  103. dsbas061 toSci "+678.5432" -> '678.5432'
  104. dsbas062 toSci "+0678.5432" -> '678.5432'
  105. dsbas063 toSci "+00678.5432" -> '678.5432'
  106. dsbas064 toSci "-678.5432" -> '-678.5432'
  107. dsbas065 toSci "-0678.5432" -> '-678.5432'
  108. dsbas066 toSci "-00678.5432" -> '-678.5432'
  109. -- examples
  110. dsbas067 toSci "5E-6" -> '0.000005'
  111. dsbas068 toSci "50E-7" -> '0.0000050'
  112. dsbas069 toSci "5E-7" -> '5E-7'
  113. -- [No exotics as no Unicode]
  114. -- rounded with dots in all (including edge) places
  115. dsbas071 toSci .1234567890123456 -> 0.1234568 Inexact Rounded
  116. dsbas072 toSci 1.234567890123456 -> 1.234568 Inexact Rounded
  117. dsbas073 toSci 12.34567890123456 -> 12.34568 Inexact Rounded
  118. dsbas074 toSci 123.4567890123456 -> 123.4568 Inexact Rounded
  119. dsbas075 toSci 1234.567890123456 -> 1234.568 Inexact Rounded
  120. dsbas076 toSci 12345.67890123456 -> 12345.68 Inexact Rounded
  121. dsbas077 toSci 123456.7890123456 -> 123456.8 Inexact Rounded
  122. dsbas078 toSci 1234567.890123456 -> 1234568 Inexact Rounded
  123. dsbas079 toSci 12345678.90123456 -> 1.234568E+7 Inexact Rounded
  124. dsbas080 toSci 123456789.0123456 -> 1.234568E+8 Inexact Rounded
  125. dsbas081 toSci 1234567890.123456 -> 1.234568E+9 Inexact Rounded
  126. dsbas082 toSci 12345678901.23456 -> 1.234568E+10 Inexact Rounded
  127. dsbas083 toSci 123456789012.3456 -> 1.234568E+11 Inexact Rounded
  128. dsbas084 toSci 1234567890123.456 -> 1.234568E+12 Inexact Rounded
  129. dsbas085 toSci 12345678901234.56 -> 1.234568E+13 Inexact Rounded
  130. dsbas086 toSci 123456789012345.6 -> 1.234568E+14 Inexact Rounded
  131. dsbas087 toSci 1234567890123456. -> 1.234568E+15 Inexact Rounded
  132. dsbas088 toSci 1234567890123456 -> 1.234568E+15 Inexact Rounded
  133. -- Numbers with E
  134. dsbas130 toSci "0.000E-1" -> '0.0000'
  135. dsbas131 toSci "0.000E-2" -> '0.00000'
  136. dsbas132 toSci "0.000E-3" -> '0.000000'
  137. dsbas133 toSci "0.000E-4" -> '0E-7'
  138. dsbas134 toSci "0.00E-2" -> '0.0000'
  139. dsbas135 toSci "0.00E-3" -> '0.00000'
  140. dsbas136 toSci "0.00E-4" -> '0.000000'
  141. dsbas137 toSci "0.00E-5" -> '0E-7'
  142. dsbas138 toSci "+0E+9" -> '0E+9'
  143. dsbas139 toSci "-0E+9" -> '-0E+9'
  144. dsbas140 toSci "1E+9" -> '1E+9'
  145. dsbas141 toSci "1e+09" -> '1E+9'
  146. dsbas142 toSci "1E+90" -> '1E+90'
  147. dsbas143 toSci "+1E+009" -> '1E+9'
  148. dsbas144 toSci "0E+9" -> '0E+9'
  149. dsbas145 toSci "1E+9" -> '1E+9'
  150. dsbas146 toSci "1E+09" -> '1E+9'
  151. dsbas147 toSci "1e+90" -> '1E+90'
  152. dsbas148 toSci "1E+009" -> '1E+9'
  153. dsbas149 toSci "000E+9" -> '0E+9'
  154. dsbas150 toSci "1E9" -> '1E+9'
  155. dsbas151 toSci "1e09" -> '1E+9'
  156. dsbas152 toSci "1E90" -> '1E+90'
  157. dsbas153 toSci "1E009" -> '1E+9'
  158. dsbas154 toSci "0E9" -> '0E+9'
  159. dsbas155 toSci "0.000e+0" -> '0.000'
  160. dsbas156 toSci "0.000E-1" -> '0.0000'
  161. dsbas157 toSci "4E+9" -> '4E+9'
  162. dsbas158 toSci "44E+9" -> '4.4E+10'
  163. dsbas159 toSci "0.73e-7" -> '7.3E-8'
  164. dsbas160 toSci "00E+9" -> '0E+9'
  165. dsbas161 toSci "00E-9" -> '0E-9'
  166. dsbas162 toSci "10E+9" -> '1.0E+10'
  167. dsbas163 toSci "10E+09" -> '1.0E+10'
  168. dsbas164 toSci "10e+90" -> '1.0E+91'
  169. dsbas165 toSci "10E+009" -> '1.0E+10'
  170. dsbas166 toSci "100e+9" -> '1.00E+11'
  171. dsbas167 toSci "100e+09" -> '1.00E+11'
  172. dsbas168 toSci "100E+90" -> '1.00E+92'
  173. dsbas169 toSci "100e+009" -> '1.00E+11'
  174. dsbas170 toSci "1.265" -> '1.265'
  175. dsbas171 toSci "1.265E-20" -> '1.265E-20'
  176. dsbas172 toSci "1.265E-8" -> '1.265E-8'
  177. dsbas173 toSci "1.265E-4" -> '0.0001265'
  178. dsbas174 toSci "1.265E-3" -> '0.001265'
  179. dsbas175 toSci "1.265E-2" -> '0.01265'
  180. dsbas176 toSci "1.265E-1" -> '0.1265'
  181. dsbas177 toSci "1.265E-0" -> '1.265'
  182. dsbas178 toSci "1.265E+1" -> '12.65'
  183. dsbas179 toSci "1.265E+2" -> '126.5'
  184. dsbas180 toSci "1.265E+3" -> '1265'
  185. dsbas181 toSci "1.265E+4" -> '1.265E+4'
  186. dsbas182 toSci "1.265E+8" -> '1.265E+8'
  187. dsbas183 toSci "1.265E+20" -> '1.265E+20'
  188. dsbas190 toSci "12.65" -> '12.65'
  189. dsbas191 toSci "12.65E-20" -> '1.265E-19'
  190. dsbas192 toSci "12.65E-8" -> '1.265E-7'
  191. dsbas193 toSci "12.65E-4" -> '0.001265'
  192. dsbas194 toSci "12.65E-3" -> '0.01265'
  193. dsbas195 toSci "12.65E-2" -> '0.1265'
  194. dsbas196 toSci "12.65E-1" -> '1.265'
  195. dsbas197 toSci "12.65E-0" -> '12.65'
  196. dsbas198 toSci "12.65E+1" -> '126.5'
  197. dsbas199 toSci "12.65E+2" -> '1265'
  198. dsbas200 toSci "12.65E+3" -> '1.265E+4'
  199. dsbas201 toSci "12.65E+4" -> '1.265E+5'
  200. dsbas202 toSci "12.65E+8" -> '1.265E+9'
  201. dsbas203 toSci "12.65E+20" -> '1.265E+21'
  202. dsbas210 toSci "126.5" -> '126.5'
  203. dsbas211 toSci "126.5E-20" -> '1.265E-18'
  204. dsbas212 toSci "126.5E-8" -> '0.000001265'
  205. dsbas213 toSci "126.5E-4" -> '0.01265'
  206. dsbas214 toSci "126.5E-3" -> '0.1265'
  207. dsbas215 toSci "126.5E-2" -> '1.265'
  208. dsbas216 toSci "126.5E-1" -> '12.65'
  209. dsbas217 toSci "126.5E-0" -> '126.5'
  210. dsbas218 toSci "126.5E+1" -> '1265'
  211. dsbas219 toSci "126.5E+2" -> '1.265E+4'
  212. dsbas220 toSci "126.5E+3" -> '1.265E+5'
  213. dsbas221 toSci "126.5E+4" -> '1.265E+6'
  214. dsbas222 toSci "126.5E+8" -> '1.265E+10'
  215. dsbas223 toSci "126.5E+20" -> '1.265E+22'
  216. dsbas230 toSci "1265" -> '1265'
  217. dsbas231 toSci "1265E-20" -> '1.265E-17'
  218. dsbas232 toSci "1265E-8" -> '0.00001265'
  219. dsbas233 toSci "1265E-4" -> '0.1265'
  220. dsbas234 toSci "1265E-3" -> '1.265'
  221. dsbas235 toSci "1265E-2" -> '12.65'
  222. dsbas236 toSci "1265E-1" -> '126.5'
  223. dsbas237 toSci "1265E-0" -> '1265'
  224. dsbas238 toSci "1265E+1" -> '1.265E+4'
  225. dsbas239 toSci "1265E+2" -> '1.265E+5'
  226. dsbas240 toSci "1265E+3" -> '1.265E+6'
  227. dsbas241 toSci "1265E+4" -> '1.265E+7'
  228. dsbas242 toSci "1265E+8" -> '1.265E+11'
  229. dsbas243 toSci "1265E+20" -> '1.265E+23'
  230. dsbas250 toSci "0.1265" -> '0.1265'
  231. dsbas251 toSci "0.1265E-20" -> '1.265E-21'
  232. dsbas252 toSci "0.1265E-8" -> '1.265E-9'
  233. dsbas253 toSci "0.1265E-4" -> '0.00001265'
  234. dsbas254 toSci "0.1265E-3" -> '0.0001265'
  235. dsbas255 toSci "0.1265E-2" -> '0.001265'
  236. dsbas256 toSci "0.1265E-1" -> '0.01265'
  237. dsbas257 toSci "0.1265E-0" -> '0.1265'
  238. dsbas258 toSci "0.1265E+1" -> '1.265'
  239. dsbas259 toSci "0.1265E+2" -> '12.65'
  240. dsbas260 toSci "0.1265E+3" -> '126.5'
  241. dsbas261 toSci "0.1265E+4" -> '1265'
  242. dsbas262 toSci "0.1265E+8" -> '1.265E+7'
  243. dsbas263 toSci "0.1265E+20" -> '1.265E+19'
  244. -- some more negative zeros [systematic tests below]
  245. dsbas290 toSci "-0.000E-1" -> '-0.0000'
  246. dsbas291 toSci "-0.000E-2" -> '-0.00000'
  247. dsbas292 toSci "-0.000E-3" -> '-0.000000'
  248. dsbas293 toSci "-0.000E-4" -> '-0E-7'
  249. dsbas294 toSci "-0.00E-2" -> '-0.0000'
  250. dsbas295 toSci "-0.00E-3" -> '-0.00000'
  251. dsbas296 toSci "-0.0E-2" -> '-0.000'
  252. dsbas297 toSci "-0.0E-3" -> '-0.0000'
  253. dsbas298 toSci "-0E-2" -> '-0.00'
  254. dsbas299 toSci "-0E-3" -> '-0.000'
  255. -- Engineering notation tests
  256. dsbas301 toSci 10e12 -> 1.0E+13
  257. dsbas302 toEng 10e12 -> 10E+12
  258. dsbas303 toSci 10e11 -> 1.0E+12
  259. dsbas304 toEng 10e11 -> 1.0E+12
  260. dsbas305 toSci 10e10 -> 1.0E+11
  261. dsbas306 toEng 10e10 -> 100E+9
  262. dsbas307 toSci 10e9 -> 1.0E+10
  263. dsbas308 toEng 10e9 -> 10E+9
  264. dsbas309 toSci 10e8 -> 1.0E+9
  265. dsbas310 toEng 10e8 -> 1.0E+9
  266. dsbas311 toSci 10e7 -> 1.0E+8
  267. dsbas312 toEng 10e7 -> 100E+6
  268. dsbas313 toSci 10e6 -> 1.0E+7
  269. dsbas314 toEng 10e6 -> 10E+6
  270. dsbas315 toSci 10e5 -> 1.0E+6
  271. dsbas316 toEng 10e5 -> 1.0E+6
  272. dsbas317 toSci 10e4 -> 1.0E+5
  273. dsbas318 toEng 10e4 -> 100E+3
  274. dsbas319 toSci 10e3 -> 1.0E+4
  275. dsbas320 toEng 10e3 -> 10E+3
  276. dsbas321 toSci 10e2 -> 1.0E+3
  277. dsbas322 toEng 10e2 -> 1.0E+3
  278. dsbas323 toSci 10e1 -> 1.0E+2
  279. dsbas324 toEng 10e1 -> 100
  280. dsbas325 toSci 10e0 -> 10
  281. dsbas326 toEng 10e0 -> 10
  282. dsbas327 toSci 10e-1 -> 1.0
  283. dsbas328 toEng 10e-1 -> 1.0
  284. dsbas329 toSci 10e-2 -> 0.10
  285. dsbas330 toEng 10e-2 -> 0.10
  286. dsbas331 toSci 10e-3 -> 0.010
  287. dsbas332 toEng 10e-3 -> 0.010
  288. dsbas333 toSci 10e-4 -> 0.0010
  289. dsbas334 toEng 10e-4 -> 0.0010
  290. dsbas335 toSci 10e-5 -> 0.00010
  291. dsbas336 toEng 10e-5 -> 0.00010
  292. dsbas337 toSci 10e-6 -> 0.000010
  293. dsbas338 toEng 10e-6 -> 0.000010
  294. dsbas339 toSci 10e-7 -> 0.0000010
  295. dsbas340 toEng 10e-7 -> 0.0000010
  296. dsbas341 toSci 10e-8 -> 1.0E-7
  297. dsbas342 toEng 10e-8 -> 100E-9
  298. dsbas343 toSci 10e-9 -> 1.0E-8
  299. dsbas344 toEng 10e-9 -> 10E-9
  300. dsbas345 toSci 10e-10 -> 1.0E-9
  301. dsbas346 toEng 10e-10 -> 1.0E-9
  302. dsbas347 toSci 10e-11 -> 1.0E-10
  303. dsbas348 toEng 10e-11 -> 100E-12
  304. dsbas349 toSci 10e-12 -> 1.0E-11
  305. dsbas350 toEng 10e-12 -> 10E-12
  306. dsbas351 toSci 10e-13 -> 1.0E-12
  307. dsbas352 toEng 10e-13 -> 1.0E-12
  308. dsbas361 toSci 7E12 -> 7E+12
  309. dsbas362 toEng 7E12 -> 7E+12
  310. dsbas363 toSci 7E11 -> 7E+11
  311. dsbas364 toEng 7E11 -> 700E+9
  312. dsbas365 toSci 7E10 -> 7E+10
  313. dsbas366 toEng 7E10 -> 70E+9
  314. dsbas367 toSci 7E9 -> 7E+9
  315. dsbas368 toEng 7E9 -> 7E+9
  316. dsbas369 toSci 7E8 -> 7E+8
  317. dsbas370 toEng 7E8 -> 700E+6
  318. dsbas371 toSci 7E7 -> 7E+7
  319. dsbas372 toEng 7E7 -> 70E+6
  320. dsbas373 toSci 7E6 -> 7E+6
  321. dsbas374 toEng 7E6 -> 7E+6
  322. dsbas375 toSci 7E5 -> 7E+5
  323. dsbas376 toEng 7E5 -> 700E+3
  324. dsbas377 toSci 7E4 -> 7E+4
  325. dsbas378 toEng 7E4 -> 70E+3
  326. dsbas379 toSci 7E3 -> 7E+3
  327. dsbas380 toEng 7E3 -> 7E+3
  328. dsbas381 toSci 7E2 -> 7E+2
  329. dsbas382 toEng 7E2 -> 700
  330. dsbas383 toSci 7E1 -> 7E+1
  331. dsbas384 toEng 7E1 -> 70
  332. dsbas385 toSci 7E0 -> 7
  333. dsbas386 toEng 7E0 -> 7
  334. dsbas387 toSci 7E-1 -> 0.7
  335. dsbas388 toEng 7E-1 -> 0.7
  336. dsbas389 toSci 7E-2 -> 0.07
  337. dsbas390 toEng 7E-2 -> 0.07
  338. dsbas391 toSci 7E-3 -> 0.007
  339. dsbas392 toEng 7E-3 -> 0.007
  340. dsbas393 toSci 7E-4 -> 0.0007
  341. dsbas394 toEng 7E-4 -> 0.0007
  342. dsbas395 toSci 7E-5 -> 0.00007
  343. dsbas396 toEng 7E-5 -> 0.00007
  344. dsbas397 toSci 7E-6 -> 0.000007
  345. dsbas398 toEng 7E-6 -> 0.000007
  346. dsbas399 toSci 7E-7 -> 7E-7
  347. dsbas400 toEng 7E-7 -> 700E-9
  348. dsbas401 toSci 7E-8 -> 7E-8
  349. dsbas402 toEng 7E-8 -> 70E-9
  350. dsbas403 toSci 7E-9 -> 7E-9
  351. dsbas404 toEng 7E-9 -> 7E-9
  352. dsbas405 toSci 7E-10 -> 7E-10
  353. dsbas406 toEng 7E-10 -> 700E-12
  354. dsbas407 toSci 7E-11 -> 7E-11
  355. dsbas408 toEng 7E-11 -> 70E-12
  356. dsbas409 toSci 7E-12 -> 7E-12
  357. dsbas410 toEng 7E-12 -> 7E-12
  358. dsbas411 toSci 7E-13 -> 7E-13
  359. dsbas412 toEng 7E-13 -> 700E-15
  360. -- Exacts remain exact up to precision ..
  361. dsbas420 toSci 100 -> 100
  362. dsbas422 toSci 1000 -> 1000
  363. dsbas424 toSci 999.9 -> 999.9
  364. dsbas426 toSci 1000.0 -> 1000.0
  365. dsbas428 toSci 1000.1 -> 1000.1
  366. dsbas430 toSci 10000 -> 10000
  367. dsbas432 toSci 1000 -> 1000
  368. dsbas434 toSci 10000 -> 10000
  369. dsbas436 toSci 100000 -> 100000
  370. dsbas438 toSci 1000000 -> 1000000
  371. dsbas440 toSci 10000000 -> 1.000000E+7 Rounded
  372. dsbas442 toSci 10000000 -> 1.000000E+7 Rounded
  373. dsbas444 toSci 10000003 -> 1.000000E+7 Rounded Inexact
  374. dsbas446 toSci 10000005 -> 1.000000E+7 Rounded Inexact
  375. dsbas448 toSci 100000050 -> 1.000000E+8 Rounded Inexact
  376. dsbas450 toSci 10000009 -> 1.000001E+7 Rounded Inexact
  377. dsbas452 toSci 100000000 -> 1.000000E+8 Rounded
  378. dsbas454 toSci 100000003 -> 1.000000E+8 Rounded Inexact
  379. dsbas456 toSci 100000005 -> 1.000000E+8 Rounded Inexact
  380. dsbas458 toSci 100000009 -> 1.000000E+8 Rounded Inexact
  381. dsbas460 toSci 1000000000 -> 1.000000E+9 Rounded
  382. dsbas462 toSci 1000000300 -> 1.000000E+9 Rounded Inexact
  383. dsbas464 toSci 1000000500 -> 1.000000E+9 Rounded Inexact
  384. dsbas466 toSci 1000000900 -> 1.000001E+9 Rounded Inexact
  385. dsbas468 toSci 10000000000 -> 1.000000E+10 Rounded
  386. dsbas470 toSci 10000003000 -> 1.000000E+10 Rounded Inexact
  387. dsbas472 toSci 10000005000 -> 1.000000E+10 Rounded Inexact
  388. dsbas474 toSci 10000009000 -> 1.000001E+10 Rounded Inexact
  389. -- check rounding modes heeded
  390. rounding: ceiling
  391. dsbsr401 toSci 1.1123450 -> 1.112345 Rounded
  392. dsbsr402 toSci 1.11234549 -> 1.112346 Rounded Inexact
  393. dsbsr403 toSci 1.11234550 -> 1.112346 Rounded Inexact
  394. dsbsr404 toSci 1.11234551 -> 1.112346 Rounded Inexact
  395. rounding: up
  396. dsbsr405 toSci 1.1123450 -> 1.112345 Rounded
  397. dsbsr406 toSci 1.11234549 -> 1.112346 Rounded Inexact
  398. dsbsr407 toSci 1.11234550 -> 1.112346 Rounded Inexact
  399. dsbsr408 toSci 1.11234551 -> 1.112346 Rounded Inexact
  400. rounding: floor
  401. dsbsr410 toSci 1.1123450 -> 1.112345 Rounded
  402. dsbsr411 toSci 1.11234549 -> 1.112345 Rounded Inexact
  403. dsbsr412 toSci 1.11234550 -> 1.112345 Rounded Inexact
  404. dsbsr413 toSci 1.11234551 -> 1.112345 Rounded Inexact
  405. rounding: half_down
  406. dsbsr415 toSci 1.1123450 -> 1.112345 Rounded
  407. dsbsr416 toSci 1.11234549 -> 1.112345 Rounded Inexact
  408. dsbsr417 toSci 1.11234550 -> 1.112345 Rounded Inexact
  409. dsbsr418 toSci 1.11234650 -> 1.112346 Rounded Inexact
  410. dsbsr419 toSci 1.11234551 -> 1.112346 Rounded Inexact
  411. rounding: half_even
  412. dsbsr421 toSci 1.1123450 -> 1.112345 Rounded
  413. dsbsr422 toSci 1.11234549 -> 1.112345 Rounded Inexact
  414. dsbsr423 toSci 1.11234550 -> 1.112346 Rounded Inexact
  415. dsbsr424 toSci 1.11234650 -> 1.112346 Rounded Inexact
  416. dsbsr425 toSci 1.11234551 -> 1.112346 Rounded Inexact
  417. rounding: down
  418. dsbsr426 toSci 1.1123450 -> 1.112345 Rounded
  419. dsbsr427 toSci 1.11234549 -> 1.112345 Rounded Inexact
  420. dsbsr428 toSci 1.11234550 -> 1.112345 Rounded Inexact
  421. dsbsr429 toSci 1.11234551 -> 1.112345 Rounded Inexact
  422. rounding: half_up
  423. dsbsr431 toSci 1.1123450 -> 1.112345 Rounded
  424. dsbsr432 toSci 1.11234549 -> 1.112345 Rounded Inexact
  425. dsbsr433 toSci 1.11234550 -> 1.112346 Rounded Inexact
  426. dsbsr434 toSci 1.11234650 -> 1.112347 Rounded Inexact
  427. dsbsr435 toSci 1.11234551 -> 1.112346 Rounded Inexact
  428. -- negatives
  429. rounding: ceiling
  430. dsbsr501 toSci -1.1123450 -> -1.112345 Rounded
  431. dsbsr502 toSci -1.11234549 -> -1.112345 Rounded Inexact
  432. dsbsr503 toSci -1.11234550 -> -1.112345 Rounded Inexact
  433. dsbsr504 toSci -1.11234551 -> -1.112345 Rounded Inexact
  434. rounding: up
  435. dsbsr505 toSci -1.1123450 -> -1.112345 Rounded
  436. dsbsr506 toSci -1.11234549 -> -1.112346 Rounded Inexact
  437. dsbsr507 toSci -1.11234550 -> -1.112346 Rounded Inexact
  438. dsbsr508 toSci -1.11234551 -> -1.112346 Rounded Inexact
  439. rounding: floor
  440. dsbsr510 toSci -1.1123450 -> -1.112345 Rounded
  441. dsbsr511 toSci -1.11234549 -> -1.112346 Rounded Inexact
  442. dsbsr512 toSci -1.11234550 -> -1.112346 Rounded Inexact
  443. dsbsr513 toSci -1.11234551 -> -1.112346 Rounded Inexact
  444. rounding: half_down
  445. dsbsr515 toSci -1.1123450 -> -1.112345 Rounded
  446. dsbsr516 toSci -1.11234549 -> -1.112345 Rounded Inexact
  447. dsbsr517 toSci -1.11234550 -> -1.112345 Rounded Inexact
  448. dsbsr518 toSci -1.11234650 -> -1.112346 Rounded Inexact
  449. dsbsr519 toSci -1.11234551 -> -1.112346 Rounded Inexact
  450. rounding: half_even
  451. dsbsr521 toSci -1.1123450 -> -1.112345 Rounded
  452. dsbsr522 toSci -1.11234549 -> -1.112345 Rounded Inexact
  453. dsbsr523 toSci -1.11234550 -> -1.112346 Rounded Inexact
  454. dsbsr524 toSci -1.11234650 -> -1.112346 Rounded Inexact
  455. dsbsr525 toSci -1.11234551 -> -1.112346 Rounded Inexact
  456. rounding: down
  457. dsbsr526 toSci -1.1123450 -> -1.112345 Rounded
  458. dsbsr527 toSci -1.11234549 -> -1.112345 Rounded Inexact
  459. dsbsr528 toSci -1.11234550 -> -1.112345 Rounded Inexact
  460. dsbsr529 toSci -1.11234551 -> -1.112345 Rounded Inexact
  461. rounding: half_up
  462. dsbsr531 toSci -1.1123450 -> -1.112345 Rounded
  463. dsbsr532 toSci -1.11234549 -> -1.112345 Rounded Inexact
  464. dsbsr533 toSci -1.11234550 -> -1.112346 Rounded Inexact
  465. dsbsr534 toSci -1.11234650 -> -1.112347 Rounded Inexact
  466. dsbsr535 toSci -1.11234551 -> -1.112346 Rounded Inexact
  467. rounding: half_even
  468. -- The 'baddies' tests from DiagBigDecimal, plus some new ones
  469. dsbas500 toSci '1..2' -> NaN Conversion_syntax
  470. dsbas501 toSci '.' -> NaN Conversion_syntax
  471. dsbas502 toSci '..' -> NaN Conversion_syntax
  472. dsbas503 toSci '++1' -> NaN Conversion_syntax
  473. dsbas504 toSci '--1' -> NaN Conversion_syntax
  474. dsbas505 toSci '-+1' -> NaN Conversion_syntax
  475. dsbas506 toSci '+-1' -> NaN Conversion_syntax
  476. dsbas507 toSci '12e' -> NaN Conversion_syntax
  477. dsbas508 toSci '12e++' -> NaN Conversion_syntax
  478. dsbas509 toSci '12f4' -> NaN Conversion_syntax
  479. dsbas510 toSci ' +1' -> NaN Conversion_syntax
  480. dsbas511 toSci '+ 1' -> NaN Conversion_syntax
  481. dsbas512 toSci '12 ' -> NaN Conversion_syntax
  482. dsbas513 toSci ' + 1' -> NaN Conversion_syntax
  483. dsbas514 toSci ' - 1 ' -> NaN Conversion_syntax
  484. dsbas515 toSci 'x' -> NaN Conversion_syntax
  485. dsbas516 toSci '-1-' -> NaN Conversion_syntax
  486. dsbas517 toSci '12-' -> NaN Conversion_syntax
  487. dsbas518 toSci '3+' -> NaN Conversion_syntax
  488. dsbas519 toSci '' -> NaN Conversion_syntax
  489. dsbas520 toSci '1e-' -> NaN Conversion_syntax
  490. dsbas521 toSci '7e99999a' -> NaN Conversion_syntax
  491. dsbas522 toSci '7e123567890x' -> NaN Conversion_syntax
  492. dsbas523 toSci '7e12356789012x' -> NaN Conversion_syntax
  493. dsbas524 toSci '' -> NaN Conversion_syntax
  494. dsbas525 toSci 'e100' -> NaN Conversion_syntax
  495. dsbas526 toSci '\u0e5a' -> NaN Conversion_syntax
  496. dsbas527 toSci '\u0b65' -> NaN Conversion_syntax
  497. dsbas528 toSci '123,65' -> NaN Conversion_syntax
  498. dsbas529 toSci '1.34.5' -> NaN Conversion_syntax
  499. dsbas530 toSci '.123.5' -> NaN Conversion_syntax
  500. dsbas531 toSci '01.35.' -> NaN Conversion_syntax
  501. dsbas532 toSci '01.35-' -> NaN Conversion_syntax
  502. dsbas533 toSci '0000..' -> NaN Conversion_syntax
  503. dsbas534 toSci '.0000.' -> NaN Conversion_syntax
  504. dsbas535 toSci '00..00' -> NaN Conversion_syntax
  505. dsbas536 toSci '111e*123' -> NaN Conversion_syntax
  506. dsbas537 toSci '111e123-' -> NaN Conversion_syntax
  507. dsbas538 toSci '111e+12+' -> NaN Conversion_syntax
  508. dsbas539 toSci '111e1-3-' -> NaN Conversion_syntax
  509. dsbas540 toSci '111e1*23' -> NaN Conversion_syntax
  510. dsbas541 toSci '111e1e+3' -> NaN Conversion_syntax
  511. dsbas542 toSci '1e1.0' -> NaN Conversion_syntax
  512. dsbas543 toSci '1e123e' -> NaN Conversion_syntax
  513. dsbas544 toSci 'ten' -> NaN Conversion_syntax
  514. dsbas545 toSci 'ONE' -> NaN Conversion_syntax
  515. dsbas546 toSci '1e.1' -> NaN Conversion_syntax
  516. dsbas547 toSci '1e1.' -> NaN Conversion_syntax
  517. dsbas548 toSci '1ee' -> NaN Conversion_syntax
  518. dsbas549 toSci 'e+1' -> NaN Conversion_syntax
  519. dsbas550 toSci '1.23.4' -> NaN Conversion_syntax
  520. dsbas551 toSci '1.2.1' -> NaN Conversion_syntax
  521. dsbas552 toSci '1E+1.2' -> NaN Conversion_syntax
  522. dsbas553 toSci '1E+1.2.3' -> NaN Conversion_syntax
  523. dsbas554 toSci '1E++1' -> NaN Conversion_syntax
  524. dsbas555 toSci '1E--1' -> NaN Conversion_syntax
  525. dsbas556 toSci '1E+-1' -> NaN Conversion_syntax
  526. dsbas557 toSci '1E-+1' -> NaN Conversion_syntax
  527. dsbas558 toSci '1E''1' -> NaN Conversion_syntax
  528. dsbas559 toSci "1E""1" -> NaN Conversion_syntax
  529. dsbas560 toSci "1E""""" -> NaN Conversion_syntax
  530. -- Near-specials
  531. dsbas561 toSci "qNaN" -> NaN Conversion_syntax
  532. dsbas562 toSci "NaNq" -> NaN Conversion_syntax
  533. dsbas563 toSci "NaNs" -> NaN Conversion_syntax
  534. dsbas564 toSci "Infi" -> NaN Conversion_syntax
  535. dsbas565 toSci "Infin" -> NaN Conversion_syntax
  536. dsbas566 toSci "Infini" -> NaN Conversion_syntax
  537. dsbas567 toSci "Infinit" -> NaN Conversion_syntax
  538. dsbas568 toSci "-Infinit" -> NaN Conversion_syntax
  539. dsbas569 toSci "0Inf" -> NaN Conversion_syntax
  540. dsbas570 toSci "9Inf" -> NaN Conversion_syntax
  541. dsbas571 toSci "-0Inf" -> NaN Conversion_syntax
  542. dsbas572 toSci "-9Inf" -> NaN Conversion_syntax
  543. dsbas573 toSci "-sNa" -> NaN Conversion_syntax
  544. dsbas574 toSci "xNaN" -> NaN Conversion_syntax
  545. dsbas575 toSci "0sNaN" -> NaN Conversion_syntax
  546. -- some baddies with dots and Es and dots and specials
  547. dsbas576 toSci 'e+1' -> NaN Conversion_syntax
  548. dsbas577 toSci '.e+1' -> NaN Conversion_syntax
  549. dsbas578 toSci '+.e+1' -> NaN Conversion_syntax
  550. dsbas579 toSci '-.e+' -> NaN Conversion_syntax
  551. dsbas580 toSci '-.e' -> NaN Conversion_syntax
  552. dsbas581 toSci 'E+1' -> NaN Conversion_syntax
  553. dsbas582 toSci '.E+1' -> NaN Conversion_syntax
  554. dsbas583 toSci '+.E+1' -> NaN Conversion_syntax
  555. dsbas584 toSci '-.E+' -> NaN Conversion_syntax
  556. dsbas585 toSci '-.E' -> NaN Conversion_syntax
  557. dsbas586 toSci '.NaN' -> NaN Conversion_syntax
  558. dsbas587 toSci '-.NaN' -> NaN Conversion_syntax
  559. dsbas588 toSci '+.sNaN' -> NaN Conversion_syntax
  560. dsbas589 toSci '+.Inf' -> NaN Conversion_syntax
  561. dsbas590 toSci '.Infinity' -> NaN Conversion_syntax
  562. -- Zeros
  563. dsbas601 toSci 0.000000000 -> 0E-9
  564. dsbas602 toSci 0.00000000 -> 0E-8
  565. dsbas603 toSci 0.0000000 -> 0E-7
  566. dsbas604 toSci 0.000000 -> 0.000000
  567. dsbas605 toSci 0.00000 -> 0.00000
  568. dsbas606 toSci 0.0000 -> 0.0000
  569. dsbas607 toSci 0.000 -> 0.000
  570. dsbas608 toSci 0.00 -> 0.00
  571. dsbas609 toSci 0.0 -> 0.0
  572. dsbas610 toSci .0 -> 0.0
  573. dsbas611 toSci 0. -> 0
  574. dsbas612 toSci -.0 -> -0.0
  575. dsbas613 toSci -0. -> -0
  576. dsbas614 toSci -0.0 -> -0.0
  577. dsbas615 toSci -0.00 -> -0.00
  578. dsbas616 toSci -0.000 -> -0.000
  579. dsbas617 toSci -0.0000 -> -0.0000
  580. dsbas618 toSci -0.00000 -> -0.00000
  581. dsbas619 toSci -0.000000 -> -0.000000
  582. dsbas620 toSci -0.0000000 -> -0E-7
  583. dsbas621 toSci -0.00000000 -> -0E-8
  584. dsbas622 toSci -0.000000000 -> -0E-9
  585. dsbas630 toSci 0.00E+0 -> 0.00
  586. dsbas631 toSci 0.00E+1 -> 0.0
  587. dsbas632 toSci 0.00E+2 -> 0
  588. dsbas633 toSci 0.00E+3 -> 0E+1
  589. dsbas634 toSci 0.00E+4 -> 0E+2
  590. dsbas635 toSci 0.00E+5 -> 0E+3
  591. dsbas636 toSci 0.00E+6 -> 0E+4
  592. dsbas637 toSci 0.00E+7 -> 0E+5
  593. dsbas638 toSci 0.00E+8 -> 0E+6
  594. dsbas639 toSci 0.00E+9 -> 0E+7
  595. dsbas640 toSci 0.0E+0 -> 0.0
  596. dsbas641 toSci 0.0E+1 -> 0
  597. dsbas642 toSci 0.0E+2 -> 0E+1
  598. dsbas643 toSci 0.0E+3 -> 0E+2
  599. dsbas644 toSci 0.0E+4 -> 0E+3
  600. dsbas645 toSci 0.0E+5 -> 0E+4
  601. dsbas646 toSci 0.0E+6 -> 0E+5
  602. dsbas647 toSci 0.0E+7 -> 0E+6
  603. dsbas648 toSci 0.0E+8 -> 0E+7
  604. dsbas649 toSci 0.0E+9 -> 0E+8
  605. dsbas650 toSci 0E+0 -> 0
  606. dsbas651 toSci 0E+1 -> 0E+1
  607. dsbas652 toSci 0E+2 -> 0E+2
  608. dsbas653 toSci 0E+3 -> 0E+3
  609. dsbas654 toSci 0E+4 -> 0E+4
  610. dsbas655 toSci 0E+5 -> 0E+5
  611. dsbas656 toSci 0E+6 -> 0E+6
  612. dsbas657 toSci 0E+7 -> 0E+7
  613. dsbas658 toSci 0E+8 -> 0E+8
  614. dsbas659 toSci 0E+9 -> 0E+9
  615. dsbas660 toSci 0.0E-0 -> 0.0
  616. dsbas661 toSci 0.0E-1 -> 0.00
  617. dsbas662 toSci 0.0E-2 -> 0.000
  618. dsbas663 toSci 0.0E-3 -> 0.0000
  619. dsbas664 toSci 0.0E-4 -> 0.00000
  620. dsbas665 toSci 0.0E-5 -> 0.000000
  621. dsbas666 toSci 0.0E-6 -> 0E-7
  622. dsbas667 toSci 0.0E-7 -> 0E-8
  623. dsbas668 toSci 0.0E-8 -> 0E-9
  624. dsbas669 toSci 0.0E-9 -> 0E-10
  625. dsbas670 toSci 0.00E-0 -> 0.00
  626. dsbas671 toSci 0.00E-1 -> 0.000
  627. dsbas672 toSci 0.00E-2 -> 0.0000
  628. dsbas673 toSci 0.00E-3 -> 0.00000
  629. dsbas674 toSci 0.00E-4 -> 0.000000
  630. dsbas675 toSci 0.00E-5 -> 0E-7
  631. dsbas676 toSci 0.00E-6 -> 0E-8
  632. dsbas677 toSci 0.00E-7 -> 0E-9
  633. dsbas678 toSci 0.00E-8 -> 0E-10
  634. dsbas679 toSci 0.00E-9 -> 0E-11
  635. dsbas680 toSci 000000. -> 0
  636. dsbas681 toSci 00000. -> 0
  637. dsbas682 toSci 0000. -> 0
  638. dsbas683 toSci 000. -> 0
  639. dsbas684 toSci 00. -> 0
  640. dsbas685 toSci 0. -> 0
  641. dsbas686 toSci +00000. -> 0
  642. dsbas687 toSci -00000. -> -0
  643. dsbas688 toSci +0. -> 0
  644. dsbas689 toSci -0. -> -0
  645. -- Specials
  646. dsbas700 toSci "NaN" -> NaN
  647. dsbas701 toSci "nan" -> NaN
  648. dsbas702 toSci "nAn" -> NaN
  649. dsbas703 toSci "NAN" -> NaN
  650. dsbas704 toSci "+NaN" -> NaN
  651. dsbas705 toSci "+nan" -> NaN
  652. dsbas706 toSci "+nAn" -> NaN
  653. dsbas707 toSci "+NAN" -> NaN
  654. dsbas708 toSci "-NaN" -> -NaN
  655. dsbas709 toSci "-nan" -> -NaN
  656. dsbas710 toSci "-nAn" -> -NaN
  657. dsbas711 toSci "-NAN" -> -NaN
  658. dsbas712 toSci 'NaN0' -> NaN
  659. dsbas713 toSci 'NaN1' -> NaN1
  660. dsbas714 toSci 'NaN12' -> NaN12
  661. dsbas715 toSci 'NaN123' -> NaN123
  662. dsbas716 toSci 'NaN1234' -> NaN1234
  663. dsbas717 toSci 'NaN01' -> NaN1
  664. dsbas718 toSci 'NaN012' -> NaN12
  665. dsbas719 toSci 'NaN0123' -> NaN123
  666. dsbas720 toSci 'NaN01234' -> NaN1234
  667. dsbas721 toSci 'NaN001' -> NaN1
  668. dsbas722 toSci 'NaN0012' -> NaN12
  669. dsbas723 toSci 'NaN00123' -> NaN123
  670. dsbas724 toSci 'NaN001234' -> NaN1234
  671. dsbas725 toSci 'NaN1234567890123456' -> NaN Conversion_syntax
  672. dsbas726 toSci 'NaN123e+1' -> NaN Conversion_syntax
  673. dsbas727 toSci 'NaN12.45' -> NaN Conversion_syntax
  674. dsbas728 toSci 'NaN-12' -> NaN Conversion_syntax
  675. dsbas729 toSci 'NaN+12' -> NaN Conversion_syntax
  676. dsbas730 toSci "sNaN" -> sNaN
  677. dsbas731 toSci "snan" -> sNaN
  678. dsbas732 toSci "SnAn" -> sNaN
  679. dsbas733 toSci "SNAN" -> sNaN
  680. dsbas734 toSci "+sNaN" -> sNaN
  681. dsbas735 toSci "+snan" -> sNaN
  682. dsbas736 toSci "+SnAn" -> sNaN
  683. dsbas737 toSci "+SNAN" -> sNaN
  684. dsbas738 toSci "-sNaN" -> -sNaN
  685. dsbas739 toSci "-snan" -> -sNaN
  686. dsbas740 toSci "-SnAn" -> -sNaN
  687. dsbas741 toSci "-SNAN" -> -sNaN
  688. dsbas742 toSci 'sNaN0000' -> sNaN
  689. dsbas743 toSci 'sNaN7' -> sNaN7
  690. dsbas744 toSci 'sNaN007234' -> sNaN7234
  691. dsbas745 toSci 'sNaN7234561234567890' -> NaN Conversion_syntax
  692. dsbas746 toSci 'sNaN72.45' -> NaN Conversion_syntax
  693. dsbas747 toSci 'sNaN-72' -> NaN Conversion_syntax
  694. dsbas748 toSci "Inf" -> Infinity
  695. dsbas749 toSci "inf" -> Infinity
  696. dsbas750 toSci "iNf" -> Infinity
  697. dsbas751 toSci "INF" -> Infinity
  698. dsbas752 toSci "+Inf" -> Infinity
  699. dsbas753 toSci "+inf" -> Infinity
  700. dsbas754 toSci "+iNf" -> Infinity
  701. dsbas755 toSci "+INF" -> Infinity
  702. dsbas756 toSci "-Inf" -> -Infinity
  703. dsbas757 toSci "-inf" -> -Infinity
  704. dsbas758 toSci "-iNf" -> -Infinity
  705. dsbas759 toSci "-INF" -> -Infinity
  706. dsbas760 toSci "Infinity" -> Infinity
  707. dsbas761 toSci "infinity" -> Infinity
  708. dsbas762 toSci "iNfInItY" -> Infinity
  709. dsbas763 toSci "INFINITY" -> Infinity
  710. dsbas764 toSci "+Infinity" -> Infinity
  711. dsbas765 toSci "+infinity" -> Infinity
  712. dsbas766 toSci "+iNfInItY" -> Infinity
  713. dsbas767 toSci "+INFINITY" -> Infinity
  714. dsbas768 toSci "-Infinity" -> -Infinity
  715. dsbas769 toSci "-infinity" -> -Infinity
  716. dsbas770 toSci "-iNfInItY" -> -Infinity
  717. dsbas771 toSci "-INFINITY" -> -Infinity
  718. -- Specials and zeros for toEng
  719. dsbast772 toEng "NaN" -> NaN
  720. dsbast773 toEng "-Infinity" -> -Infinity
  721. dsbast774 toEng "-sNaN" -> -sNaN
  722. dsbast775 toEng "-NaN" -> -NaN
  723. dsbast776 toEng "+Infinity" -> Infinity
  724. dsbast778 toEng "+sNaN" -> sNaN
  725. dsbast779 toEng "+NaN" -> NaN
  726. dsbast780 toEng "INFINITY" -> Infinity
  727. dsbast781 toEng "SNAN" -> sNaN
  728. dsbast782 toEng "NAN" -> NaN
  729. dsbast783 toEng "infinity" -> Infinity
  730. dsbast784 toEng "snan" -> sNaN
  731. dsbast785 toEng "nan" -> NaN
  732. dsbast786 toEng "InFINITY" -> Infinity
  733. dsbast787 toEng "SnAN" -> sNaN
  734. dsbast788 toEng "nAN" -> NaN
  735. dsbast789 toEng "iNfinity" -> Infinity
  736. dsbast790 toEng "sNan" -> sNaN
  737. dsbast791 toEng "Nan" -> NaN
  738. dsbast792 toEng "Infinity" -> Infinity
  739. dsbast793 toEng "sNaN" -> sNaN
  740. -- Zero toEng, etc.
  741. dsbast800 toEng 0e+1 -> "0.00E+3" -- doc example
  742. dsbast801 toEng 0.000000000 -> 0E-9
  743. dsbast802 toEng 0.00000000 -> 0.00E-6
  744. dsbast803 toEng 0.0000000 -> 0.0E-6
  745. dsbast804 toEng 0.000000 -> 0.000000
  746. dsbast805 toEng 0.00000 -> 0.00000
  747. dsbast806 toEng 0.0000 -> 0.0000
  748. dsbast807 toEng 0.000 -> 0.000
  749. dsbast808 toEng 0.00 -> 0.00
  750. dsbast809 toEng 0.0 -> 0.0
  751. dsbast810 toEng .0 -> 0.0
  752. dsbast811 toEng 0. -> 0
  753. dsbast812 toEng -.0 -> -0.0
  754. dsbast813 toEng -0. -> -0
  755. dsbast814 toEng -0.0 -> -0.0
  756. dsbast815 toEng -0.00 -> -0.00
  757. dsbast816 toEng -0.000 -> -0.000
  758. dsbast817 toEng -0.0000 -> -0.0000
  759. dsbast818 toEng -0.00000 -> -0.00000
  760. dsbast819 toEng -0.000000 -> -0.000000
  761. dsbast820 toEng -0.0000000 -> -0.0E-6
  762. dsbast821 toEng -0.00000000 -> -0.00E-6
  763. dsbast822 toEng -0.000000000 -> -0E-9
  764. dsbast830 toEng 0.00E+0 -> 0.00
  765. dsbast831 toEng 0.00E+1 -> 0.0
  766. dsbast832 toEng 0.00E+2 -> 0
  767. dsbast833 toEng 0.00E+3 -> 0.00E+3
  768. dsbast834 toEng 0.00E+4 -> 0.0E+3
  769. dsbast835 toEng 0.00E+5 -> 0E+3
  770. dsbast836 toEng 0.00E+6 -> 0.00E+6
  771. dsbast837 toEng 0.00E+7 -> 0.0E+6
  772. dsbast838 toEng 0.00E+8 -> 0E+6
  773. dsbast839 toEng 0.00E+9 -> 0.00E+9
  774. dsbast840 toEng 0.0E+0 -> 0.0
  775. dsbast841 toEng 0.0E+1 -> 0
  776. dsbast842 toEng 0.0E+2 -> 0.00E+3
  777. dsbast843 toEng 0.0E+3 -> 0.0E+3
  778. dsbast844 toEng 0.0E+4 -> 0E+3
  779. dsbast845 toEng 0.0E+5 -> 0.00E+6
  780. dsbast846 toEng 0.0E+6 -> 0.0E+6
  781. dsbast847 toEng 0.0E+7 -> 0E+6
  782. dsbast848 toEng 0.0E+8 -> 0.00E+9
  783. dsbast849 toEng 0.0E+9 -> 0.0E+9
  784. dsbast850 toEng 0E+0 -> 0
  785. dsbast851 toEng 0E+1 -> 0.00E+3
  786. dsbast852 toEng 0E+2 -> 0.0E+3
  787. dsbast853 toEng 0E+3 -> 0E+3
  788. dsbast854 toEng 0E+4 -> 0.00E+6
  789. dsbast855 toEng 0E+5 -> 0.0E+6
  790. dsbast856 toEng 0E+6 -> 0E+6
  791. dsbast857 toEng 0E+7 -> 0.00E+9
  792. dsbast858 toEng 0E+8 -> 0.0E+9
  793. dsbast859 toEng 0E+9 -> 0E+9
  794. dsbast860 toEng 0.0E-0 -> 0.0
  795. dsbast861 toEng 0.0E-1 -> 0.00
  796. dsbast862 toEng 0.0E-2 -> 0.000
  797. dsbast863 toEng 0.0E-3 -> 0.0000
  798. dsbast864 toEng 0.0E-4 -> 0.00000
  799. dsbast865 toEng 0.0E-5 -> 0.000000
  800. dsbast866 toEng 0.0E-6 -> 0.0E-6
  801. dsbast867 toEng 0.0E-7 -> 0.00E-6
  802. dsbast868 toEng 0.0E-8 -> 0E-9
  803. dsbast869 toEng 0.0E-9 -> 0.0E-9
  804. dsbast870 toEng 0.00E-0 -> 0.00
  805. dsbast871 toEng 0.00E-1 -> 0.000
  806. dsbast872 toEng 0.00E-2 -> 0.0000
  807. dsbast873 toEng 0.00E-3 -> 0.00000
  808. dsbast874 toEng 0.00E-4 -> 0.000000
  809. dsbast875 toEng 0.00E-5 -> 0.0E-6
  810. dsbast876 toEng 0.00E-6 -> 0.00E-6
  811. dsbast877 toEng 0.00E-7 -> 0E-9
  812. dsbast878 toEng 0.00E-8 -> 0.0E-9
  813. dsbast879 toEng 0.00E-9 -> 0.00E-9
  814. -- long input strings
  815. dsbas801 tosci '01234567' -> 1234567
  816. dsbas802 tosci '001234567' -> 1234567
  817. dsbas803 tosci '0001234567' -> 1234567
  818. dsbas804 tosci '00001234567' -> 1234567
  819. dsbas805 tosci '000001234567' -> 1234567
  820. dsbas806 tosci '0000001234567' -> 1234567
  821. dsbas807 tosci '00000001234567' -> 1234567
  822. dsbas808 tosci '000000001234567' -> 1234567
  823. dsbas809 tosci '0000000001234567' -> 1234567
  824. dsbas810 tosci '00000000001234567' -> 1234567
  825. dsbas811 tosci '0.1234567' -> 0.1234567
  826. dsbas812 tosci '0.01234567' -> 0.01234567
  827. dsbas813 tosci '0.001234567' -> 0.001234567
  828. dsbas814 tosci '0.0001234567' -> 0.0001234567
  829. dsbas815 tosci '0.00001234567' -> 0.00001234567
  830. dsbas816 tosci '0.000001234567' -> 0.000001234567
  831. dsbas817 tosci '0.0000001234567' -> 1.234567E-7
  832. dsbas818 tosci '0.00000001234567' -> 1.234567E-8
  833. dsbas819 tosci '0.000000001234567' -> 1.234567E-9
  834. dsbas820 tosci '0.0000000001234567' -> 1.234567E-10
  835. dsbas821 tosci '123456790' -> 1.234568E+8 Inexact Rounded
  836. dsbas822 tosci '1234567901' -> 1.234568E+9 Inexact Rounded
  837. dsbas823 tosci '12345679012' -> 1.234568E+10 Inexact Rounded
  838. dsbas824 tosci '123456790123' -> 1.234568E+11 Inexact Rounded
  839. dsbas825 tosci '1234567901234' -> 1.234568E+12 Inexact Rounded
  840. dsbas826 tosci '12345679012345' -> 1.234568E+13 Inexact Rounded
  841. dsbas827 tosci '123456790123456' -> 1.234568E+14 Inexact Rounded
  842. dsbas828 tosci '1234567901234567' -> 1.234568E+15 Inexact Rounded
  843. dsbas829 tosci '1234567890123456' -> 1.234568E+15 Inexact Rounded
  844. -- subnormals and overflows
  845. dsbas906 toSci '99e999999999' -> Infinity Overflow Inexact Rounded
  846. dsbas907 toSci '999e999999999' -> Infinity Overflow Inexact Rounded
  847. dsbas908 toSci '0.9e-999999999' -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  848. dsbas909 toSci '0.09e-999999999' -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  849. dsbas910 toSci '0.1e1000000000' -> Infinity Overflow Inexact Rounded
  850. dsbas911 toSci '10e-1000000000' -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  851. dsbas912 toSci '0.9e9999999999' -> Infinity Overflow Inexact Rounded
  852. dsbas913 toSci '99e-9999999999' -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  853. dsbas914 toSci '111e9999999999' -> Infinity Overflow Inexact Rounded
  854. dsbas915 toSci '1111e-9999999999' -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  855. dsbas916 toSci '1111e-99999999999' -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  856. dsbas917 toSci '7e1000000000' -> Infinity Overflow Inexact Rounded
  857. -- negatives the same
  858. dsbas918 toSci '-99e999999999' -> -Infinity Overflow Inexact Rounded
  859. dsbas919 toSci '-999e999999999' -> -Infinity Overflow Inexact Rounded
  860. dsbas920 toSci '-0.9e-999999999' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
  861. dsbas921 toSci '-0.09e-999999999' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
  862. dsbas922 toSci '-0.1e1000000000' -> -Infinity Overflow Inexact Rounded
  863. dsbas923 toSci '-10e-1000000000' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
  864. dsbas924 toSci '-0.9e9999999999' -> -Infinity Overflow Inexact Rounded
  865. dsbas925 toSci '-99e-9999999999' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
  866. dsbas926 toSci '-111e9999999999' -> -Infinity Overflow Inexact Rounded
  867. dsbas927 toSci '-1111e-9999999999' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
  868. dsbas928 toSci '-1111e-99999999999' -> -0E-101 Underflow Subnormal Inexact Rounded Clamped
  869. dsbas929 toSci '-7e1000000000' -> -Infinity Overflow Inexact Rounded
  870. -- overflow results at different rounding modes
  871. rounding: ceiling
  872. dsbas930 toSci '7e10000' -> Infinity Overflow Inexact Rounded
  873. dsbas931 toSci '-7e10000' -> -9.999999E+96 Overflow Inexact Rounded
  874. rounding: up
  875. dsbas932 toSci '7e10000' -> Infinity Overflow Inexact Rounded
  876. dsbas933 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded
  877. rounding: down
  878. dsbas934 toSci '7e10000' -> 9.999999E+96 Overflow Inexact Rounded
  879. dsbas935 toSci '-7e10000' -> -9.999999E+96 Overflow Inexact Rounded
  880. rounding: floor
  881. dsbas936 toSci '7e10000' -> 9.999999E+96 Overflow Inexact Rounded
  882. dsbas937 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded
  883. rounding: half_up
  884. dsbas938 toSci '7e10000' -> Infinity Overflow Inexact Rounded
  885. dsbas939 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded
  886. rounding: half_even
  887. dsbas940 toSci '7e10000' -> Infinity Overflow Inexact Rounded
  888. dsbas941 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded
  889. rounding: half_down
  890. dsbas942 toSci '7e10000' -> Infinity Overflow Inexact Rounded
  891. dsbas943 toSci '-7e10000' -> -Infinity Overflow Inexact Rounded
  892. rounding: half_even
  893. -- Now check 854/754r some subnormals and underflow to 0
  894. dsbem400 toSci 1.0000E-86 -> 1.0000E-86
  895. dsbem401 toSci 0.1E-97 -> 1E-98 Subnormal
  896. dsbem402 toSci 0.1000E-97 -> 1.000E-98 Subnormal
  897. dsbem403 toSci 0.0100E-97 -> 1.00E-99 Subnormal
  898. dsbem404 toSci 0.0010E-97 -> 1.0E-100 Subnormal
  899. dsbem405 toSci 0.0001E-97 -> 1E-101 Subnormal
  900. dsbem406 toSci 0.00010E-97 -> 1E-101 Subnormal Rounded
  901. dsbem407 toSci 0.00013E-97 -> 1E-101 Underflow Subnormal Inexact Rounded
  902. dsbem408 toSci 0.00015E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  903. dsbem409 toSci 0.00017E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  904. dsbem410 toSci 0.00023E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  905. dsbem411 toSci 0.00025E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  906. dsbem412 toSci 0.00027E-97 -> 3E-101 Underflow Subnormal Inexact Rounded
  907. dsbem413 toSci 0.000149E-97 -> 1E-101 Underflow Subnormal Inexact Rounded
  908. dsbem414 toSci 0.000150E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  909. dsbem415 toSci 0.000151E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  910. dsbem416 toSci 0.000249E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  911. dsbem417 toSci 0.000250E-97 -> 2E-101 Underflow Subnormal Inexact Rounded
  912. dsbem418 toSci 0.000251E-97 -> 3E-101 Underflow Subnormal Inexact Rounded
  913. dsbem419 toSci 0.00009E-97 -> 1E-101 Underflow Subnormal Inexact Rounded
  914. dsbem420 toSci 0.00005E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  915. dsbem421 toSci 0.00003E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  916. dsbem422 toSci 0.000009E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  917. dsbem423 toSci 0.000005E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  918. dsbem424 toSci 0.000003E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  919. dsbem425 toSci 0.001049E-97 -> 1.0E-100 Underflow Subnormal Inexact Rounded
  920. dsbem426 toSci 0.001050E-97 -> 1.0E-100 Underflow Subnormal Inexact Rounded
  921. dsbem427 toSci 0.001051E-97 -> 1.1E-100 Underflow Subnormal Inexact Rounded
  922. dsbem428 toSci 0.001149E-97 -> 1.1E-100 Underflow Subnormal Inexact Rounded
  923. dsbem429 toSci 0.001150E-97 -> 1.2E-100 Underflow Subnormal Inexact Rounded
  924. dsbem430 toSci 0.001151E-97 -> 1.2E-100 Underflow Subnormal Inexact Rounded
  925. dsbem432 toSci 0.010049E-97 -> 1.00E-99 Underflow Subnormal Inexact Rounded
  926. dsbem433 toSci 0.010050E-97 -> 1.00E-99 Underflow Subnormal Inexact Rounded
  927. dsbem434 toSci 0.010051E-97 -> 1.01E-99 Underflow Subnormal Inexact Rounded
  928. dsbem435 toSci 0.010149E-97 -> 1.01E-99 Underflow Subnormal Inexact Rounded
  929. dsbem436 toSci 0.010150E-97 -> 1.02E-99 Underflow Subnormal Inexact Rounded
  930. dsbem437 toSci 0.010151E-97 -> 1.02E-99 Underflow Subnormal Inexact Rounded
  931. dsbem440 toSci 0.10103E-97 -> 1.010E-98 Underflow Subnormal Inexact Rounded
  932. dsbem441 toSci 0.10105E-97 -> 1.010E-98 Underflow Subnormal Inexact Rounded
  933. dsbem442 toSci 0.10107E-97 -> 1.011E-98 Underflow Subnormal Inexact Rounded
  934. dsbem443 toSci 0.10113E-97 -> 1.011E-98 Underflow Subnormal Inexact Rounded
  935. dsbem444 toSci 0.10115E-97 -> 1.012E-98 Underflow Subnormal Inexact Rounded
  936. dsbem445 toSci 0.10117E-97 -> 1.012E-98 Underflow Subnormal Inexact Rounded
  937. dsbem450 toSci 1.10730E-98 -> 1.107E-98 Underflow Subnormal Inexact Rounded
  938. dsbem451 toSci 1.10750E-98 -> 1.108E-98 Underflow Subnormal Inexact Rounded
  939. dsbem452 toSci 1.10770E-98 -> 1.108E-98 Underflow Subnormal Inexact Rounded
  940. dsbem453 toSci 1.10830E-98 -> 1.108E-98 Underflow Subnormal Inexact Rounded
  941. dsbem454 toSci 1.10850E-98 -> 1.108E-98 Underflow Subnormal Inexact Rounded
  942. dsbem455 toSci 1.10870E-98 -> 1.109E-98 Underflow Subnormal Inexact Rounded
  943. -- make sure sign OK
  944. dsbem456 toSci -0.10103E-97 -> -1.010E-98 Underflow Subnormal Inexact Rounded
  945. dsbem457 toSci -0.10105E-97 -> -1.010E-98 Underflow Subnormal Inexact Rounded
  946. dsbem458 toSci -0.10107E-97 -> -1.011E-98 Underflow Subnormal Inexact Rounded
  947. dsbem459 toSci -0.10113E-97 -> -1.011E-98 Underflow Subnormal Inexact Rounded
  948. dsbem460 toSci -0.10115E-97 -> -1.012E-98 Underflow Subnormal Inexact Rounded
  949. dsbem461 toSci -0.10117E-97 -> -1.012E-98 Underflow Subnormal Inexact Rounded
  950. -- '999s' cases
  951. dsbem464 toSci 999999E-98 -> 9.99999E-93
  952. dsbem465 toSci 99999.0E-97 -> 9.99990E-93
  953. dsbem466 toSci 99999.E-97 -> 9.9999E-93
  954. dsbem467 toSci 9999.9E-97 -> 9.9999E-94
  955. dsbem468 toSci 999.99E-97 -> 9.9999E-95
  956. dsbem469 toSci 99.999E-97 -> 9.9999E-96 Subnormal
  957. dsbem470 toSci 9.9999E-97 -> 9.9999E-97 Subnormal
  958. dsbem471 toSci 0.99999E-97 -> 1.0000E-97 Underflow Subnormal Inexact Rounded
  959. dsbem472 toSci 0.099999E-97 -> 1.000E-98 Underflow Subnormal Inexact Rounded
  960. dsbem473 toSci 0.0099999E-97 -> 1.00E-99 Underflow Subnormal Inexact Rounded
  961. dsbem474 toSci 0.00099999E-97 -> 1.0E-100 Underflow Subnormal Inexact Rounded
  962. dsbem475 toSci 0.000099999E-97 -> 1E-101 Underflow Subnormal Inexact Rounded
  963. dsbem476 toSci 0.0000099999E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  964. dsbem477 toSci 0.00000099999E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  965. dsbem478 toSci 0.000000099999E-97 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  966. -- Exponents with insignificant leading zeros
  967. dsbas1001 toSci 1e999999999 -> Infinity Overflow Inexact Rounded
  968. dsbas1002 toSci 1e0999999999 -> Infinity Overflow Inexact Rounded
  969. dsbas1003 toSci 1e00999999999 -> Infinity Overflow Inexact Rounded
  970. dsbas1004 toSci 1e000999999999 -> Infinity Overflow Inexact Rounded
  971. dsbas1005 toSci 1e000000000000999999999 -> Infinity Overflow Inexact Rounded
  972. dsbas1006 toSci 1e000000000001000000007 -> Infinity Overflow Inexact Rounded
  973. dsbas1007 toSci 1e-999999999 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  974. dsbas1008 toSci 1e-0999999999 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  975. dsbas1009 toSci 1e-00999999999 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  976. dsbas1010 toSci 1e-000999999999 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  977. dsbas1011 toSci 1e-000000000000999999999 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  978. dsbas1012 toSci 1e-000000000001000000007 -> 0E-101 Underflow Subnormal Inexact Rounded Clamped
  979. -- check for double-rounded subnormals
  980. dsbas1041 toSci 1.1152444E-96 -> 1.11524E-96 Inexact Rounded Subnormal Underflow
  981. dsbas1042 toSci 1.1152445E-96 -> 1.11524E-96 Inexact Rounded Subnormal Underflow
  982. dsbas1043 toSci 1.1152446E-96 -> 1.11524E-96 Inexact Rounded Subnormal Underflow
  983. -- clamped zeros [see also clamp.decTest]
  984. dsbas1075 toSci 0e+10000 -> 0E+90 Clamped
  985. dsbas1076 toSci 0e-10000 -> 0E-101 Clamped
  986. dsbas1077 toSci -0e+10000 -> -0E+90 Clamped
  987. dsbas1078 toSci -0e-10000 -> -0E-101 Clamped
  988. -- extreme values from next-wider
  989. dsbas1101 toSci -9.999999999999999E+384 -> -Infinity Overflow Inexact Rounded
  990. dsbas1102 toSci -1E-383 -> -0E-101 Inexact Rounded Subnormal Underflow Clamped
  991. dsbas1103 toSci -1E-398 -> -0E-101 Inexact Rounded Subnormal Underflow Clamped
  992. dsbas1104 toSci -0 -> -0
  993. dsbas1105 toSci +0 -> 0
  994. dsbas1106 toSci +1E-398 -> 0E-101 Inexact Rounded Subnormal Underflow Clamped
  995. dsbas1107 toSci +1E-383 -> 0E-101 Inexact Rounded Subnormal Underflow Clamped
  996. dsbas1108 toSci +9.999999999999999E+384 -> Infinity Overflow Inexact Rounded
  997. -- narrowing case
  998. dsbas1110 toSci 2.000000000000000E-99 -> 2.00E-99 Rounded Subnormal