PageRenderTime 269ms CodeModel.GetById 141ms app.highlight 7ms RepoModel.GetById 114ms app.codeStats 0ms

/Lib/test/decimaltestdata/ddCompareSig.decTest

http://unladen-swallow.googlecode.com/
Unknown | 647 lines | 610 code | 37 blank | 0 comment | 0 complexity | 547410a7f40ac4f929a99d327732dccf MD5 | raw file
  1------------------------------------------------------------------------
  2-- ddCompareSig.decTest -- decDouble comparison; all NaNs signal      --
  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-- Note that we cannot assume add/subtract tests cover paths adequately,
 23-- here, because the code might be quite different (comparison cannot
 24-- overflow or underflow, so actual subtractions are not necessary).
 25
 26-- All operands and results are decDoubles.
 27precision:   16
 28maxExponent: 384
 29minExponent: -383
 30extended:    1
 31clamp:       1
 32rounding:    half_even
 33
 34-- sanity checks
 35ddcms001 comparesig  -2  -2  -> 0
 36ddcms002 comparesig  -2  -1  -> -1
 37ddcms003 comparesig  -2   0  -> -1
 38ddcms004 comparesig  -2   1  -> -1
 39ddcms005 comparesig  -2   2  -> -1
 40ddcms006 comparesig  -1  -2  -> 1
 41ddcms007 comparesig  -1  -1  -> 0
 42ddcms008 comparesig  -1   0  -> -1
 43ddcms009 comparesig  -1   1  -> -1
 44ddcms010 comparesig  -1   2  -> -1
 45ddcms011 comparesig   0  -2  -> 1
 46ddcms012 comparesig   0  -1  -> 1
 47ddcms013 comparesig   0   0  -> 0
 48ddcms014 comparesig   0   1  -> -1
 49ddcms015 comparesig   0   2  -> -1
 50ddcms016 comparesig   1  -2  -> 1
 51ddcms017 comparesig   1  -1  -> 1
 52ddcms018 comparesig   1   0  -> 1
 53ddcms019 comparesig   1   1  -> 0
 54ddcms020 comparesig   1   2  -> -1
 55ddcms021 comparesig   2  -2  -> 1
 56ddcms022 comparesig   2  -1  -> 1
 57ddcms023 comparesig   2   0  -> 1
 58ddcms025 comparesig   2   1  -> 1
 59ddcms026 comparesig   2   2  -> 0
 60
 61ddcms031 comparesig  -20  -20  -> 0
 62ddcms032 comparesig  -20  -10  -> -1
 63ddcms033 comparesig  -20   00  -> -1
 64ddcms034 comparesig  -20   10  -> -1
 65ddcms035 comparesig  -20   20  -> -1
 66ddcms036 comparesig  -10  -20  -> 1
 67ddcms037 comparesig  -10  -10  -> 0
 68ddcms038 comparesig  -10   00  -> -1
 69ddcms039 comparesig  -10   10  -> -1
 70ddcms040 comparesig  -10   20  -> -1
 71ddcms041 comparesig   00  -20  -> 1
 72ddcms042 comparesig   00  -10  -> 1
 73ddcms043 comparesig   00   00  -> 0
 74ddcms044 comparesig   00   10  -> -1
 75ddcms045 comparesig   00   20  -> -1
 76ddcms046 comparesig   10  -20  -> 1
 77ddcms047 comparesig   10  -10  -> 1
 78ddcms048 comparesig   10   00  -> 1
 79ddcms049 comparesig   10   10  -> 0
 80ddcms050 comparesig   10   20  -> -1
 81ddcms051 comparesig   20  -20  -> 1
 82ddcms052 comparesig   20  -10  -> 1
 83ddcms053 comparesig   20   00  -> 1
 84ddcms055 comparesig   20   10  -> 1
 85ddcms056 comparesig   20   20  -> 0
 86
 87ddcms061 comparesig  -2.0  -2.0  -> 0
 88ddcms062 comparesig  -2.0  -1.0  -> -1
 89ddcms063 comparesig  -2.0   0.0  -> -1
 90ddcms064 comparesig  -2.0   1.0  -> -1
 91ddcms065 comparesig  -2.0   2.0  -> -1
 92ddcms066 comparesig  -1.0  -2.0  -> 1
 93ddcms067 comparesig  -1.0  -1.0  -> 0
 94ddcms068 comparesig  -1.0   0.0  -> -1
 95ddcms069 comparesig  -1.0   1.0  -> -1
 96ddcms070 comparesig  -1.0   2.0  -> -1
 97ddcms071 comparesig   0.0  -2.0  -> 1
 98ddcms072 comparesig   0.0  -1.0  -> 1
 99ddcms073 comparesig   0.0   0.0  -> 0
100ddcms074 comparesig   0.0   1.0  -> -1
101ddcms075 comparesig   0.0   2.0  -> -1
102ddcms076 comparesig   1.0  -2.0  -> 1
103ddcms077 comparesig   1.0  -1.0  -> 1
104ddcms078 comparesig   1.0   0.0  -> 1
105ddcms079 comparesig   1.0   1.0  -> 0
106ddcms080 comparesig   1.0   2.0  -> -1
107ddcms081 comparesig   2.0  -2.0  -> 1
108ddcms082 comparesig   2.0  -1.0  -> 1
109ddcms083 comparesig   2.0   0.0  -> 1
110ddcms085 comparesig   2.0   1.0  -> 1
111ddcms086 comparesig   2.0   2.0  -> 0
112
113-- now some cases which might overflow if subtract were used
114ddcms090 comparesig  9.999999999999999E+384 9.999999999999999E+384  -> 0
115ddcms091 comparesig -9.999999999999999E+384 9.999999999999999E+384  -> -1
116ddcms092 comparesig  9.999999999999999E+384 -9.999999999999999E+384 -> 1
117ddcms093 comparesig -9.999999999999999E+384 -9.999999999999999E+384 -> 0
118
119-- some differing length/exponent cases
120ddcms100 comparesig   7.0    7.0    -> 0
121ddcms101 comparesig   7.0    7      -> 0
122ddcms102 comparesig   7      7.0    -> 0
123ddcms103 comparesig   7E+0   7.0    -> 0
124ddcms104 comparesig   70E-1  7.0    -> 0
125ddcms105 comparesig   0.7E+1 7      -> 0
126ddcms106 comparesig   70E-1  7      -> 0
127ddcms107 comparesig   7.0    7E+0   -> 0
128ddcms108 comparesig   7.0    70E-1  -> 0
129ddcms109 comparesig   7      0.7E+1 -> 0
130ddcms110 comparesig   7      70E-1  -> 0
131
132ddcms120 comparesig   8.0    7.0    -> 1
133ddcms121 comparesig   8.0    7      -> 1
134ddcms122 comparesig   8      7.0    -> 1
135ddcms123 comparesig   8E+0   7.0    -> 1
136ddcms124 comparesig   80E-1  7.0    -> 1
137ddcms125 comparesig   0.8E+1 7      -> 1
138ddcms126 comparesig   80E-1  7      -> 1
139ddcms127 comparesig   8.0    7E+0   -> 1
140ddcms128 comparesig   8.0    70E-1  -> 1
141ddcms129 comparesig   8      0.7E+1  -> 1
142ddcms130 comparesig   8      70E-1  -> 1
143
144ddcms140 comparesig   8.0    9.0    -> -1
145ddcms141 comparesig   8.0    9      -> -1
146ddcms142 comparesig   8      9.0    -> -1
147ddcms143 comparesig   8E+0   9.0    -> -1
148ddcms144 comparesig   80E-1  9.0    -> -1
149ddcms145 comparesig   0.8E+1 9      -> -1
150ddcms146 comparesig   80E-1  9      -> -1
151ddcms147 comparesig   8.0    9E+0   -> -1
152ddcms148 comparesig   8.0    90E-1  -> -1
153ddcms149 comparesig   8      0.9E+1 -> -1
154ddcms150 comparesig   8      90E-1  -> -1
155
156-- and again, with sign changes -+ ..
157ddcms200 comparesig  -7.0    7.0    -> -1
158ddcms201 comparesig  -7.0    7      -> -1
159ddcms202 comparesig  -7      7.0    -> -1
160ddcms203 comparesig  -7E+0   7.0    -> -1
161ddcms204 comparesig  -70E-1  7.0    -> -1
162ddcms205 comparesig  -0.7E+1 7      -> -1
163ddcms206 comparesig  -70E-1  7      -> -1
164ddcms207 comparesig  -7.0    7E+0   -> -1
165ddcms208 comparesig  -7.0    70E-1  -> -1
166ddcms209 comparesig  -7      0.7E+1 -> -1
167ddcms210 comparesig  -7      70E-1  -> -1
168
169ddcms220 comparesig  -8.0    7.0    -> -1
170ddcms221 comparesig  -8.0    7      -> -1
171ddcms222 comparesig  -8      7.0    -> -1
172ddcms223 comparesig  -8E+0   7.0    -> -1
173ddcms224 comparesig  -80E-1  7.0    -> -1
174ddcms225 comparesig  -0.8E+1 7      -> -1
175ddcms226 comparesig  -80E-1  7      -> -1
176ddcms227 comparesig  -8.0    7E+0   -> -1
177ddcms228 comparesig  -8.0    70E-1  -> -1
178ddcms229 comparesig  -8      0.7E+1 -> -1
179ddcms230 comparesig  -8      70E-1  -> -1
180
181ddcms240 comparesig  -8.0    9.0    -> -1
182ddcms241 comparesig  -8.0    9      -> -1
183ddcms242 comparesig  -8      9.0    -> -1
184ddcms243 comparesig  -8E+0   9.0    -> -1
185ddcms244 comparesig  -80E-1  9.0    -> -1
186ddcms245 comparesig  -0.8E+1 9      -> -1
187ddcms246 comparesig  -80E-1  9      -> -1
188ddcms247 comparesig  -8.0    9E+0   -> -1
189ddcms248 comparesig  -8.0    90E-1  -> -1
190ddcms249 comparesig  -8      0.9E+1 -> -1
191ddcms250 comparesig  -8      90E-1  -> -1
192
193-- and again, with sign changes +- ..
194ddcms300 comparesig   7.0    -7.0    -> 1
195ddcms301 comparesig   7.0    -7      -> 1
196ddcms302 comparesig   7      -7.0    -> 1
197ddcms303 comparesig   7E+0   -7.0    -> 1
198ddcms304 comparesig   70E-1  -7.0    -> 1
199ddcms305 comparesig   .7E+1  -7      -> 1
200ddcms306 comparesig   70E-1  -7      -> 1
201ddcms307 comparesig   7.0    -7E+0   -> 1
202ddcms308 comparesig   7.0    -70E-1  -> 1
203ddcms309 comparesig   7      -.7E+1  -> 1
204ddcms310 comparesig   7      -70E-1  -> 1
205
206ddcms320 comparesig   8.0    -7.0    -> 1
207ddcms321 comparesig   8.0    -7      -> 1
208ddcms322 comparesig   8      -7.0    -> 1
209ddcms323 comparesig   8E+0   -7.0    -> 1
210ddcms324 comparesig   80E-1  -7.0    -> 1
211ddcms325 comparesig   .8E+1  -7      -> 1
212ddcms326 comparesig   80E-1  -7      -> 1
213ddcms327 comparesig   8.0    -7E+0   -> 1
214ddcms328 comparesig   8.0    -70E-1  -> 1
215ddcms329 comparesig   8      -.7E+1  -> 1
216ddcms330 comparesig   8      -70E-1  -> 1
217
218ddcms340 comparesig   8.0    -9.0    -> 1
219ddcms341 comparesig   8.0    -9      -> 1
220ddcms342 comparesig   8      -9.0    -> 1
221ddcms343 comparesig   8E+0   -9.0    -> 1
222ddcms344 comparesig   80E-1  -9.0    -> 1
223ddcms345 comparesig   .8E+1  -9      -> 1
224ddcms346 comparesig   80E-1  -9      -> 1
225ddcms347 comparesig   8.0    -9E+0   -> 1
226ddcms348 comparesig   8.0    -90E-1  -> 1
227ddcms349 comparesig   8      -.9E+1  -> 1
228ddcms350 comparesig   8      -90E-1  -> 1
229
230-- and again, with sign changes -- ..
231ddcms400 comparesig   -7.0    -7.0    -> 0
232ddcms401 comparesig   -7.0    -7      -> 0
233ddcms402 comparesig   -7      -7.0    -> 0
234ddcms403 comparesig   -7E+0   -7.0    -> 0
235ddcms404 comparesig   -70E-1  -7.0    -> 0
236ddcms405 comparesig   -.7E+1  -7      -> 0
237ddcms406 comparesig   -70E-1  -7      -> 0
238ddcms407 comparesig   -7.0    -7E+0   -> 0
239ddcms408 comparesig   -7.0    -70E-1  -> 0
240ddcms409 comparesig   -7      -.7E+1  -> 0
241ddcms410 comparesig   -7      -70E-1  -> 0
242
243ddcms420 comparesig   -8.0    -7.0    -> -1
244ddcms421 comparesig   -8.0    -7      -> -1
245ddcms422 comparesig   -8      -7.0    -> -1
246ddcms423 comparesig   -8E+0   -7.0    -> -1
247ddcms424 comparesig   -80E-1  -7.0    -> -1
248ddcms425 comparesig   -.8E+1  -7      -> -1
249ddcms426 comparesig   -80E-1  -7      -> -1
250ddcms427 comparesig   -8.0    -7E+0   -> -1
251ddcms428 comparesig   -8.0    -70E-1  -> -1
252ddcms429 comparesig   -8      -.7E+1  -> -1
253ddcms430 comparesig   -8      -70E-1  -> -1
254
255ddcms440 comparesig   -8.0    -9.0    -> 1
256ddcms441 comparesig   -8.0    -9      -> 1
257ddcms442 comparesig   -8      -9.0    -> 1
258ddcms443 comparesig   -8E+0   -9.0    -> 1
259ddcms444 comparesig   -80E-1  -9.0    -> 1
260ddcms445 comparesig   -.8E+1  -9      -> 1
261ddcms446 comparesig   -80E-1  -9      -> 1
262ddcms447 comparesig   -8.0    -9E+0   -> 1
263ddcms448 comparesig   -8.0    -90E-1  -> 1
264ddcms449 comparesig   -8      -.9E+1  -> 1
265ddcms450 comparesig   -8      -90E-1  -> 1
266
267
268-- testcases that subtract to lots of zeros at boundaries [pgr]
269ddcms473 comparesig 123.4560000000000E-89 123.456E-89 -> 0
270ddcms474 comparesig 123.456000000000E+89 123.456E+89 -> 0
271ddcms475 comparesig 123.45600000000E-89 123.456E-89 -> 0
272ddcms476 comparesig 123.4560000000E+89 123.456E+89 -> 0
273ddcms477 comparesig 123.456000000E-89 123.456E-89 -> 0
274ddcms478 comparesig 123.45600000E+89 123.456E+89 -> 0
275ddcms479 comparesig 123.4560000E-89 123.456E-89 -> 0
276ddcms480 comparesig 123.456000E+89 123.456E+89 -> 0
277ddcms481 comparesig 123.45600E-89 123.456E-89 -> 0
278ddcms482 comparesig 123.4560E+89 123.456E+89 -> 0
279ddcms483 comparesig 123.456E-89 123.456E-89 -> 0
280ddcms487 comparesig 123.456E+89 123.4560000000000E+89 -> 0
281ddcms488 comparesig 123.456E-89 123.456000000000E-89 -> 0
282ddcms489 comparesig 123.456E+89 123.45600000000E+89 -> 0
283ddcms490 comparesig 123.456E-89 123.4560000000E-89 -> 0
284ddcms491 comparesig 123.456E+89 123.456000000E+89 -> 0
285ddcms492 comparesig 123.456E-89 123.45600000E-89 -> 0
286ddcms493 comparesig 123.456E+89 123.4560000E+89 -> 0
287ddcms494 comparesig 123.456E-89 123.456000E-89 -> 0
288ddcms495 comparesig 123.456E+89 123.45600E+89 -> 0
289ddcms496 comparesig 123.456E-89 123.4560E-89 -> 0
290ddcms497 comparesig 123.456E+89 123.456E+89 -> 0
291
292-- wide-ranging, around precision; signs equal
293ddcms500 comparesig    1     1E-15    -> 1
294ddcms501 comparesig    1     1E-14    -> 1
295ddcms502 comparesig    1     1E-13    -> 1
296ddcms503 comparesig    1     1E-12    -> 1
297ddcms504 comparesig    1     1E-11    -> 1
298ddcms505 comparesig    1     1E-10    -> 1
299ddcms506 comparesig    1     1E-9     -> 1
300ddcms507 comparesig    1     1E-8     -> 1
301ddcms508 comparesig    1     1E-7     -> 1
302ddcms509 comparesig    1     1E-6     -> 1
303ddcms510 comparesig    1     1E-5     -> 1
304ddcms511 comparesig    1     1E-4     -> 1
305ddcms512 comparesig    1     1E-3     -> 1
306ddcms513 comparesig    1     1E-2     -> 1
307ddcms514 comparesig    1     1E-1     -> 1
308ddcms515 comparesig    1     1E-0     -> 0
309ddcms516 comparesig    1     1E+1     -> -1
310ddcms517 comparesig    1     1E+2     -> -1
311ddcms518 comparesig    1     1E+3     -> -1
312ddcms519 comparesig    1     1E+4     -> -1
313ddcms521 comparesig    1     1E+5     -> -1
314ddcms522 comparesig    1     1E+6     -> -1
315ddcms523 comparesig    1     1E+7     -> -1
316ddcms524 comparesig    1     1E+8     -> -1
317ddcms525 comparesig    1     1E+9     -> -1
318ddcms526 comparesig    1     1E+10    -> -1
319ddcms527 comparesig    1     1E+11    -> -1
320ddcms528 comparesig    1     1E+12    -> -1
321ddcms529 comparesig    1     1E+13    -> -1
322ddcms530 comparesig    1     1E+14    -> -1
323ddcms531 comparesig    1     1E+15    -> -1
324-- LR swap
325ddcms540 comparesig    1E-15  1       -> -1
326ddcms541 comparesig    1E-14  1       -> -1
327ddcms542 comparesig    1E-13  1       -> -1
328ddcms543 comparesig    1E-12  1       -> -1
329ddcms544 comparesig    1E-11  1       -> -1
330ddcms545 comparesig    1E-10  1       -> -1
331ddcms546 comparesig    1E-9   1       -> -1
332ddcms547 comparesig    1E-8   1       -> -1
333ddcms548 comparesig    1E-7   1       -> -1
334ddcms549 comparesig    1E-6   1       -> -1
335ddcms550 comparesig    1E-5   1       -> -1
336ddcms551 comparesig    1E-4   1       -> -1
337ddcms552 comparesig    1E-3   1       -> -1
338ddcms553 comparesig    1E-2   1       -> -1
339ddcms554 comparesig    1E-1   1       -> -1
340ddcms555 comparesig    1E-0   1       ->  0
341ddcms556 comparesig    1E+1   1       ->  1
342ddcms557 comparesig    1E+2   1       ->  1
343ddcms558 comparesig    1E+3   1       ->  1
344ddcms559 comparesig    1E+4   1       ->  1
345ddcms561 comparesig    1E+5   1       ->  1
346ddcms562 comparesig    1E+6   1       ->  1
347ddcms563 comparesig    1E+7   1       ->  1
348ddcms564 comparesig    1E+8   1       ->  1
349ddcms565 comparesig    1E+9   1       ->  1
350ddcms566 comparesig    1E+10  1       ->  1
351ddcms567 comparesig    1E+11  1       ->  1
352ddcms568 comparesig    1E+12  1       ->  1
353ddcms569 comparesig    1E+13  1       ->  1
354ddcms570 comparesig    1E+14  1       ->  1
355ddcms571 comparesig    1E+15  1       ->  1
356-- similar with a useful coefficient, one side only
357ddcms580 comparesig  0.000000987654321     1E-15    -> 1
358ddcms581 comparesig  0.000000987654321     1E-14    -> 1
359ddcms582 comparesig  0.000000987654321     1E-13    -> 1
360ddcms583 comparesig  0.000000987654321     1E-12    -> 1
361ddcms584 comparesig  0.000000987654321     1E-11    -> 1
362ddcms585 comparesig  0.000000987654321     1E-10    -> 1
363ddcms586 comparesig  0.000000987654321     1E-9     -> 1
364ddcms587 comparesig  0.000000987654321     1E-8     -> 1
365ddcms588 comparesig  0.000000987654321     1E-7     -> 1
366ddcms589 comparesig  0.000000987654321     1E-6     -> -1
367ddcms590 comparesig  0.000000987654321     1E-5     -> -1
368ddcms591 comparesig  0.000000987654321     1E-4     -> -1
369ddcms592 comparesig  0.000000987654321     1E-3     -> -1
370ddcms593 comparesig  0.000000987654321     1E-2     -> -1
371ddcms594 comparesig  0.000000987654321     1E-1     -> -1
372ddcms595 comparesig  0.000000987654321     1E-0     -> -1
373ddcms596 comparesig  0.000000987654321     1E+1     -> -1
374ddcms597 comparesig  0.000000987654321     1E+2     -> -1
375ddcms598 comparesig  0.000000987654321     1E+3     -> -1
376ddcms599 comparesig  0.000000987654321     1E+4     -> -1
377
378-- check some unit-y traps
379ddcms600 comparesig   12            12.2345 -> -1
380ddcms601 comparesig   12.0          12.2345 -> -1
381ddcms602 comparesig   12.00         12.2345 -> -1
382ddcms603 comparesig   12.000        12.2345 -> -1
383ddcms604 comparesig   12.0000       12.2345 -> -1
384ddcms605 comparesig   12.00000      12.2345 -> -1
385ddcms606 comparesig   12.000000     12.2345 -> -1
386ddcms607 comparesig   12.0000000    12.2345 -> -1
387ddcms608 comparesig   12.00000000   12.2345 -> -1
388ddcms609 comparesig   12.000000000  12.2345 -> -1
389ddcms610 comparesig   12.1234 12            ->  1
390ddcms611 comparesig   12.1234 12.0          ->  1
391ddcms612 comparesig   12.1234 12.00         ->  1
392ddcms613 comparesig   12.1234 12.000        ->  1
393ddcms614 comparesig   12.1234 12.0000       ->  1
394ddcms615 comparesig   12.1234 12.00000      ->  1
395ddcms616 comparesig   12.1234 12.000000     ->  1
396ddcms617 comparesig   12.1234 12.0000000    ->  1
397ddcms618 comparesig   12.1234 12.00000000   ->  1
398ddcms619 comparesig   12.1234 12.000000000  ->  1
399ddcms620 comparesig  -12           -12.2345 ->  1
400ddcms621 comparesig  -12.0         -12.2345 ->  1
401ddcms622 comparesig  -12.00        -12.2345 ->  1
402ddcms623 comparesig  -12.000       -12.2345 ->  1
403ddcms624 comparesig  -12.0000      -12.2345 ->  1
404ddcms625 comparesig  -12.00000     -12.2345 ->  1
405ddcms626 comparesig  -12.000000    -12.2345 ->  1
406ddcms627 comparesig  -12.0000000   -12.2345 ->  1
407ddcms628 comparesig  -12.00000000  -12.2345 ->  1
408ddcms629 comparesig  -12.000000000 -12.2345 ->  1
409ddcms630 comparesig  -12.1234 -12           -> -1
410ddcms631 comparesig  -12.1234 -12.0         -> -1
411ddcms632 comparesig  -12.1234 -12.00        -> -1
412ddcms633 comparesig  -12.1234 -12.000       -> -1
413ddcms634 comparesig  -12.1234 -12.0000      -> -1
414ddcms635 comparesig  -12.1234 -12.00000     -> -1
415ddcms636 comparesig  -12.1234 -12.000000    -> -1
416ddcms637 comparesig  -12.1234 -12.0000000   -> -1
417ddcms638 comparesig  -12.1234 -12.00000000  -> -1
418ddcms639 comparesig  -12.1234 -12.000000000 -> -1
419
420-- extended zeros
421ddcms640 comparesig   0     0   -> 0
422ddcms641 comparesig   0    -0   -> 0
423ddcms642 comparesig   0    -0.0 -> 0
424ddcms643 comparesig   0     0.0 -> 0
425ddcms644 comparesig  -0     0   -> 0
426ddcms645 comparesig  -0    -0   -> 0
427ddcms646 comparesig  -0    -0.0 -> 0
428ddcms647 comparesig  -0     0.0 -> 0
429ddcms648 comparesig   0.0   0   -> 0
430ddcms649 comparesig   0.0  -0   -> 0
431ddcms650 comparesig   0.0  -0.0 -> 0
432ddcms651 comparesig   0.0   0.0 -> 0
433ddcms652 comparesig  -0.0   0   -> 0
434ddcms653 comparesig  -0.0  -0   -> 0
435ddcms654 comparesig  -0.0  -0.0 -> 0
436ddcms655 comparesig  -0.0   0.0 -> 0
437
438ddcms656 comparesig  -0E1   0.0 -> 0
439ddcms657 comparesig  -0E2   0.0 -> 0
440ddcms658 comparesig   0E1   0.0 -> 0
441ddcms659 comparesig   0E2   0.0 -> 0
442ddcms660 comparesig  -0E1   0   -> 0
443ddcms661 comparesig  -0E2   0   -> 0
444ddcms662 comparesig   0E1   0   -> 0
445ddcms663 comparesig   0E2   0   -> 0
446ddcms664 comparesig  -0E1  -0E1 -> 0
447ddcms665 comparesig  -0E2  -0E1 -> 0
448ddcms666 comparesig   0E1  -0E1 -> 0
449ddcms667 comparesig   0E2  -0E1 -> 0
450ddcms668 comparesig  -0E1  -0E2 -> 0
451ddcms669 comparesig  -0E2  -0E2 -> 0
452ddcms670 comparesig   0E1  -0E2 -> 0
453ddcms671 comparesig   0E2  -0E2 -> 0
454ddcms672 comparesig  -0E1   0E1 -> 0
455ddcms673 comparesig  -0E2   0E1 -> 0
456ddcms674 comparesig   0E1   0E1 -> 0
457ddcms675 comparesig   0E2   0E1 -> 0
458ddcms676 comparesig  -0E1   0E2 -> 0
459ddcms677 comparesig  -0E2   0E2 -> 0
460ddcms678 comparesig   0E1   0E2 -> 0
461ddcms679 comparesig   0E2   0E2 -> 0
462
463-- trailing zeros; unit-y
464ddcms680 comparesig   12    12           -> 0
465ddcms681 comparesig   12    12.0         -> 0
466ddcms682 comparesig   12    12.00        -> 0
467ddcms683 comparesig   12    12.000       -> 0
468ddcms684 comparesig   12    12.0000      -> 0
469ddcms685 comparesig   12    12.00000     -> 0
470ddcms686 comparesig   12    12.000000    -> 0
471ddcms687 comparesig   12    12.0000000   -> 0
472ddcms688 comparesig   12    12.00000000  -> 0
473ddcms689 comparesig   12    12.000000000 -> 0
474ddcms690 comparesig   12              12 -> 0
475ddcms691 comparesig   12.0            12 -> 0
476ddcms692 comparesig   12.00           12 -> 0
477ddcms693 comparesig   12.000          12 -> 0
478ddcms694 comparesig   12.0000         12 -> 0
479ddcms695 comparesig   12.00000        12 -> 0
480ddcms696 comparesig   12.000000       12 -> 0
481ddcms697 comparesig   12.0000000      12 -> 0
482ddcms698 comparesig   12.00000000     12 -> 0
483ddcms699 comparesig   12.000000000    12 -> 0
484
485-- first, second, & last digit
486ddcms700 comparesig   1234567890123456 1234567890123455 -> 1
487ddcms701 comparesig   1234567890123456 1234567890123456 -> 0
488ddcms702 comparesig   1234567890123456 1234567890123457 -> -1
489ddcms703 comparesig   1234567890123456 0234567890123456 -> 1
490ddcms704 comparesig   1234567890123456 1234567890123456 -> 0
491ddcms705 comparesig   1234567890123456 2234567890123456 -> -1
492ddcms706 comparesig   1134567890123456 1034567890123456 -> 1
493ddcms707 comparesig   1134567890123456 1134567890123456 -> 0
494ddcms708 comparesig   1134567890123456 1234567890123456 -> -1
495
496-- miscellaneous
497ddcms721 comparesig 12345678000 1 -> 1
498ddcms722 comparesig 1 12345678000 -> -1
499ddcms723 comparesig 1234567800  1 -> 1
500ddcms724 comparesig 1 1234567800  -> -1
501ddcms725 comparesig 1234567890  1 -> 1
502ddcms726 comparesig 1 1234567890  -> -1
503ddcms727 comparesig 1234567891  1 -> 1
504ddcms728 comparesig 1 1234567891  -> -1
505ddcms729 comparesig 12345678901 1 -> 1
506ddcms730 comparesig 1 12345678901 -> -1
507ddcms731 comparesig 1234567896  1 -> 1
508ddcms732 comparesig 1 1234567896  -> -1
509
510-- residue cases at lower precision
511ddcms740 comparesig  1  0.9999999  -> 1
512ddcms741 comparesig  1  0.999999   -> 1
513ddcms742 comparesig  1  0.99999    -> 1
514ddcms743 comparesig  1  1.0000     -> 0
515ddcms744 comparesig  1  1.00001    -> -1
516ddcms745 comparesig  1  1.000001   -> -1
517ddcms746 comparesig  1  1.0000001  -> -1
518ddcms750 comparesig  0.9999999  1  -> -1
519ddcms751 comparesig  0.999999   1  -> -1
520ddcms752 comparesig  0.99999    1  -> -1
521ddcms753 comparesig  1.0000     1  -> 0
522ddcms754 comparesig  1.00001    1  -> 1
523ddcms755 comparesig  1.000001   1  -> 1
524ddcms756 comparesig  1.0000001  1  -> 1
525
526-- Specials
527ddcms780 comparesig  Inf  -Inf   ->  1
528ddcms781 comparesig  Inf  -1000  ->  1
529ddcms782 comparesig  Inf  -1     ->  1
530ddcms783 comparesig  Inf  -0     ->  1
531ddcms784 comparesig  Inf   0     ->  1
532ddcms785 comparesig  Inf   1     ->  1
533ddcms786 comparesig  Inf   1000  ->  1
534ddcms787 comparesig  Inf   Inf   ->  0
535ddcms788 comparesig -1000  Inf   -> -1
536ddcms789 comparesig -Inf   Inf   -> -1
537ddcms790 comparesig -1     Inf   -> -1
538ddcms791 comparesig -0     Inf   -> -1
539ddcms792 comparesig  0     Inf   -> -1
540ddcms793 comparesig  1     Inf   -> -1
541ddcms794 comparesig  1000  Inf   -> -1
542ddcms795 comparesig  Inf   Inf   ->  0
543
544ddcms800 comparesig -Inf  -Inf   ->  0
545ddcms801 comparesig -Inf  -1000  -> -1
546ddcms802 comparesig -Inf  -1     -> -1
547ddcms803 comparesig -Inf  -0     -> -1
548ddcms804 comparesig -Inf   0     -> -1
549ddcms805 comparesig -Inf   1     -> -1
550ddcms806 comparesig -Inf   1000  -> -1
551ddcms807 comparesig -Inf   Inf   -> -1
552ddcms808 comparesig -Inf  -Inf   ->  0
553ddcms809 comparesig -1000 -Inf   ->  1
554ddcms810 comparesig -1    -Inf   ->  1
555ddcms811 comparesig -0    -Inf   ->  1
556ddcms812 comparesig  0    -Inf   ->  1
557ddcms813 comparesig  1    -Inf   ->  1
558ddcms814 comparesig  1000 -Inf   ->  1
559ddcms815 comparesig  Inf  -Inf   ->  1
560
561ddcms821 comparesig  NaN -Inf    ->  NaN  Invalid_operation
562ddcms822 comparesig  NaN -1000   ->  NaN  Invalid_operation
563ddcms823 comparesig  NaN -1      ->  NaN  Invalid_operation
564ddcms824 comparesig  NaN -0      ->  NaN  Invalid_operation
565ddcms825 comparesig  NaN  0      ->  NaN  Invalid_operation
566ddcms826 comparesig  NaN  1      ->  NaN  Invalid_operation
567ddcms827 comparesig  NaN  1000   ->  NaN  Invalid_operation
568ddcms828 comparesig  NaN  Inf    ->  NaN  Invalid_operation
569ddcms829 comparesig  NaN  NaN    ->  NaN  Invalid_operation
570ddcms830 comparesig -Inf  NaN    ->  NaN  Invalid_operation
571ddcms831 comparesig -1000 NaN    ->  NaN  Invalid_operation
572ddcms832 comparesig -1    NaN    ->  NaN  Invalid_operation
573ddcms833 comparesig -0    NaN    ->  NaN  Invalid_operation
574ddcms834 comparesig  0    NaN    ->  NaN  Invalid_operation
575ddcms835 comparesig  1    NaN    ->  NaN  Invalid_operation
576ddcms836 comparesig  1000 NaN    ->  NaN  Invalid_operation
577ddcms837 comparesig  Inf  NaN    ->  NaN  Invalid_operation
578ddcms838 comparesig -NaN -NaN    -> -NaN  Invalid_operation
579ddcms839 comparesig +NaN -NaN    ->  NaN  Invalid_operation
580ddcms840 comparesig -NaN +NaN    -> -NaN  Invalid_operation
581
582ddcms841 comparesig  sNaN -Inf   ->  NaN  Invalid_operation
583ddcms842 comparesig  sNaN -1000  ->  NaN  Invalid_operation
584ddcms843 comparesig  sNaN -1     ->  NaN  Invalid_operation
585ddcms844 comparesig  sNaN -0     ->  NaN  Invalid_operation
586ddcms845 comparesig  sNaN  0     ->  NaN  Invalid_operation
587ddcms846 comparesig  sNaN  1     ->  NaN  Invalid_operation
588ddcms847 comparesig  sNaN  1000  ->  NaN  Invalid_operation
589ddcms848 comparesig  sNaN  NaN   ->  NaN  Invalid_operation
590ddcms849 comparesig  sNaN sNaN   ->  NaN  Invalid_operation
591ddcms850 comparesig  NaN  sNaN   ->  NaN  Invalid_operation
592ddcms851 comparesig -Inf  sNaN   ->  NaN  Invalid_operation
593ddcms852 comparesig -1000 sNaN   ->  NaN  Invalid_operation
594ddcms853 comparesig -1    sNaN   ->  NaN  Invalid_operation
595ddcms854 comparesig -0    sNaN   ->  NaN  Invalid_operation
596ddcms855 comparesig  0    sNaN   ->  NaN  Invalid_operation
597ddcms856 comparesig  1    sNaN   ->  NaN  Invalid_operation
598ddcms857 comparesig  1000 sNaN   ->  NaN  Invalid_operation
599ddcms858 comparesig  Inf  sNaN   ->  NaN  Invalid_operation
600ddcms859 comparesig  NaN  sNaN   ->  NaN  Invalid_operation
601
602-- propagating NaNs
603ddcms860 comparesig  NaN9 -Inf   ->  NaN9   Invalid_operation
604ddcms861 comparesig  NaN8  999   ->  NaN8   Invalid_operation
605ddcms862 comparesig  NaN77 Inf   ->  NaN77  Invalid_operation
606ddcms863 comparesig -NaN67 NaN5  -> -NaN67  Invalid_operation
607ddcms864 comparesig -Inf  -NaN4  -> -NaN4   Invalid_operation
608ddcms865 comparesig -999  -NaN33 -> -NaN33  Invalid_operation
609ddcms866 comparesig  Inf   NaN2  ->  NaN2   Invalid_operation
610ddcms867 comparesig -NaN41 -NaN42 -> -NaN41 Invalid_operation
611ddcms868 comparesig +NaN41 -NaN42 ->  NaN41 Invalid_operation
612ddcms869 comparesig -NaN41 +NaN42 -> -NaN41 Invalid_operation
613ddcms870 comparesig +NaN41 +NaN42 ->  NaN41 Invalid_operation
614
615ddcms871 comparesig -sNaN99 -Inf    -> -NaN99 Invalid_operation
616ddcms872 comparesig  sNaN98 -11     ->  NaN98 Invalid_operation
617ddcms873 comparesig  sNaN97  NaN    ->  NaN97 Invalid_operation
618ddcms874 comparesig  sNaN16 sNaN94  ->  NaN16 Invalid_operation
619ddcms875 comparesig  NaN85  sNaN83  ->  NaN83 Invalid_operation
620ddcms876 comparesig -Inf    sNaN92  ->  NaN92 Invalid_operation
621ddcms877 comparesig  088    sNaN81  ->  NaN81 Invalid_operation
622ddcms878 comparesig  Inf    sNaN90  ->  NaN90 Invalid_operation
623ddcms879 comparesig  NaN   -sNaN89  -> -NaN89 Invalid_operation
624
625-- wide range
626ddcms880 comparesig +1.23456789012345E-0 9E+384 -> -1
627ddcms881 comparesig 9E+384 +1.23456789012345E-0 ->  1
628ddcms882 comparesig +0.100 9E-383               ->  1
629ddcms883 comparesig 9E-383 +0.100               -> -1
630ddcms885 comparesig -1.23456789012345E-0 9E+384 -> -1
631ddcms886 comparesig 9E+384 -1.23456789012345E-0 ->  1
632ddcms887 comparesig -0.100 9E-383               -> -1
633ddcms888 comparesig 9E-383 -0.100               ->  1
634
635-- signs
636ddcms901 comparesig  1e+77  1e+11 ->  1
637ddcms902 comparesig  1e+77 -1e+11 ->  1
638ddcms903 comparesig -1e+77  1e+11 -> -1
639ddcms904 comparesig -1e+77 -1e+11 -> -1
640ddcms905 comparesig  1e-77  1e-11 -> -1
641ddcms906 comparesig  1e-77 -1e-11 ->  1
642ddcms907 comparesig -1e-77  1e-11 -> -1
643ddcms908 comparesig -1e-77 -1e-11 ->  1
644
645-- Null tests
646ddcms990 comparesig 10  # -> NaN Invalid_operation
647ddcms991 comparesig  # 10 -> NaN Invalid_operation