ddMinus.decTest 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ------------------------------------------------------------------------
  2. -- ddMinus.decTest -- decDouble 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 decDoubles.
  22. precision: 16
  23. maxExponent: 384
  24. minExponent: -383
  25. extended: 1
  26. clamp: 1
  27. rounding: half_even
  28. -- Sanity check
  29. ddmns001 minus +7.50 -> -7.50
  30. -- Infinities
  31. ddmns011 minus Infinity -> -Infinity
  32. ddmns012 minus -Infinity -> Infinity
  33. -- NaNs, 0 payload
  34. ddmns021 minus NaN -> NaN
  35. ddmns022 minus -NaN -> -NaN
  36. ddmns023 minus sNaN -> NaN Invalid_operation
  37. ddmns024 minus -sNaN -> -NaN Invalid_operation
  38. -- NaNs, non-0 payload
  39. ddmns031 minus NaN13 -> NaN13
  40. ddmns032 minus -NaN13 -> -NaN13
  41. ddmns033 minus sNaN13 -> NaN13 Invalid_operation
  42. ddmns034 minus -sNaN13 -> -NaN13 Invalid_operation
  43. ddmns035 minus NaN70 -> NaN70
  44. ddmns036 minus -NaN70 -> -NaN70
  45. ddmns037 minus sNaN101 -> NaN101 Invalid_operation
  46. ddmns038 minus -sNaN101 -> -NaN101 Invalid_operation
  47. -- finites
  48. ddmns101 minus 7 -> -7
  49. ddmns102 minus -7 -> 7
  50. ddmns103 minus 75 -> -75
  51. ddmns104 minus -75 -> 75
  52. ddmns105 minus 7.50 -> -7.50
  53. ddmns106 minus -7.50 -> 7.50
  54. ddmns107 minus 7.500 -> -7.500
  55. ddmns108 minus -7.500 -> 7.500
  56. -- zeros
  57. ddmns111 minus 0 -> 0
  58. ddmns112 minus -0 -> 0
  59. ddmns113 minus 0E+4 -> 0E+4
  60. ddmns114 minus -0E+4 -> 0E+4
  61. ddmns115 minus 0.0000 -> 0.0000
  62. ddmns116 minus -0.0000 -> 0.0000
  63. ddmns117 minus 0E-141 -> 0E-141
  64. ddmns118 minus -0E-141 -> 0E-141
  65. -- full coefficients, alternating bits
  66. ddmns121 minus 2682682682682682 -> -2682682682682682
  67. ddmns122 minus -2682682682682682 -> 2682682682682682
  68. ddmns123 minus 1341341341341341 -> -1341341341341341
  69. ddmns124 minus -1341341341341341 -> 1341341341341341
  70. -- Nmax, Nmin, Ntiny
  71. ddmns131 minus 9.999999999999999E+384 -> -9.999999999999999E+384
  72. ddmns132 minus 1E-383 -> -1E-383
  73. ddmns133 minus 1.000000000000000E-383 -> -1.000000000000000E-383
  74. ddmns134 minus 1E-398 -> -1E-398 Subnormal
  75. ddmns135 minus -1E-398 -> 1E-398 Subnormal
  76. ddmns136 minus -1.000000000000000E-383 -> 1.000000000000000E-383
  77. ddmns137 minus -1E-383 -> 1E-383
  78. ddmns138 minus -9.999999999999999E+384 -> 9.999999999999999E+384