1 | ------------------------------------------------------------------------
|
---|
2 | -- maxmag.decTest -- decimal maximum by magnitude --
|
---|
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 |
|
---|
22 | -- we assume that base comparison is tested in compare.decTest, so
|
---|
23 | -- these mainly cover special cases and rounding
|
---|
24 |
|
---|
25 | extended: 1
|
---|
26 | precision: 9
|
---|
27 | rounding: half_up
|
---|
28 | maxExponent: 384
|
---|
29 | minexponent: -383
|
---|
30 |
|
---|
31 | -- sanity checks
|
---|
32 | mxgx001 maxmag -2 -2 -> -2
|
---|
33 | mxgx002 maxmag -2 -1 -> -2
|
---|
34 | mxgx003 maxmag -2 0 -> -2
|
---|
35 | mxgx004 maxmag -2 1 -> -2
|
---|
36 | mxgx005 maxmag -2 2 -> 2
|
---|
37 | mxgx006 maxmag -1 -2 -> -2
|
---|
38 | mxgx007 maxmag -1 -1 -> -1
|
---|
39 | mxgx008 maxmag -1 0 -> -1
|
---|
40 | mxgx009 maxmag -1 1 -> 1
|
---|
41 | mxgx010 maxmag -1 2 -> 2
|
---|
42 | mxgx011 maxmag 0 -2 -> -2
|
---|
43 | mxgx012 maxmag 0 -1 -> -1
|
---|
44 | mxgx013 maxmag 0 0 -> 0
|
---|
45 | mxgx014 maxmag 0 1 -> 1
|
---|
46 | mxgx015 maxmag 0 2 -> 2
|
---|
47 | mxgx016 maxmag 1 -2 -> -2
|
---|
48 | mxgx017 maxmag 1 -1 -> 1
|
---|
49 | mxgx018 maxmag 1 0 -> 1
|
---|
50 | mxgx019 maxmag 1 1 -> 1
|
---|
51 | mxgx020 maxmag 1 2 -> 2
|
---|
52 | mxgx021 maxmag 2 -2 -> 2
|
---|
53 | mxgx022 maxmag 2 -1 -> 2
|
---|
54 | mxgx023 maxmag 2 0 -> 2
|
---|
55 | mxgx025 maxmag 2 1 -> 2
|
---|
56 | mxgx026 maxmag 2 2 -> 2
|
---|
57 |
|
---|
58 | -- extended zeros
|
---|
59 | mxgx030 maxmag 0 0 -> 0
|
---|
60 | mxgx031 maxmag 0 -0 -> 0
|
---|
61 | mxgx032 maxmag 0 -0.0 -> 0
|
---|
62 | mxgx033 maxmag 0 0.0 -> 0
|
---|
63 | mxgx034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
|
---|
64 | mxgx035 maxmag -0 -0 -> -0
|
---|
65 | mxgx036 maxmag -0 -0.0 -> -0.0
|
---|
66 | mxgx037 maxmag -0 0.0 -> 0.0
|
---|
67 | mxgx038 maxmag 0.0 0 -> 0
|
---|
68 | mxgx039 maxmag 0.0 -0 -> 0.0
|
---|
69 | mxgx040 maxmag 0.0 -0.0 -> 0.0
|
---|
70 | mxgx041 maxmag 0.0 0.0 -> 0.0
|
---|
71 | mxgx042 maxmag -0.0 0 -> 0
|
---|
72 | mxgx043 maxmag -0.0 -0 -> -0.0
|
---|
73 | mxgx044 maxmag -0.0 -0.0 -> -0.0
|
---|
74 | mxgx045 maxmag -0.0 0.0 -> 0.0
|
---|
75 |
|
---|
76 | mxgx050 maxmag -0E1 0E1 -> 0E+1
|
---|
77 | mxgx051 maxmag -0E2 0E2 -> 0E+2
|
---|
78 | mxgx052 maxmag -0E2 0E1 -> 0E+1
|
---|
79 | mxgx053 maxmag -0E1 0E2 -> 0E+2
|
---|
80 | mxgx054 maxmag 0E1 -0E1 -> 0E+1
|
---|
81 | mxgx055 maxmag 0E2 -0E2 -> 0E+2
|
---|
82 | mxgx056 maxmag 0E2 -0E1 -> 0E+2
|
---|
83 | mxgx057 maxmag 0E1 -0E2 -> 0E+1
|
---|
84 |
|
---|
85 | mxgx058 maxmag 0E1 0E1 -> 0E+1
|
---|
86 | mxgx059 maxmag 0E2 0E2 -> 0E+2
|
---|
87 | mxgx060 maxmag 0E2 0E1 -> 0E+2
|
---|
88 | mxgx061 maxmag 0E1 0E2 -> 0E+2
|
---|
89 | mxgx062 maxmag -0E1 -0E1 -> -0E+1
|
---|
90 | mxgx063 maxmag -0E2 -0E2 -> -0E+2
|
---|
91 | mxgx064 maxmag -0E2 -0E1 -> -0E+1
|
---|
92 | mxgx065 maxmag -0E1 -0E2 -> -0E+1
|
---|
93 |
|
---|
94 | -- Specials
|
---|
95 | precision: 9
|
---|
96 | mxgx090 maxmag Inf -Inf -> Infinity
|
---|
97 | mxgx091 maxmag Inf -1000 -> Infinity
|
---|
98 | mxgx092 maxmag Inf -1 -> Infinity
|
---|
99 | mxgx093 maxmag Inf -0 -> Infinity
|
---|
100 | mxgx094 maxmag Inf 0 -> Infinity
|
---|
101 | mxgx095 maxmag Inf 1 -> Infinity
|
---|
102 | mxgx096 maxmag Inf 1000 -> Infinity
|
---|
103 | mxgx097 maxmag Inf Inf -> Infinity
|
---|
104 | mxgx098 maxmag -1000 Inf -> Infinity
|
---|
105 | mxgx099 maxmag -Inf Inf -> Infinity
|
---|
106 | mxgx100 maxmag -1 Inf -> Infinity
|
---|
107 | mxgx101 maxmag -0 Inf -> Infinity
|
---|
108 | mxgx102 maxmag 0 Inf -> Infinity
|
---|
109 | mxgx103 maxmag 1 Inf -> Infinity
|
---|
110 | mxgx104 maxmag 1000 Inf -> Infinity
|
---|
111 | mxgx105 maxmag Inf Inf -> Infinity
|
---|
112 |
|
---|
113 | mxgx120 maxmag -Inf -Inf -> -Infinity
|
---|
114 | mxgx121 maxmag -Inf -1000 -> -Infinity
|
---|
115 | mxgx122 maxmag -Inf -1 -> -Infinity
|
---|
116 | mxgx123 maxmag -Inf -0 -> -Infinity
|
---|
117 | mxgx124 maxmag -Inf 0 -> -Infinity
|
---|
118 | mxgx125 maxmag -Inf 1 -> -Infinity
|
---|
119 | mxgx126 maxmag -Inf 1000 -> -Infinity
|
---|
120 | mxgx127 maxmag -Inf Inf -> Infinity
|
---|
121 | mxgx128 maxmag -Inf -Inf -> -Infinity
|
---|
122 | mxgx129 maxmag -1000 -Inf -> -Infinity
|
---|
123 | mxgx130 maxmag -1 -Inf -> -Infinity
|
---|
124 | mxgx131 maxmag -0 -Inf -> -Infinity
|
---|
125 | mxgx132 maxmag 0 -Inf -> -Infinity
|
---|
126 | mxgx133 maxmag 1 -Inf -> -Infinity
|
---|
127 | mxgx134 maxmag 1000 -Inf -> -Infinity
|
---|
128 | mxgx135 maxmag Inf -Inf -> Infinity
|
---|
129 |
|
---|
130 | -- 2004.08.02 754r chooses number over NaN in mixed cases
|
---|
131 | mxgx141 maxmag NaN -Inf -> -Infinity
|
---|
132 | mxgx142 maxmag NaN -1000 -> -1000
|
---|
133 | mxgx143 maxmag NaN -1 -> -1
|
---|
134 | mxgx144 maxmag NaN -0 -> -0
|
---|
135 | mxgx145 maxmag NaN 0 -> 0
|
---|
136 | mxgx146 maxmag NaN 1 -> 1
|
---|
137 | mxgx147 maxmag NaN 1000 -> 1000
|
---|
138 | mxgx148 maxmag NaN Inf -> Infinity
|
---|
139 | mxgx149 maxmag NaN NaN -> NaN
|
---|
140 | mxgx150 maxmag -Inf NaN -> -Infinity
|
---|
141 | mxgx151 maxmag -1000 NaN -> -1000
|
---|
142 | mxgx152 maxmag -1 NaN -> -1
|
---|
143 | mxgx153 maxmag -0 NaN -> -0
|
---|
144 | mxgx154 maxmag 0 NaN -> 0
|
---|
145 | mxgx155 maxmag 1 NaN -> 1
|
---|
146 | mxgx156 maxmag 1000 NaN -> 1000
|
---|
147 | mxgx157 maxmag Inf NaN -> Infinity
|
---|
148 |
|
---|
149 | mxgx161 maxmag sNaN -Inf -> NaN Invalid_operation
|
---|
150 | mxgx162 maxmag sNaN -1000 -> NaN Invalid_operation
|
---|
151 | mxgx163 maxmag sNaN -1 -> NaN Invalid_operation
|
---|
152 | mxgx164 maxmag sNaN -0 -> NaN Invalid_operation
|
---|
153 | mxgx165 maxmag sNaN 0 -> NaN Invalid_operation
|
---|
154 | mxgx166 maxmag sNaN 1 -> NaN Invalid_operation
|
---|
155 | mxgx167 maxmag sNaN 1000 -> NaN Invalid_operation
|
---|
156 | mxgx168 maxmag sNaN NaN -> NaN Invalid_operation
|
---|
157 | mxgx169 maxmag sNaN sNaN -> NaN Invalid_operation
|
---|
158 | mxgx170 maxmag NaN sNaN -> NaN Invalid_operation
|
---|
159 | mxgx171 maxmag -Inf sNaN -> NaN Invalid_operation
|
---|
160 | mxgx172 maxmag -1000 sNaN -> NaN Invalid_operation
|
---|
161 | mxgx173 maxmag -1 sNaN -> NaN Invalid_operation
|
---|
162 | mxgx174 maxmag -0 sNaN -> NaN Invalid_operation
|
---|
163 | mxgx175 maxmag 0 sNaN -> NaN Invalid_operation
|
---|
164 | mxgx176 maxmag 1 sNaN -> NaN Invalid_operation
|
---|
165 | mxgx177 maxmag 1000 sNaN -> NaN Invalid_operation
|
---|
166 | mxgx178 maxmag Inf sNaN -> NaN Invalid_operation
|
---|
167 | mxgx179 maxmag NaN sNaN -> NaN Invalid_operation
|
---|
168 |
|
---|
169 | -- propagating NaNs
|
---|
170 | mxgx181 maxmag NaN9 -Inf -> -Infinity
|
---|
171 | mxgx182 maxmag NaN8 9 -> 9
|
---|
172 | mxgx183 maxmag -NaN7 Inf -> Infinity
|
---|
173 |
|
---|
174 | mxgx184 maxmag -NaN1 NaN11 -> -NaN1
|
---|
175 | mxgx185 maxmag NaN2 NaN12 -> NaN2
|
---|
176 | mxgx186 maxmag -NaN13 -NaN7 -> -NaN13
|
---|
177 | mxgx187 maxmag NaN14 -NaN5 -> NaN14
|
---|
178 |
|
---|
179 | mxgx188 maxmag -Inf NaN4 -> -Infinity
|
---|
180 | mxgx189 maxmag -9 -NaN3 -> -9
|
---|
181 | mxgx190 maxmag Inf NaN2 -> Infinity
|
---|
182 |
|
---|
183 | mxgx191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
|
---|
184 | mxgx192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
|
---|
185 | mxgx193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
|
---|
186 | mxgx194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
|
---|
187 | mxgx195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
|
---|
188 | mxgx196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
|
---|
189 | mxgx197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
|
---|
190 | mxgx198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
|
---|
191 | mxgx199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
|
---|
192 |
|
---|
193 | -- rounding checks
|
---|
194 | maxexponent: 999
|
---|
195 | minexponent: -999
|
---|
196 | precision: 9
|
---|
197 | mxgx201 maxmag 12345678000 1 -> 1.23456780E+10 Rounded
|
---|
198 | mxgx202 maxmag 1 12345678000 -> 1.23456780E+10 Rounded
|
---|
199 | mxgx203 maxmag 1234567800 1 -> 1.23456780E+9 Rounded
|
---|
200 | mxgx204 maxmag 1 1234567800 -> 1.23456780E+9 Rounded
|
---|
201 | mxgx205 maxmag 1234567890 1 -> 1.23456789E+9 Rounded
|
---|
202 | mxgx206 maxmag 1 1234567890 -> 1.23456789E+9 Rounded
|
---|
203 | mxgx207 maxmag 1234567891 1 -> 1.23456789E+9 Inexact Rounded
|
---|
204 | mxgx208 maxmag 1 1234567891 -> 1.23456789E+9 Inexact Rounded
|
---|
205 | mxgx209 maxmag 12345678901 1 -> 1.23456789E+10 Inexact Rounded
|
---|
206 | mxgx210 maxmag 1 12345678901 -> 1.23456789E+10 Inexact Rounded
|
---|
207 | mxgx211 maxmag 1234567896 1 -> 1.23456790E+9 Inexact Rounded
|
---|
208 | mxgx212 maxmag 1 1234567896 -> 1.23456790E+9 Inexact Rounded
|
---|
209 | mxgx213 maxmag -1234567891 1 -> -1.23456789E+9 Inexact Rounded
|
---|
210 | mxgx214 maxmag 1 -1234567891 -> -1.23456789E+9 Inexact Rounded
|
---|
211 | mxgx215 maxmag -12345678901 1 -> -1.23456789E+10 Inexact Rounded
|
---|
212 | mxgx216 maxmag 1 -12345678901 -> -1.23456789E+10 Inexact Rounded
|
---|
213 | mxgx217 maxmag -1234567896 1 -> -1.23456790E+9 Inexact Rounded
|
---|
214 | mxgx218 maxmag 1 -1234567896 -> -1.23456790E+9 Inexact Rounded
|
---|
215 |
|
---|
216 | precision: 15
|
---|
217 | mxgx221 maxmag 12345678000 1 -> 12345678000
|
---|
218 | mxgx222 maxmag 1 12345678000 -> 12345678000
|
---|
219 | mxgx223 maxmag 1234567800 1 -> 1234567800
|
---|
220 | mxgx224 maxmag 1 1234567800 -> 1234567800
|
---|
221 | mxgx225 maxmag 1234567890 1 -> 1234567890
|
---|
222 | mxgx226 maxmag 1 1234567890 -> 1234567890
|
---|
223 | mxgx227 maxmag 1234567891 1 -> 1234567891
|
---|
224 | mxgx228 maxmag 1 1234567891 -> 1234567891
|
---|
225 | mxgx229 maxmag 12345678901 1 -> 12345678901
|
---|
226 | mxgx230 maxmag 1 12345678901 -> 12345678901
|
---|
227 | mxgx231 maxmag 1234567896 1 -> 1234567896
|
---|
228 | mxgx232 maxmag 1 1234567896 -> 1234567896
|
---|
229 | mxgx233 maxmag -1234567891 1 -> -1234567891
|
---|
230 | mxgx234 maxmag 1 -1234567891 -> -1234567891
|
---|
231 | mxgx235 maxmag -12345678901 1 -> -12345678901
|
---|
232 | mxgx236 maxmag 1 -12345678901 -> -12345678901
|
---|
233 | mxgx237 maxmag -1234567896 1 -> -1234567896
|
---|
234 | mxgx238 maxmag 1 -1234567896 -> -1234567896
|
---|
235 |
|
---|
236 | -- from examples
|
---|
237 | mxgx280 maxmag '3' '2' -> '3'
|
---|
238 | mxgx281 maxmag '-10' '3' -> '-10'
|
---|
239 | mxgx282 maxmag '1.0' '1' -> '1'
|
---|
240 | mxgx283 maxmag '1' '1.0' -> '1'
|
---|
241 | mxgx284 maxmag '7' 'NaN' -> '7'
|
---|
242 |
|
---|
243 | -- overflow and underflow tests ...
|
---|
244 | maxExponent: 999999999
|
---|
245 | minexponent: -999999999
|
---|
246 | mxgx330 maxmag +1.23456789012345E-0 9E+999999999 -> 9E+999999999
|
---|
247 | mxgx331 maxmag 9E+999999999 +1.23456789012345E-0 -> 9E+999999999
|
---|
248 | mxgx332 maxmag +0.100 9E-999999999 -> 0.100
|
---|
249 | mxgx333 maxmag 9E-999999999 +0.100 -> 0.100
|
---|
250 | mxgx335 maxmag -1.23456789012345E-0 9E+999999999 -> 9E+999999999
|
---|
251 | mxgx336 maxmag 9E+999999999 -1.23456789012345E-0 -> 9E+999999999
|
---|
252 | mxgx337 maxmag -0.100 9E-999999999 -> -0.100
|
---|
253 | mxgx338 maxmag 9E-999999999 -0.100 -> -0.100
|
---|
254 |
|
---|
255 | mxgx339 maxmag 1e-599999999 1e-400000001 -> 1E-400000001
|
---|
256 | mxgx340 maxmag 1e-599999999 1e-400000000 -> 1E-400000000
|
---|
257 | mxgx341 maxmag 1e-600000000 1e-400000000 -> 1E-400000000
|
---|
258 | mxgx342 maxmag 9e-999999998 0.01 -> 0.01
|
---|
259 | mxgx343 maxmag 9e-999999998 0.1 -> 0.1
|
---|
260 | mxgx344 maxmag 0.01 9e-999999998 -> 0.01
|
---|
261 | mxgx345 maxmag 1e599999999 1e400000001 -> 1E+599999999
|
---|
262 | mxgx346 maxmag 1e599999999 1e400000000 -> 1E+599999999
|
---|
263 | mxgx347 maxmag 1e600000000 1e400000000 -> 1E+600000000
|
---|
264 | mxgx348 maxmag 9e999999998 100 -> 9E+999999998
|
---|
265 | mxgx349 maxmag 9e999999998 10 -> 9E+999999998
|
---|
266 | mxgx350 maxmag 100 9e999999998 -> 9E+999999998
|
---|
267 | -- signs
|
---|
268 | mxgx351 maxmag 1e+777777777 1e+411111111 -> 1E+777777777
|
---|
269 | mxgx352 maxmag 1e+777777777 -1e+411111111 -> 1E+777777777
|
---|
270 | mxgx353 maxmag -1e+777777777 1e+411111111 -> -1E+777777777
|
---|
271 | mxgx354 maxmag -1e+777777777 -1e+411111111 -> -1E+777777777
|
---|
272 | mxgx355 maxmag 1e-777777777 1e-411111111 -> 1E-411111111
|
---|
273 | mxgx356 maxmag 1e-777777777 -1e-411111111 -> -1E-411111111
|
---|
274 | mxgx357 maxmag -1e-777777777 1e-411111111 -> 1E-411111111
|
---|
275 | mxgx358 maxmag -1e-777777777 -1e-411111111 -> -1E-411111111
|
---|
276 |
|
---|
277 | -- expanded list from min/max 754r purple prose
|
---|
278 | -- [explicit tests for exponent ordering]
|
---|
279 | mxgx401 maxmag Inf 1.1 -> Infinity
|
---|
280 | mxgx402 maxmag 1.1 1 -> 1.1
|
---|
281 | mxgx403 maxmag 1 1.0 -> 1
|
---|
282 | mxgx404 maxmag 1.0 0.1 -> 1.0
|
---|
283 | mxgx405 maxmag 0.1 0.10 -> 0.1
|
---|
284 | mxgx406 maxmag 0.10 0.100 -> 0.10
|
---|
285 | mxgx407 maxmag 0.10 0 -> 0.10
|
---|
286 | mxgx408 maxmag 0 0.0 -> 0
|
---|
287 | mxgx409 maxmag 0.0 -0 -> 0.0
|
---|
288 | mxgx410 maxmag 0.0 -0.0 -> 0.0
|
---|
289 | mxgx411 maxmag 0.00 -0.0 -> 0.00
|
---|
290 | mxgx412 maxmag 0.0 -0.00 -> 0.0
|
---|
291 | mxgx413 maxmag 0 -0.0 -> 0
|
---|
292 | mxgx414 maxmag 0 -0 -> 0
|
---|
293 | mxgx415 maxmag -0.0 -0 -> -0.0
|
---|
294 | mxgx416 maxmag -0 -0.100 -> -0.100
|
---|
295 | mxgx417 maxmag -0.100 -0.10 -> -0.100
|
---|
296 | mxgx418 maxmag -0.10 -0.1 -> -0.10
|
---|
297 | mxgx419 maxmag -0.1 -1.0 -> -1.0
|
---|
298 | mxgx420 maxmag -1.0 -1 -> -1.0
|
---|
299 | mxgx421 maxmag -1 -1.1 -> -1.1
|
---|
300 | mxgx423 maxmag -1.1 -Inf -> -Infinity
|
---|
301 | -- same with operands reversed
|
---|
302 | mxgx431 maxmag 1.1 Inf -> Infinity
|
---|
303 | mxgx432 maxmag 1 1.1 -> 1.1
|
---|
304 | mxgx433 maxmag 1.0 1 -> 1
|
---|
305 | mxgx434 maxmag 0.1 1.0 -> 1.0
|
---|
306 | mxgx435 maxmag 0.10 0.1 -> 0.1
|
---|
307 | mxgx436 maxmag 0.100 0.10 -> 0.10
|
---|
308 | mxgx437 maxmag 0 0.10 -> 0.10
|
---|
309 | mxgx438 maxmag 0.0 0 -> 0
|
---|
310 | mxgx439 maxmag -0 0.0 -> 0.0
|
---|
311 | mxgx440 maxmag -0.0 0.0 -> 0.0
|
---|
312 | mxgx441 maxmag -0.0 0.00 -> 0.00
|
---|
313 | mxgx442 maxmag -0.00 0.0 -> 0.0
|
---|
314 | mxgx443 maxmag -0.0 0 -> 0
|
---|
315 | mxgx444 maxmag -0 0 -> 0
|
---|
316 | mxgx445 maxmag -0 -0.0 -> -0.0
|
---|
317 | mxgx446 maxmag -0.100 -0 -> -0.100
|
---|
318 | mxgx447 maxmag -0.10 -0.100 -> -0.100
|
---|
319 | mxgx448 maxmag -0.1 -0.10 -> -0.10
|
---|
320 | mxgx449 maxmag -1.0 -0.1 -> -1.0
|
---|
321 | mxgx450 maxmag -1 -1.0 -> -1.0
|
---|
322 | mxgx451 maxmag -1.1 -1 -> -1.1
|
---|
323 | mxgx453 maxmag -Inf -1.1 -> -Infinity
|
---|
324 | -- largies
|
---|
325 | mxgx460 maxmag 1000 1E+3 -> 1E+3
|
---|
326 | mxgx461 maxmag 1E+3 1000 -> 1E+3
|
---|
327 | mxgx462 maxmag 1000 -1E+3 -> 1000
|
---|
328 | mxgx463 maxmag 1E+3 -1000 -> 1E+3
|
---|
329 | mxgx464 maxmag -1000 1E+3 -> 1E+3
|
---|
330 | mxgx465 maxmag -1E+3 1000 -> 1000
|
---|
331 | mxgx466 maxmag -1000 -1E+3 -> -1000
|
---|
332 | mxgx467 maxmag -1E+3 -1000 -> -1000
|
---|
333 |
|
---|
334 | -- rounding (results treated as though plus)
|
---|
335 | maxexponent: 999999999
|
---|
336 | minexponent: -999999999
|
---|
337 | precision: 3
|
---|
338 |
|
---|
339 | mxgx470 maxmag 1 .5 -> 1
|
---|
340 | mxgx471 maxmag 10 5 -> 10
|
---|
341 | mxgx472 maxmag 100 50 -> 100
|
---|
342 | mxgx473 maxmag 1000 500 -> 1.00E+3 Rounded
|
---|
343 | mxgx474 maxmag 10000 5000 -> 1.00E+4 Rounded
|
---|
344 | mxgx475 maxmag 6 .5 -> 6
|
---|
345 | mxgx476 maxmag 66 5 -> 66
|
---|
346 | mxgx477 maxmag 666 50 -> 666
|
---|
347 | mxgx478 maxmag 6666 500 -> 6.67E+3 Rounded Inexact
|
---|
348 | mxgx479 maxmag 66666 5000 -> 6.67E+4 Rounded Inexact
|
---|
349 | mxgx480 maxmag 33333 5000 -> 3.33E+4 Rounded Inexact
|
---|
350 | mxgx481 maxmag .5 1 -> 1
|
---|
351 | mxgx482 maxmag .5 10 -> 10
|
---|
352 | mxgx483 maxmag .5 100 -> 100
|
---|
353 | mxgx484 maxmag .5 1000 -> 1.00E+3 Rounded
|
---|
354 | mxgx485 maxmag .5 10000 -> 1.00E+4 Rounded
|
---|
355 | mxgx486 maxmag .5 6 -> 6
|
---|
356 | mxgx487 maxmag .5 66 -> 66
|
---|
357 | mxgx488 maxmag .5 666 -> 666
|
---|
358 | mxgx489 maxmag .5 6666 -> 6.67E+3 Rounded Inexact
|
---|
359 | mxgx490 maxmag .5 66666 -> 6.67E+4 Rounded Inexact
|
---|
360 | mxgx491 maxmag .5 33333 -> 3.33E+4 Rounded Inexact
|
---|
361 |
|
---|
362 | -- overflow tests
|
---|
363 | maxexponent: 999999999
|
---|
364 | minexponent: -999999999
|
---|
365 | precision: 3
|
---|
366 | mxgx500 maxmag 9.999E+999999999 0 -> Infinity Inexact Overflow Rounded
|
---|
367 | mxgx501 maxmag -9.999E+999999999 0 -> -Infinity Inexact Overflow Rounded
|
---|
368 |
|
---|
369 | -- subnormals and underflow
|
---|
370 | precision: 3
|
---|
371 | maxexponent: 999
|
---|
372 | minexponent: -999
|
---|
373 | mxgx510 maxmag 1.00E-999 0 -> 1.00E-999
|
---|
374 | mxgx511 maxmag 0.1E-999 0 -> 1E-1000 Subnormal
|
---|
375 | mxgx512 maxmag 0.10E-999 0 -> 1.0E-1000 Subnormal
|
---|
376 | mxgx513 maxmag 0.100E-999 0 -> 1.0E-1000 Subnormal Rounded
|
---|
377 | mxgx514 maxmag 0.01E-999 0 -> 1E-1001 Subnormal
|
---|
378 | -- next is rounded to Nmin
|
---|
379 | mxgx515 maxmag 0.999E-999 0 -> 1.00E-999 Inexact Rounded Subnormal Underflow
|
---|
380 | mxgx516 maxmag 0.099E-999 0 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
|
---|
381 | mxgx517 maxmag 0.009E-999 0 -> 1E-1001 Inexact Rounded Subnormal Underflow
|
---|
382 | mxgx518 maxmag 0.001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
---|
383 | mxgx519 maxmag 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
---|
384 | mxgx520 maxmag 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
---|
385 |
|
---|
386 | mxgx530 maxmag -1.00E-999 0 -> -1.00E-999
|
---|
387 | mxgx531 maxmag -0.1E-999 0 -> -1E-1000 Subnormal
|
---|
388 | mxgx532 maxmag -0.10E-999 0 -> -1.0E-1000 Subnormal
|
---|
389 | mxgx533 maxmag -0.100E-999 0 -> -1.0E-1000 Subnormal Rounded
|
---|
390 | mxgx534 maxmag -0.01E-999 0 -> -1E-1001 Subnormal
|
---|
391 | -- next is rounded to -Nmin
|
---|
392 | mxgx535 maxmag -0.999E-999 0 -> -1.00E-999 Inexact Rounded Subnormal Underflow
|
---|
393 | mxgx536 maxmag -0.099E-999 0 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
|
---|
394 | mxgx537 maxmag -0.009E-999 0 -> -1E-1001 Inexact Rounded Subnormal Underflow
|
---|
395 | mxgx538 maxmag -0.001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
---|
396 | mxgx539 maxmag -0.0009E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
---|
397 | mxgx540 maxmag -0.0001E-999 0 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
---|
398 |
|
---|
399 | -- Null tests
|
---|
400 | mxgx900 maxmag 10 # -> NaN Invalid_operation
|
---|
401 | mxgx901 maxmag # 10 -> NaN Invalid_operation
|
---|
402 |
|
---|
403 |
|
---|
404 |
|
---|