annotate Lib/test/decimaltestdata/plus.decTest @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 787b969d37f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32451
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
1 ------------------------------------------------------------------------
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
2 -- plus.decTest -- decimal monadic addition --
48595
b3901c5660f7 Merged revisions 65257 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 44025
diff changeset
3 -- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
32451
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
4 ------------------------------------------------------------------------
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
5 -- Please see the document "General Decimal Arithmetic Testcases" --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
6 -- at http://www2.hursley.ibm.com/decimal for the description of --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
7 -- these testcases. --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
8 -- --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
9 -- These testcases are experimental ('beta' versions), and they --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
10 -- may contain errors. They are offered on an as-is basis. In --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
11 -- particular, achieving the same results as the tests here is not --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
12 -- a guarantee that an implementation complies with any Standard --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
13 -- or specification. The tests are not exhaustive. --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
14 -- --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
15 -- Please send comments, suggestions, and corrections to the author: --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
16 -- Mike Cowlishaw, IBM Fellow --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
17 -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
18 -- mfc@uk.ibm.com --
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
19 ------------------------------------------------------------------------
56838
670caa9775f6 Merged revisions 75286 via svnmerge from
Mark Dickinson <dickinsm@gmail.com>
parents: 48595
diff changeset
20 version: 2.59
32451
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
21
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
22 -- This set of tests primarily tests the existence of the operator.
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
23 -- Addition and rounding, and most overflows, are tested elsewhere.
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
24
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
25 extended: 1
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
26 precision: 9
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
27 rounding: half_up
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
28 maxExponent: 384
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
29 minexponent: -383
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
30
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
31 plux001 plus '1' -> '1'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
32 plux002 plus '-1' -> '-1'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
33 plux003 plus '1.00' -> '1.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
34 plux004 plus '-1.00' -> '-1.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
35 plux005 plus '0' -> '0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
36 plux006 plus '0.00' -> '0.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
37 plux007 plus '00.0' -> '0.0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
38 plux008 plus '00.00' -> '0.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
39 plux009 plus '00' -> '0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
40
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
41 plux010 plus '-2' -> '-2'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
42 plux011 plus '2' -> '2'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
43 plux012 plus '-2.00' -> '-2.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
44 plux013 plus '2.00' -> '2.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
45 plux014 plus '-0' -> '0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
46 plux015 plus '-0.00' -> '0.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
47 plux016 plus '-00.0' -> '0.0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
48 plux017 plus '-00.00' -> '0.00'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
49 plux018 plus '-00' -> '0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
50
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
51 plux020 plus '-2000000' -> '-2000000'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
52 plux021 plus '2000000' -> '2000000'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
53 precision: 7
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
54 plux022 plus '-2000000' -> '-2000000'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
55 plux023 plus '2000000' -> '2000000'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
56 precision: 6
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
57 plux024 plus '-2000000' -> '-2.00000E+6' Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
58 plux025 plus '2000000' -> '2.00000E+6' Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
59 precision: 3
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
60 plux026 plus '-2000000' -> '-2.00E+6' Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
61 plux027 plus '2000000' -> '2.00E+6' Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
62
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
63 -- more fixed, potential LHS swaps if done by add 0
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
64 precision: 9
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
65 plux060 plus '56267E-10' -> '0.0000056267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
66 plux061 plus '56267E-5' -> '0.56267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
67 plux062 plus '56267E-2' -> '562.67'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
68 plux063 plus '56267E-1' -> '5626.7'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
69 plux065 plus '56267E-0' -> '56267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
70 plux066 plus '56267E+0' -> '56267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
71 plux067 plus '56267E+1' -> '5.6267E+5'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
72 plux068 plus '56267E+2' -> '5.6267E+6'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
73 plux069 plus '56267E+3' -> '5.6267E+7'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
74 plux070 plus '56267E+4' -> '5.6267E+8'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
75 plux071 plus '56267E+5' -> '5.6267E+9'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
76 plux072 plus '56267E+6' -> '5.6267E+10'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
77 plux080 plus '-56267E-10' -> '-0.0000056267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
78 plux081 plus '-56267E-5' -> '-0.56267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
79 plux082 plus '-56267E-2' -> '-562.67'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
80 plux083 plus '-56267E-1' -> '-5626.7'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
81 plux085 plus '-56267E-0' -> '-56267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
82 plux086 plus '-56267E+0' -> '-56267'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
83 plux087 plus '-56267E+1' -> '-5.6267E+5'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
84 plux088 plus '-56267E+2' -> '-5.6267E+6'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
85 plux089 plus '-56267E+3' -> '-5.6267E+7'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
86 plux090 plus '-56267E+4' -> '-5.6267E+8'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
87 plux091 plus '-56267E+5' -> '-5.6267E+9'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
88 plux092 plus '-56267E+6' -> '-5.6267E+10'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
89
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
90 -- "lhs" zeros in plus and minus have exponent = operand
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
91 plux120 plus '-0E3' -> '0E+3'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
92 plux121 plus '-0E2' -> '0E+2'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
93 plux122 plus '-0E1' -> '0E+1'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
94 plux123 plus '-0E0' -> '0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
95 plux124 plus '+0E0' -> '0'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
96 plux125 plus '+0E1' -> '0E+1'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
97 plux126 plus '+0E2' -> '0E+2'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
98 plux127 plus '+0E3' -> '0E+3'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
99
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
100 plux130 plus '-5E3' -> '-5E+3'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
101 plux131 plus '-5E8' -> '-5E+8'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
102 plux132 plus '-5E13' -> '-5E+13'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
103 plux133 plus '-5E18' -> '-5E+18'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
104 plux134 plus '+5E3' -> '5E+3'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
105 plux135 plus '+5E8' -> '5E+8'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
106 plux136 plus '+5E13' -> '5E+13'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
107 plux137 plus '+5E18' -> '5E+18'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
108
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
109 -- specials
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
110 plux150 plus 'Inf' -> 'Infinity'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
111 plux151 plus '-Inf' -> '-Infinity'
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
112 plux152 plus NaN -> NaN
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
113 plux153 plus sNaN -> NaN Invalid_operation
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
114 plux154 plus NaN77 -> NaN77
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
115 plux155 plus sNaN88 -> NaN88 Invalid_operation
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
116 plux156 plus -NaN -> -NaN
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
117 plux157 plus -sNaN -> -NaN Invalid_operation
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
118 plux158 plus -NaN77 -> -NaN77
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
119 plux159 plus -sNaN88 -> -NaN88 Invalid_operation
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
120
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
121 -- overflow tests
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
122 maxexponent: 999999999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
123 minexponent: -999999999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
124 precision: 3
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
125 plux160 plus 9.999E+999999999 -> Infinity Inexact Overflow Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
126 plux161 plus -9.999E+999999999 -> -Infinity Inexact Overflow Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
127
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
128 -- subnormals and underflow
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
129 precision: 3
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
130 maxexponent: 999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
131 minexponent: -999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
132 plux210 plus 1.00E-999 -> 1.00E-999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
133 plux211 plus 0.1E-999 -> 1E-1000 Subnormal
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
134 plux212 plus 0.10E-999 -> 1.0E-1000 Subnormal
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
135 plux213 plus 0.100E-999 -> 1.0E-1000 Subnormal Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
136 plux214 plus 0.01E-999 -> 1E-1001 Subnormal
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
137 -- next is rounded to Emin
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
138 plux215 plus 0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
139 plux216 plus 0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
140 plux217 plus 0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
44600
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
141 plux218 plus 0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
142 plux219 plus 0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
143 plux220 plus 0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
32451
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
144
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
145 plux230 plus -1.00E-999 -> -1.00E-999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
146 plux231 plus -0.1E-999 -> -1E-1000 Subnormal
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
147 plux232 plus -0.10E-999 -> -1.0E-1000 Subnormal
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
148 plux233 plus -0.100E-999 -> -1.0E-1000 Subnormal Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
149 plux234 plus -0.01E-999 -> -1E-1001 Subnormal
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
150 -- next is rounded to Emin
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
151 plux235 plus -0.999E-999 -> -1.00E-999 Inexact Rounded Subnormal Underflow
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
152 plux236 plus -0.099E-999 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
153 plux237 plus -0.009E-999 -> -1E-1001 Inexact Rounded Subnormal Underflow
44600
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
154 plux238 plus -0.001E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
155 plux239 plus -0.0009E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
156 plux240 plus -0.0001E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
157
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
158 -- subnormals clamped to 0-Etiny
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
159 precision: 16
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
160 maxExponent: 384
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
161 minExponent: -383
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
162 plux251 plus 7E-398 -> 7E-398 Subnormal
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
163 plux252 plus 0E-398 -> 0E-398
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
164 plux253 plus 7E-399 -> 1E-398 Subnormal Underflow Inexact Rounded
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
165 plux254 plus 4E-399 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
166 plux255 plus 7E-400 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
167 plux256 plus 7E-401 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
168 plux257 plus 0E-399 -> 0E-398 Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
169 plux258 plus 0E-400 -> 0E-398 Clamped
9a60bd8f00d6 Decimal module and test cases were updated to their state of
Facundo Batista <facundobatista@gmail.com>
parents: 33158
diff changeset
170 plux259 plus 0E-401 -> 0E-398 Clamped
32451
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
171
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
172 -- long operand checks
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
173 maxexponent: 999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
174 minexponent: -999
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
175 precision: 9
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
176 plux301 plus 12345678000 -> 1.23456780E+10 Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
177 plux302 plus 1234567800 -> 1.23456780E+9 Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
178 plux303 plus 1234567890 -> 1.23456789E+9 Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
179 plux304 plus 1234567891 -> 1.23456789E+9 Inexact Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
180 plux305 plus 12345678901 -> 1.23456789E+10 Inexact Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
181 plux306 plus 1234567896 -> 1.23456790E+9 Inexact Rounded
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
182
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
183 -- still checking
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
184 precision: 15
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
185 plux321 plus 12345678000 -> 12345678000
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
186 plux322 plus 1234567800 -> 1234567800
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
187 plux323 plus 1234567890 -> 1234567890
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
188 plux324 plus 1234567891 -> 1234567891
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
189 plux325 plus 12345678901 -> 12345678901
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
190 plux326 plus 1234567896 -> 1234567896
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
191 precision: 9
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
192
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
193 -- Null tests
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
194 plu900 plus # -> NaN Invalid_operation
d2c1c7ae7cf4 Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
diff changeset
195