dqPlus.decTest 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ------------------------------------------------------------------------
  2. -- dqPlus.decTest -- decQuad 0+x --
  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. -- Sanity check
  29. dqpls001 plus +7.50 -> 7.50
  30. -- Infinities
  31. dqpls011 plus Infinity -> Infinity
  32. dqpls012 plus -Infinity -> -Infinity
  33. -- NaNs, 0 payload
  34. ddqls021 plus NaN -> NaN
  35. ddqls022 plus -NaN -> -NaN
  36. ddqls023 plus sNaN -> NaN Invalid_operation
  37. ddqls024 plus -sNaN -> -NaN Invalid_operation
  38. -- NaNs, non-0 payload
  39. ddqls031 plus NaN13 -> NaN13
  40. ddqls032 plus -NaN13 -> -NaN13
  41. ddqls033 plus sNaN13 -> NaN13 Invalid_operation
  42. ddqls034 plus -sNaN13 -> -NaN13 Invalid_operation
  43. ddqls035 plus NaN70 -> NaN70
  44. ddqls036 plus -NaN70 -> -NaN70
  45. ddqls037 plus sNaN101 -> NaN101 Invalid_operation
  46. ddqls038 plus -sNaN101 -> -NaN101 Invalid_operation
  47. -- finites
  48. dqpls101 plus 7 -> 7
  49. dqpls102 plus -7 -> -7
  50. dqpls103 plus 75 -> 75
  51. dqpls104 plus -75 -> -75
  52. dqpls105 plus 7.50 -> 7.50
  53. dqpls106 plus -7.50 -> -7.50
  54. dqpls107 plus 7.500 -> 7.500
  55. dqpls108 plus -7.500 -> -7.500
  56. -- zeros
  57. dqpls111 plus 0 -> 0
  58. dqpls112 plus -0 -> 0
  59. dqpls113 plus 0E+4 -> 0E+4
  60. dqpls114 plus -0E+4 -> 0E+4
  61. dqpls115 plus 0.0000 -> 0.0000
  62. dqpls116 plus -0.0000 -> 0.0000
  63. dqpls117 plus 0E-141 -> 0E-141
  64. dqpls118 plus -0E-141 -> 0E-141
  65. -- full coefficients, alternating bits
  66. dqpls121 plus 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
  67. dqpls122 plus -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
  68. dqpls123 plus 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
  69. dqpls124 plus -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
  70. -- Nmax, Nmin, Ntiny
  71. dqpls131 plus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
  72. dqpls132 plus 1E-6143 -> 1E-6143
  73. dqpls133 plus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
  74. dqpls134 plus 1E-6176 -> 1E-6176 Subnormal
  75. dqpls135 plus -1E-6176 -> -1E-6176 Subnormal
  76. dqpls136 plus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
  77. dqpls137 plus -1E-6143 -> -1E-6143
  78. dqpls138 plus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144