ddCopyAbs.decTest 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ------------------------------------------------------------------------
  2. -- ddCopyAbs.decTest -- quiet decDouble copy and set sign to zero --
  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. ddcpa001 copyabs +7.50 -> 7.50
  30. -- Infinities
  31. ddcpa011 copyabs Infinity -> Infinity
  32. ddcpa012 copyabs -Infinity -> Infinity
  33. -- NaNs, 0 payload
  34. ddcpa021 copyabs NaN -> NaN
  35. ddcpa022 copyabs -NaN -> NaN
  36. ddcpa023 copyabs sNaN -> sNaN
  37. ddcpa024 copyabs -sNaN -> sNaN
  38. -- NaNs, non-0 payload
  39. ddcpa031 copyabs NaN10 -> NaN10
  40. ddcpa032 copyabs -NaN15 -> NaN15
  41. ddcpa033 copyabs sNaN15 -> sNaN15
  42. ddcpa034 copyabs -sNaN10 -> sNaN10
  43. ddcpa035 copyabs NaN7 -> NaN7
  44. ddcpa036 copyabs -NaN7 -> NaN7
  45. ddcpa037 copyabs sNaN101 -> sNaN101
  46. ddcpa038 copyabs -sNaN101 -> sNaN101
  47. -- finites
  48. ddcpa101 copyabs 7 -> 7
  49. ddcpa102 copyabs -7 -> 7
  50. ddcpa103 copyabs 75 -> 75
  51. ddcpa104 copyabs -75 -> 75
  52. ddcpa105 copyabs 7.10 -> 7.10
  53. ddcpa106 copyabs -7.10 -> 7.10
  54. ddcpa107 copyabs 7.500 -> 7.500
  55. ddcpa108 copyabs -7.500 -> 7.500
  56. -- zeros
  57. ddcpa111 copyabs 0 -> 0
  58. ddcpa112 copyabs -0 -> 0
  59. ddcpa113 copyabs 0E+6 -> 0E+6
  60. ddcpa114 copyabs -0E+6 -> 0E+6
  61. ddcpa115 copyabs 0.0000 -> 0.0000
  62. ddcpa116 copyabs -0.0000 -> 0.0000
  63. ddcpa117 copyabs 0E-141 -> 0E-141
  64. ddcpa118 copyabs -0E-141 -> 0E-141
  65. -- full coefficients, alternating bits
  66. ddcpa121 copyabs 2682682682682682 -> 2682682682682682
  67. ddcpa122 copyabs -2682682682682682 -> 2682682682682682
  68. ddcpa123 copyabs 1341341341341341 -> 1341341341341341
  69. ddcpa124 copyabs -1341341341341341 -> 1341341341341341
  70. -- Nmax, Nmin, Ntiny
  71. ddcpa131 copyabs 9.999999999999999E+384 -> 9.999999999999999E+384
  72. ddcpa132 copyabs 1E-383 -> 1E-383
  73. ddcpa133 copyabs 1.000000000000000E-383 -> 1.000000000000000E-383
  74. ddcpa134 copyabs 1E-398 -> 1E-398
  75. ddcpa135 copyabs -1E-398 -> 1E-398
  76. ddcpa136 copyabs -1.000000000000000E-383 -> 1.000000000000000E-383
  77. ddcpa137 copyabs -1E-383 -> 1E-383
  78. ddcpa138 copyabs -9.999999999999999E+384 -> 9.999999999999999E+384