class.decTest 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ------------------------------------------------------------------------
  2. -- class.decTest -- Class operations --
  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. -- [New 2006.11.27]
  22. precision: 9
  23. maxExponent: 999
  24. minExponent: -999
  25. extended: 1
  26. clamp: 1
  27. rounding: half_even
  28. clasx001 class 0 -> +Zero
  29. clasx002 class 0.00 -> +Zero
  30. clasx003 class 0E+5 -> +Zero
  31. clasx004 class 1E-1007 -> +Subnormal
  32. clasx005 class 0.1E-999 -> +Subnormal
  33. clasx006 class 0.99999999E-999 -> +Subnormal
  34. clasx007 class 1.00000000E-999 -> +Normal
  35. clasx008 class 1E-999 -> +Normal
  36. clasx009 class 1E-100 -> +Normal
  37. clasx010 class 1E-10 -> +Normal
  38. clasx012 class 1E-1 -> +Normal
  39. clasx013 class 1 -> +Normal
  40. clasx014 class 2.50 -> +Normal
  41. clasx015 class 100.100 -> +Normal
  42. clasx016 class 1E+30 -> +Normal
  43. clasx017 class 1E+999 -> +Normal
  44. clasx018 class 9.99999999E+999 -> +Normal
  45. clasx019 class Inf -> +Infinity
  46. clasx021 class -0 -> -Zero
  47. clasx022 class -0.00 -> -Zero
  48. clasx023 class -0E+5 -> -Zero
  49. clasx024 class -1E-1007 -> -Subnormal
  50. clasx025 class -0.1E-999 -> -Subnormal
  51. clasx026 class -0.99999999E-999 -> -Subnormal
  52. clasx027 class -1.00000000E-999 -> -Normal
  53. clasx028 class -1E-999 -> -Normal
  54. clasx029 class -1E-100 -> -Normal
  55. clasx030 class -1E-10 -> -Normal
  56. clasx032 class -1E-1 -> -Normal
  57. clasx033 class -1 -> -Normal
  58. clasx034 class -2.50 -> -Normal
  59. clasx035 class -100.100 -> -Normal
  60. clasx036 class -1E+30 -> -Normal
  61. clasx037 class -1E+999 -> -Normal
  62. clasx038 class -9.99999999E+999 -> -Normal
  63. clasx039 class -Inf -> -Infinity
  64. clasx041 class NaN -> NaN
  65. clasx042 class -NaN -> NaN
  66. clasx043 class +NaN12345 -> NaN
  67. clasx044 class sNaN -> sNaN
  68. clasx045 class -sNaN -> sNaN
  69. clasx046 class +sNaN12345 -> sNaN
  70. -- decimal64 bounds
  71. precision: 16
  72. maxExponent: 384
  73. minExponent: -383
  74. clamp: 1
  75. rounding: half_even
  76. clasx201 class 0 -> +Zero
  77. clasx202 class 0.00 -> +Zero
  78. clasx203 class 0E+5 -> +Zero
  79. clasx204 class 1E-396 -> +Subnormal
  80. clasx205 class 0.1E-383 -> +Subnormal
  81. clasx206 class 0.999999999999999E-383 -> +Subnormal
  82. clasx207 class 1.000000000000000E-383 -> +Normal
  83. clasx208 class 1E-383 -> +Normal
  84. clasx209 class 1E-100 -> +Normal
  85. clasx210 class 1E-10 -> +Normal
  86. clasx212 class 1E-1 -> +Normal
  87. clasx213 class 1 -> +Normal
  88. clasx214 class 2.50 -> +Normal
  89. clasx215 class 100.100 -> +Normal
  90. clasx216 class 1E+30 -> +Normal
  91. clasx217 class 1E+384 -> +Normal
  92. clasx218 class 9.999999999999999E+384 -> +Normal
  93. clasx219 class Inf -> +Infinity
  94. clasx221 class -0 -> -Zero
  95. clasx222 class -0.00 -> -Zero
  96. clasx223 class -0E+5 -> -Zero
  97. clasx224 class -1E-396 -> -Subnormal
  98. clasx225 class -0.1E-383 -> -Subnormal
  99. clasx226 class -0.999999999999999E-383 -> -Subnormal
  100. clasx227 class -1.000000000000000E-383 -> -Normal
  101. clasx228 class -1E-383 -> -Normal
  102. clasx229 class -1E-100 -> -Normal
  103. clasx230 class -1E-10 -> -Normal
  104. clasx232 class -1E-1 -> -Normal
  105. clasx233 class -1 -> -Normal
  106. clasx234 class -2.50 -> -Normal
  107. clasx235 class -100.100 -> -Normal
  108. clasx236 class -1E+30 -> -Normal
  109. clasx237 class -1E+384 -> -Normal
  110. clasx238 class -9.999999999999999E+384 -> -Normal
  111. clasx239 class -Inf -> -Infinity
  112. clasx241 class NaN -> NaN
  113. clasx242 class -NaN -> NaN
  114. clasx243 class +NaN12345 -> NaN
  115. clasx244 class sNaN -> sNaN
  116. clasx245 class -sNaN -> sNaN
  117. clasx246 class +sNaN12345 -> sNaN