PageRenderTime 555ms CodeModel.GetById 141ms app.highlight 1ms RepoModel.GetById 140ms app.codeStats 272ms

/Lib/test/decimaltestdata/dqCopy.decTest

http://unladen-swallow.googlecode.com/
Unknown | 88 lines | 78 code | 10 blank | 0 comment | 0 complexity | 971c89e0c6c7317081256e7f5c16afde MD5 | raw file
 1------------------------------------------------------------------------
 2-- dqCopy.decTest -- quiet decQuad 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------------------------------------------------------------------------
20version: 2.58
21
22-- All operands and results are decQuads.
23extended:    1
24clamp:       1
25precision:   34
26maxExponent: 6144
27minExponent: -6143
28rounding:    half_even
29
30-- Sanity check
31dqcpy001 copy       +7.50  -> 7.50
32
33-- Infinities
34dqcpy011 copy  Infinity    -> Infinity
35dqcpy012 copy  -Infinity   -> -Infinity
36
37-- NaNs, 0 payload
38dqcpy021 copy         NaN  -> NaN
39dqcpy022 copy        -NaN  -> -NaN
40dqcpy023 copy        sNaN  -> sNaN
41dqcpy024 copy       -sNaN  -> -sNaN
42
43-- NaNs, non-0 payload
44dqcpy031 copy       NaN10  -> NaN10
45dqcpy032 copy      -NaN10  -> -NaN10
46dqcpy033 copy      sNaN10  -> sNaN10
47dqcpy034 copy     -sNaN10  -> -sNaN10
48dqcpy035 copy       NaN7   -> NaN7
49dqcpy036 copy      -NaN7   -> -NaN7
50dqcpy037 copy      sNaN101 -> sNaN101
51dqcpy038 copy     -sNaN101 -> -sNaN101
52
53-- finites
54dqcpy101 copy          7   -> 7
55dqcpy102 copy         -7   -> -7
56dqcpy103 copy         75   -> 75
57dqcpy104 copy        -75   -> -75
58dqcpy105 copy       7.50   -> 7.50
59dqcpy106 copy      -7.50   -> -7.50
60dqcpy107 copy       7.500  -> 7.500
61dqcpy108 copy      -7.500  -> -7.500
62
63-- zeros
64dqcpy111 copy          0   -> 0
65dqcpy112 copy         -0   -> -0
66dqcpy113 copy       0E+4   -> 0E+4
67dqcpy114 copy      -0E+4   -> -0E+4
68dqcpy115 copy     0.0000   -> 0.0000
69dqcpy116 copy    -0.0000   -> -0.0000
70dqcpy117 copy      0E-141  -> 0E-141
71dqcpy118 copy     -0E-141  -> -0E-141
72
73-- full coefficients, alternating bits
74dqcpy121 copy   2682682682682682682682682682682682    ->  2682682682682682682682682682682682
75dqcpy122 copy  -2682682682682682682682682682682682    -> -2682682682682682682682682682682682
76dqcpy123 copy   1341341341341341341341341341341341    ->  1341341341341341341341341341341341
77dqcpy124 copy  -1341341341341341341341341341341341    -> -1341341341341341341341341341341341
78
79-- Nmax, Nmin, Ntiny
80dqcpy131 copy  9.999999999999999999999999999999999E+6144   ->  9.999999999999999999999999999999999E+6144
81dqcpy132 copy  1E-6143                                     ->  1E-6143
82dqcpy133 copy  1.000000000000000000000000000000000E-6143   ->  1.000000000000000000000000000000000E-6143
83dqcpy134 copy  1E-6176                                     ->  1E-6176
84
85dqcpy135 copy  -1E-6176                                    -> -1E-6176
86dqcpy136 copy  -1.000000000000000000000000000000000E-6143  -> -1.000000000000000000000000000000000E-6143
87dqcpy137 copy  -1E-6143                                    -> -1E-6143
88dqcpy138 copy  -9.999999999999999999999999999999999E+6144  -> -9.999999999999999999999999999999999E+6144