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