Thomas Wouters | 1b7f891 | 2007-09-19 03:06:30 +0000 | [diff] [blame] | 1 | ------------------------------------------------------------------------
|
| 2 | -- dqMinus.decTest -- decQuad 0-x --
|
Benjamin Peterson | f17ff4e | 2008-07-31 16:32:12 +0000 | [diff] [blame] | 3 | -- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
Thomas Wouters | 1b7f891 | 2007-09-19 03:06:30 +0000 | [diff] [blame] | 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 | ------------------------------------------------------------------------
|
Mark Dickinson | 8a54653 | 2009-10-08 16:30:38 +0000 | [diff] [blame] | 20 | version: 2.59
|
Thomas Wouters | 1b7f891 | 2007-09-19 03:06:30 +0000 | [diff] [blame] | 21 |
|
| 22 | -- All operands and results are decQuads.
|
| 23 | extended: 1
|
| 24 | clamp: 1
|
| 25 | precision: 34
|
| 26 | maxExponent: 6144
|
| 27 | minExponent: -6143
|
| 28 | rounding: half_even
|
| 29 |
|
| 30 | -- Sanity check
|
| 31 | dqmns001 minus +7.50 -> -7.50
|
| 32 |
|
| 33 | -- Infinities
|
| 34 | dqmns011 minus Infinity -> -Infinity
|
| 35 | dqmns012 minus -Infinity -> Infinity
|
| 36 |
|
| 37 | -- NaNs, 0 payload
|
| 38 | dqmns021 minus NaN -> NaN
|
| 39 | dqmns022 minus -NaN -> -NaN
|
| 40 | dqmns023 minus sNaN -> NaN Invalid_operation
|
| 41 | dqmns024 minus -sNaN -> -NaN Invalid_operation
|
| 42 |
|
| 43 | -- NaNs, non-0 payload
|
| 44 | dqmns031 minus NaN13 -> NaN13
|
| 45 | dqmns032 minus -NaN13 -> -NaN13
|
| 46 | dqmns033 minus sNaN13 -> NaN13 Invalid_operation
|
| 47 | dqmns034 minus -sNaN13 -> -NaN13 Invalid_operation
|
| 48 | dqmns035 minus NaN70 -> NaN70
|
| 49 | dqmns036 minus -NaN70 -> -NaN70
|
| 50 | dqmns037 minus sNaN101 -> NaN101 Invalid_operation
|
| 51 | dqmns038 minus -sNaN101 -> -NaN101 Invalid_operation
|
| 52 |
|
| 53 | -- finites
|
| 54 | dqmns101 minus 7 -> -7
|
| 55 | dqmns102 minus -7 -> 7
|
| 56 | dqmns103 minus 75 -> -75
|
| 57 | dqmns104 minus -75 -> 75
|
| 58 | dqmns105 minus 7.50 -> -7.50
|
| 59 | dqmns106 minus -7.50 -> 7.50
|
| 60 | dqmns107 minus 7.500 -> -7.500
|
| 61 | dqmns108 minus -7.500 -> 7.500
|
| 62 |
|
| 63 | -- zeros
|
| 64 | dqmns111 minus 0 -> 0
|
| 65 | dqmns112 minus -0 -> 0
|
| 66 | dqmns113 minus 0E+4 -> 0E+4
|
| 67 | dqmns114 minus -0E+4 -> 0E+4
|
| 68 | dqmns115 minus 0.0000 -> 0.0000
|
| 69 | dqmns116 minus -0.0000 -> 0.0000
|
| 70 | dqmns117 minus 0E-141 -> 0E-141
|
| 71 | dqmns118 minus -0E-141 -> 0E-141
|
| 72 |
|
| 73 | -- full coefficients, alternating bits
|
| 74 | dqmns121 minus 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
|
| 75 | dqmns122 minus -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
|
| 76 | dqmns123 minus 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
|
| 77 | dqmns124 minus -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
|
| 78 |
|
| 79 | -- Nmax, Nmin, Ntiny
|
| 80 | dqmns131 minus 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
|
| 81 | dqmns132 minus 1E-6143 -> -1E-6143
|
| 82 | dqmns133 minus 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
|
| 83 | dqmns134 minus 1E-6176 -> -1E-6176 Subnormal
|
| 84 |
|
| 85 | dqmns135 minus -1E-6176 -> 1E-6176 Subnormal
|
| 86 | dqmns136 minus -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
|
| 87 | dqmns137 minus -1E-6143 -> 1E-6143
|
| 88 | dqmns138 minus -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
|