ddCopy.decTest 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ------------------------------------------------------------------------
  2. -- ddCopy.decTest -- quiet decDouble copy --
  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. ddcpy001 copy +7.50 -> 7.50
  30. -- Infinities
  31. ddcpy011 copy Infinity -> Infinity
  32. ddcpy012 copy -Infinity -> -Infinity
  33. -- NaNs, 0 payload
  34. ddcpy021 copy NaN -> NaN
  35. ddcpy022 copy -NaN -> -NaN
  36. ddcpy023 copy sNaN -> sNaN
  37. ddcpy024 copy -sNaN -> -sNaN
  38. -- NaNs, non-0 payload
  39. ddcpy031 copy NaN10 -> NaN10
  40. ddcpy032 copy -NaN10 -> -NaN10
  41. ddcpy033 copy sNaN10 -> sNaN10
  42. ddcpy034 copy -sNaN10 -> -sNaN10
  43. ddcpy035 copy NaN7 -> NaN7
  44. ddcpy036 copy -NaN7 -> -NaN7
  45. ddcpy037 copy sNaN101 -> sNaN101
  46. ddcpy038 copy -sNaN101 -> -sNaN101
  47. -- finites
  48. ddcpy101 copy 7 -> 7
  49. ddcpy102 copy -7 -> -7
  50. ddcpy103 copy 75 -> 75
  51. ddcpy104 copy -75 -> -75
  52. ddcpy105 copy 7.50 -> 7.50
  53. ddcpy106 copy -7.50 -> -7.50
  54. ddcpy107 copy 7.500 -> 7.500
  55. ddcpy108 copy -7.500 -> -7.500
  56. -- zeros
  57. ddcpy111 copy 0 -> 0
  58. ddcpy112 copy -0 -> -0
  59. ddcpy113 copy 0E+4 -> 0E+4
  60. ddcpy114 copy -0E+4 -> -0E+4
  61. ddcpy115 copy 0.0000 -> 0.0000
  62. ddcpy116 copy -0.0000 -> -0.0000
  63. ddcpy117 copy 0E-141 -> 0E-141
  64. ddcpy118 copy -0E-141 -> -0E-141
  65. -- full coefficients, alternating bits
  66. ddcpy121 copy 2682682682682682 -> 2682682682682682
  67. ddcpy122 copy -2682682682682682 -> -2682682682682682
  68. ddcpy123 copy 1341341341341341 -> 1341341341341341
  69. ddcpy124 copy -1341341341341341 -> -1341341341341341
  70. -- Nmax, Nmin, Ntiny
  71. ddcpy131 copy 9.999999999999999E+384 -> 9.999999999999999E+384
  72. ddcpy132 copy 1E-383 -> 1E-383
  73. ddcpy133 copy 1.000000000000000E-383 -> 1.000000000000000E-383
  74. ddcpy134 copy 1E-398 -> 1E-398
  75. ddcpy135 copy -1E-398 -> -1E-398
  76. ddcpy136 copy -1.000000000000000E-383 -> -1.000000000000000E-383
  77. ddcpy137 copy -1E-383 -> -1E-383
  78. ddcpy138 copy -9.999999999999999E+384 -> -9.999999999999999E+384