dqMinus.decTest 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ------------------------------------------------------------------------
  2. -- dqMinus.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. dqmns001 minus +7.50 -> -7.50
  30. -- Infinities
  31. dqmns011 minus Infinity -> -Infinity
  32. dqmns012 minus -Infinity -> Infinity
  33. -- NaNs, 0 payload
  34. dqmns021 minus NaN -> NaN
  35. dqmns022 minus -NaN -> -NaN
  36. dqmns023 minus sNaN -> NaN Invalid_operation
  37. dqmns024 minus -sNaN -> -NaN Invalid_operation
  38. -- NaNs, non-0 payload
  39. dqmns031 minus NaN13 -> NaN13
  40. dqmns032 minus -NaN13 -> -NaN13
  41. dqmns033 minus sNaN13 -> NaN13 Invalid_operation
  42. dqmns034 minus -sNaN13 -> -NaN13 Invalid_operation
  43. dqmns035 minus NaN70 -> NaN70
  44. dqmns036 minus -NaN70 -> -NaN70
  45. dqmns037 minus sNaN101 -> NaN101 Invalid_operation
  46. dqmns038 minus -sNaN101 -> -NaN101 Invalid_operation
  47. -- finites
  48. dqmns101 minus 7 -> -7
  49. dqmns102 minus -7 -> 7
  50. dqmns103 minus 75 -> -75
  51. dqmns104 minus -75 -> 75
  52. dqmns105 minus 7.50 -> -7.50
  53. dqmns106 minus -7.50 -> 7.50
  54. dqmns107 minus 7.500 -> -7.500
  55. dqmns108 minus -7.500 -> 7.500
  56. -- zeros
  57. dqmns111 minus 0 -> 0
  58. dqmns112 minus -0 -> 0
  59. dqmns113 minus 0E+4 -> 0E+4
  60. dqmns114 minus -0E+4 -> 0E+4
  61. dqmns115 minus 0.0000 -> 0.0000
  62. dqmns116 minus -0.0000 -> 0.0000
  63. dqmns117 minus 0E-141 -> 0E-141
  64. dqmns118 minus -0E-141 -> 0E-141
  65. -- full coefficients, alternating bits
  66. dqmns121 minus 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
  67. dqmns122 minus -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
  68. dqmns123 minus 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
  69. dqmns124 minus -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
  70. -- Nmax, Nmin, Ntiny
  71. dqmns131 minus 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
  72. dqmns132 minus 1E-6143 -> -1E-6143
  73. dqmns133 minus 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
  74. dqmns134 minus 1E-6176 -> -1E-6176 Subnormal
  75. dqmns135 minus -1E-6176 -> 1E-6176 Subnormal
  76. dqmns136 minus -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
  77. dqmns137 minus -1E-6143 -> 1E-6143
  78. dqmns138 minus -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144