copyabs.decTest 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ------------------------------------------------------------------------
  2. -- copyAbs.decTest -- quiet 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. extended: 1
  22. precision: 9
  23. rounding: half_up
  24. maxExponent: 999
  25. minExponent: -999
  26. -- Sanity check
  27. cpax001 copyabs +7.50 -> 7.50
  28. -- Infinities
  29. cpax011 copyabs Infinity -> Infinity
  30. cpax012 copyabs -Infinity -> Infinity
  31. -- NaNs, 0 payload
  32. cpax021 copyabs NaN -> NaN
  33. cpax022 copyabs -NaN -> NaN
  34. cpax023 copyabs sNaN -> sNaN
  35. cpax024 copyabs -sNaN -> sNaN
  36. -- NaNs, non-0 payload
  37. cpax031 copyabs NaN10 -> NaN10
  38. cpax032 copyabs -NaN15 -> NaN15
  39. cpax033 copyabs sNaN15 -> sNaN15
  40. cpax034 copyabs -sNaN10 -> sNaN10
  41. cpax035 copyabs NaN7 -> NaN7
  42. cpax036 copyabs -NaN7 -> NaN7
  43. cpax037 copyabs sNaN101 -> sNaN101
  44. cpax038 copyabs -sNaN101 -> sNaN101
  45. -- finites
  46. cpax101 copyabs 7 -> 7
  47. cpax102 copyabs -7 -> 7
  48. cpax103 copyabs 75 -> 75
  49. cpax104 copyabs -75 -> 75
  50. cpax105 copyabs 7.10 -> 7.10
  51. cpax106 copyabs -7.10 -> 7.10
  52. cpax107 copyabs 7.500 -> 7.500
  53. cpax108 copyabs -7.500 -> 7.500
  54. -- zeros
  55. cpax111 copyabs 0 -> 0
  56. cpax112 copyabs -0 -> 0
  57. cpax113 copyabs 0E+6 -> 0E+6
  58. cpax114 copyabs -0E+6 -> 0E+6
  59. cpax115 copyabs 0.0000 -> 0.0000
  60. cpax116 copyabs -0.0000 -> 0.0000
  61. cpax117 copyabs 0E-141 -> 0E-141
  62. cpax118 copyabs -0E-141 -> 0E-141
  63. -- full coefficients, alternating bits
  64. cpax121 copyabs 268268268 -> 268268268
  65. cpax122 copyabs -268268268 -> 268268268
  66. cpax123 copyabs 134134134 -> 134134134
  67. cpax124 copyabs -134134134 -> 134134134
  68. -- Nmax, Nmin, Ntiny
  69. cpax131 copyabs 9.99999999E+999 -> 9.99999999E+999
  70. cpax132 copyabs 1E-999 -> 1E-999
  71. cpax133 copyabs 1.00000000E-999 -> 1.00000000E-999
  72. cpax134 copyabs 1E-1007 -> 1E-1007
  73. cpax135 copyabs -1E-1007 -> 1E-1007
  74. cpax136 copyabs -1.00000000E-999 -> 1.00000000E-999
  75. cpax137 copyabs -1E-999 -> 1E-999
  76. cpax199 copyabs -9.99999999E+999 -> 9.99999999E+999