dqNextPlus.decTest 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ------------------------------------------------------------------------
  2. -- dqNextPlus.decTest -- decQuad next that is greater [754r nextup] --
  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. -- All operands and results are decQuads.
  22. extended: 1
  23. clamp: 1
  24. precision: 34
  25. maxExponent: 6144
  26. minExponent: -6143
  27. rounding: half_even
  28. dqnextp001 nextplus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999996
  29. dqnextp002 nextplus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999997
  30. dqnextp003 nextplus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999998
  31. dqnextp004 nextplus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999999
  32. dqnextp005 nextplus 0.9999999999999999999999999999999999 -> 1.000000000000000000000000000000000
  33. dqnextp006 nextplus 1.000000000000000000000000000000000 -> 1.000000000000000000000000000000001
  34. dqnextp007 nextplus 1.0 -> 1.000000000000000000000000000000001
  35. dqnextp008 nextplus 1 -> 1.000000000000000000000000000000001
  36. dqnextp009 nextplus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000002
  37. dqnextp010 nextplus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000003
  38. dqnextp011 nextplus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000004
  39. dqnextp012 nextplus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000005
  40. dqnextp013 nextplus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000006
  41. dqnextp014 nextplus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000007
  42. dqnextp015 nextplus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000008
  43. dqnextp016 nextplus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000009
  44. dqnextp017 nextplus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000010
  45. dqnextp018 nextplus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000011
  46. dqnextp019 nextplus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000012
  47. dqnextp021 nextplus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999994
  48. dqnextp022 nextplus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999995
  49. dqnextp023 nextplus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999996
  50. dqnextp024 nextplus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999997
  51. dqnextp025 nextplus -0.9999999999999999999999999999999999 -> -0.9999999999999999999999999999999998
  52. dqnextp026 nextplus -1.000000000000000000000000000000000 -> -0.9999999999999999999999999999999999
  53. dqnextp027 nextplus -1.0 -> -0.9999999999999999999999999999999999
  54. dqnextp028 nextplus -1 -> -0.9999999999999999999999999999999999
  55. dqnextp029 nextplus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000000
  56. dqnextp030 nextplus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000001
  57. dqnextp031 nextplus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000002
  58. dqnextp032 nextplus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000003
  59. dqnextp033 nextplus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000004
  60. dqnextp034 nextplus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000005
  61. dqnextp035 nextplus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000006
  62. dqnextp036 nextplus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000007
  63. dqnextp037 nextplus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000008
  64. dqnextp038 nextplus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000009
  65. dqnextp039 nextplus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000010
  66. dqnextp040 nextplus -1.000000000000000000000000000000012 -> -1.000000000000000000000000000000011
  67. -- Zeros
  68. dqnextp100 nextplus 0 -> 1E-6176
  69. dqnextp101 nextplus 0.00 -> 1E-6176
  70. dqnextp102 nextplus 0E-300 -> 1E-6176
  71. dqnextp103 nextplus 0E+300 -> 1E-6176
  72. dqnextp104 nextplus 0E+30000 -> 1E-6176
  73. dqnextp105 nextplus -0 -> 1E-6176
  74. dqnextp106 nextplus -0.00 -> 1E-6176
  75. dqnextp107 nextplus -0E-300 -> 1E-6176
  76. dqnextp108 nextplus -0E+300 -> 1E-6176
  77. dqnextp109 nextplus -0E+30000 -> 1E-6176
  78. -- specials
  79. dqnextp150 nextplus Inf -> Infinity
  80. dqnextp151 nextplus -Inf -> -9.999999999999999999999999999999999E+6144
  81. dqnextp152 nextplus NaN -> NaN
  82. dqnextp153 nextplus sNaN -> NaN Invalid_operation
  83. dqnextp154 nextplus NaN77 -> NaN77
  84. dqnextp155 nextplus sNaN88 -> NaN88 Invalid_operation
  85. dqnextp156 nextplus -NaN -> -NaN
  86. dqnextp157 nextplus -sNaN -> -NaN Invalid_operation
  87. dqnextp158 nextplus -NaN77 -> -NaN77
  88. dqnextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation
  89. -- Nmax, Nmin, Ntiny, subnormals
  90. dqnextp170 nextplus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999998E+6144
  91. dqnextp171 nextplus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999997E+6144
  92. dqnextp172 nextplus -1E-6143 -> -9.99999999999999999999999999999999E-6144
  93. dqnextp173 nextplus -1.000000000000000E-6143 -> -9.99999999999999999999999999999999E-6144
  94. dqnextp174 nextplus -9E-6176 -> -8E-6176
  95. dqnextp175 nextplus -9.9E-6175 -> -9.8E-6175
  96. dqnextp176 nextplus -9.99999999999999999999999999999E-6147 -> -9.99999999999999999999999999998E-6147
  97. dqnextp177 nextplus -9.99999999999999999999999999999999E-6144 -> -9.99999999999999999999999999999998E-6144
  98. dqnextp178 nextplus -9.99999999999999999999999999999998E-6144 -> -9.99999999999999999999999999999997E-6144
  99. dqnextp179 nextplus -9.99999999999999999999999999999997E-6144 -> -9.99999999999999999999999999999996E-6144
  100. dqnextp180 nextplus -0E-6176 -> 1E-6176
  101. dqnextp181 nextplus -1E-6176 -> -0E-6176
  102. dqnextp182 nextplus -2E-6176 -> -1E-6176
  103. dqnextp183 nextplus 0E-6176 -> 1E-6176
  104. dqnextp184 nextplus 1E-6176 -> 2E-6176
  105. dqnextp185 nextplus 2E-6176 -> 3E-6176
  106. dqnextp186 nextplus 10E-6176 -> 1.1E-6175
  107. dqnextp187 nextplus 100E-6176 -> 1.01E-6174
  108. dqnextp188 nextplus 100000E-6176 -> 1.00001E-6171
  109. dqnextp189 nextplus 1.00000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143
  110. dqnextp190 nextplus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143
  111. dqnextp191 nextplus 1E-6143 -> 1.000000000000000000000000000000001E-6143
  112. dqnextp192 nextplus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999999E+6144
  113. dqnextp193 nextplus 9.999999999999999999999999999999999E+6144 -> Infinity
  114. -- Null tests
  115. dqnextp900 nextplus # -> NaN Invalid_operation