Update decimal test data to the most recent set from Mike Cowlishaw.
[python.git] / Lib / test / decimaltestdata / dqLogB.decTest
bloba18313dc012758960dd42f105dc07e67a52ca0dc
1 ------------------------------------------------------------------------\r
2 -- dqLogB.decTest -- integral 754r adjusted exponent, for decQuads    --\r
3 -- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --\r
4 ------------------------------------------------------------------------\r
5 -- Please see the document "General Decimal Arithmetic Testcases"     --\r
6 -- at http://www2.hursley.ibm.com/decimal for the description of      --\r
7 -- these testcases.                                                   --\r
8 --                                                                    --\r
9 -- These testcases are experimental ('beta' versions), and they       --\r
10 -- may contain errors.  They are offered on an as-is basis.  In       --\r
11 -- particular, achieving the same results as the tests here is not    --\r
12 -- a guarantee that an implementation complies with any Standard      --\r
13 -- or specification.  The tests are not exhaustive.                   --\r
14 --                                                                    --\r
15 -- Please send comments, suggestions, and corrections to the author:  --\r
16 --   Mike Cowlishaw, IBM Fellow                                       --\r
17 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --\r
18 --   mfc@uk.ibm.com                                                   --\r
19 ------------------------------------------------------------------------\r
20 version: 2.59\r
22 extended:    1\r
23 clamp:       1\r
24 precision:   34\r
25 maxExponent: 6144\r
26 minExponent: -6143\r
27 rounding:    half_even\r
29 -- basics\r
30 dqlogb000 logb  0                 -> -Infinity  Division_by_zero\r
31 dqlogb001 logb  1E-6176           -> -6176\r
32 dqlogb002 logb  1E-6143           -> -6143\r
33 dqlogb003 logb  0.001             -> -3\r
34 dqlogb004 logb  0.03              -> -2\r
35 dqlogb005 logb  1                 ->  0\r
36 dqlogb006 logb  2                 ->  0\r
37 dqlogb007 logb  2.5               ->  0\r
38 dqlogb008 logb  2.50              ->  0\r
39 dqlogb009 logb  2.500             ->  0\r
40 dqlogb010 logb  10                ->  1\r
41 dqlogb011 logb  70                ->  1\r
42 dqlogb012 logb  100               ->  2\r
43 dqlogb013 logb  250               ->  2\r
44 dqlogb014 logb  9E+6144           ->  6144\r
45 dqlogb015 logb +Infinity          ->  Infinity\r
47 -- negatives appear to be treated as positives\r
48 dqlogb021 logb -0                 -> -Infinity  Division_by_zero\r
49 dqlogb022 logb -1E-6176           -> -6176\r
50 dqlogb023 logb -9E-6143           -> -6143\r
51 dqlogb024 logb -0.001             -> -3\r
52 dqlogb025 logb -1                 ->  0\r
53 dqlogb026 logb -2                 ->  0\r
54 dqlogb027 logb -10                ->  1\r
55 dqlogb028 logb -70                ->  1\r
56 dqlogb029 logb -100               ->  2\r
57 dqlogb030 logb -9E+6144           ->  6144\r
58 dqlogb031 logb -Infinity          ->  Infinity\r
60 -- zeros\r
61 dqlogb111 logb          0   -> -Infinity  Division_by_zero\r
62 dqlogb112 logb         -0   -> -Infinity  Division_by_zero\r
63 dqlogb113 logb       0E+4   -> -Infinity  Division_by_zero\r
64 dqlogb114 logb      -0E+4   -> -Infinity  Division_by_zero\r
65 dqlogb115 logb     0.0000   -> -Infinity  Division_by_zero\r
66 dqlogb116 logb    -0.0000   -> -Infinity  Division_by_zero\r
67 dqlogb117 logb      0E-141  -> -Infinity  Division_by_zero\r
68 dqlogb118 logb     -0E-141  -> -Infinity  Division_by_zero\r
70 -- full coefficients, alternating bits\r
71 dqlogb121 logb   268268268        -> 8\r
72 dqlogb122 logb  -268268268        -> 8\r
73 dqlogb123 logb   134134134        -> 8\r
74 dqlogb124 logb  -134134134        -> 8\r
76 -- Nmax, Nmin, Ntiny\r
77 dqlogb131 logb  9.999999999999999999999999999999999E+6144   ->  6144\r
78 dqlogb132 logb  1E-6143                   -> -6143\r
79 dqlogb133 logb  1.000000000000000000000000000000000E-6143   -> -6143\r
80 dqlogb134 logb  1E-6176                   -> -6176\r
82 dqlogb135 logb  -1E-6176                  -> -6176\r
83 dqlogb136 logb  -1.000000000000000000000000000000000E-6143  -> -6143\r
84 dqlogb137 logb  -1E-6143                  -> -6143\r
85 dqlogb1614 logb  -9.999999999999999999999999999999999E+6144  ->  6144\r
87 -- ones\r
88 dqlogb0061 logb  1                 ->   0\r
89 dqlogb0062 logb  1.0               ->   0\r
90 dqlogb0063 logb  1.000000000000000 ->   0\r
92 -- notable cases -- exact powers of 10\r
93 dqlogb1100 logb 1             -> 0\r
94 dqlogb1101 logb 10            -> 1\r
95 dqlogb1102 logb 100           -> 2\r
96 dqlogb1103 logb 1000          -> 3\r
97 dqlogb1104 logb 10000         -> 4\r
98 dqlogb1105 logb 100000        -> 5\r
99 dqlogb1106 logb 1000000       -> 6\r
100 dqlogb1107 logb 10000000      -> 7\r
101 dqlogb1108 logb 100000000     -> 8\r
102 dqlogb1109 logb 1000000000    -> 9\r
103 dqlogb1110 logb 10000000000   -> 10\r
104 dqlogb1111 logb 100000000000  -> 11\r
105 dqlogb1112 logb 1000000000000 -> 12\r
106 dqlogb1113 logb 0.00000000001 -> -11\r
107 dqlogb1114 logb 0.0000000001 -> -10\r
108 dqlogb1115 logb 0.000000001 -> -9\r
109 dqlogb1116 logb 0.00000001 -> -8\r
110 dqlogb1117 logb 0.0000001 -> -7\r
111 dqlogb1118 logb 0.000001 -> -6\r
112 dqlogb1119 logb 0.00001 -> -5\r
113 dqlogb1120 logb 0.0001 -> -4\r
114 dqlogb1121 logb 0.001 -> -3\r
115 dqlogb1122 logb 0.01 -> -2\r
116 dqlogb1123 logb 0.1 -> -1\r
117 dqlogb1124 logb 1E-99  -> -99\r
118 dqlogb1125 logb 1E-100 -> -100\r
119 dqlogb1127 logb 1E-299 -> -299\r
120 dqlogb1126 logb 1E-6143 -> -6143\r
122 -- suggestions from Ilan Nehama\r
123 dqlogb1400 logb 10E-3    -> -2\r
124 dqlogb1401 logb 10E-2    -> -1\r
125 dqlogb1402 logb 100E-2   ->  0\r
126 dqlogb1403 logb 1000E-2  ->  1\r
127 dqlogb1404 logb 10000E-2 ->  2\r
128 dqlogb1405 logb 10E-1    ->  0\r
129 dqlogb1406 logb 100E-1   ->  1\r
130 dqlogb1407 logb 1000E-1  ->  2\r
131 dqlogb1408 logb 10000E-1 ->  3\r
132 dqlogb1409 logb 10E0     ->  1\r
133 dqlogb1410 logb 100E0    ->  2\r
134 dqlogb1411 logb 1000E0   ->  3\r
135 dqlogb1412 logb 10000E0  ->  4\r
136 dqlogb1413 logb 10E1     ->  2\r
137 dqlogb1414 logb 100E1    ->  3\r
138 dqlogb1415 logb 1000E1   ->  4\r
139 dqlogb1416 logb 10000E1  ->  5\r
140 dqlogb1417 logb 10E2     ->  3\r
141 dqlogb1418 logb 100E2    ->  4\r
142 dqlogb1419 logb 1000E2   ->  5\r
143 dqlogb1420 logb 10000E2  ->  6\r
145 -- special values\r
146 dqlogb820  logb   Infinity ->   Infinity\r
147 dqlogb821  logb   0        ->  -Infinity Division_by_zero\r
148 dqlogb822  logb   NaN      ->   NaN\r
149 dqlogb823  logb   sNaN     ->   NaN     Invalid_operation\r
150 -- propagating NaNs\r
151 dqlogb824  logb   sNaN123  ->   NaN123  Invalid_operation\r
152 dqlogb825  logb   -sNaN321 ->  -NaN321  Invalid_operation\r
153 dqlogb826  logb   NaN456   ->   NaN456\r
154 dqlogb827  logb   -NaN654  ->  -NaN654\r
155 dqlogb828  logb   NaN1     ->   NaN1\r
157 -- Null test\r
158 dqlogb900  logb #   -> NaN Invalid_operation\r