PageRenderTime 59ms CodeModel.GetById 29ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

/Lib/test/decimaltestdata/dqFMA.decTest

http://unladen-swallow.googlecode.com/
Unknown | 1786 lines | 1650 code | 136 blank | 0 comment | 0 complexity | 2bba117e3d5607d08283ca76d56f62c3 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1------------------------------------------------------------------------
  2-- dqFMA.decTest -- decQuad Fused Multiply Add                        --
  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
 22extended:    1
 23clamp:       1
 24precision:   34
 25maxExponent: 6144
 26minExponent: -6143
 27rounding:    half_even
 28
 29-- These tests comprese three parts:
 30--   1. Sanity checks and other three-operand tests (especially those
 31--      where the fused operation makes a difference)
 32--   2. Multiply tests (third operand is neutral zero [0E+emax])
 33--   3. Addition tests (first operand is 1)
 34-- The multiply and addition tests are extensive because FMA may have
 35-- its own dedicated multiplication or addition routine(s), and they
 36-- also inherently check the left-to-right properties.
 37
 38-- Sanity checks
 39dqfma0001 fma  1   1   1 ->   2
 40dqfma0002 fma  1   1   2 ->   3
 41dqfma0003 fma  2   2   3 ->   7
 42dqfma0004 fma  9   9   9 ->  90
 43dqfma0005 fma -1   1   1 ->   0
 44dqfma0006 fma -1   1   2 ->   1
 45dqfma0007 fma -2   2   3 ->  -1
 46dqfma0008 fma -9   9   9 -> -72
 47dqfma0011 fma  1  -1   1 ->   0
 48dqfma0012 fma  1  -1   2 ->   1
 49dqfma0013 fma  2  -2   3 ->  -1
 50dqfma0014 fma  9  -9   9 -> -72
 51dqfma0015 fma  1   1  -1 ->   0
 52dqfma0016 fma  1   1  -2 ->  -1
 53dqfma0017 fma  2   2  -3 ->   1
 54dqfma0018 fma  9   9  -9 ->  72
 55
 56-- non-integer exacts
 57dqfma0100  fma    25.2   63.6   -438  ->  1164.72
 58dqfma0101  fma   0.301  0.380    334  ->  334.114380
 59dqfma0102  fma    49.2   -4.8   23.3  ->  -212.86
 60dqfma0103  fma    4.22  0.079  -94.6  ->  -94.26662
 61dqfma0104  fma     903  0.797  0.887  ->  720.578
 62dqfma0105  fma    6.13   -161   65.9  ->  -921.03
 63dqfma0106  fma    28.2    727   5.45  ->  20506.85
 64dqfma0107  fma       4    605    688  ->  3108
 65dqfma0108  fma    93.3   0.19  0.226  ->  17.953
 66dqfma0109  fma   0.169   -341   5.61  ->  -52.019
 67dqfma0110  fma   -72.2     30  -51.2  ->  -2217.2
 68dqfma0111  fma  -0.409     13   20.4  ->  15.083
 69dqfma0112  fma     317   77.0   19.0  ->  24428.0
 70dqfma0113  fma      47   6.58   1.62  ->  310.88
 71dqfma0114  fma    1.36  0.984  0.493  ->  1.83124
 72dqfma0115  fma    72.7    274   1.56  ->  19921.36
 73dqfma0116  fma     335    847     83  ->  283828
 74dqfma0117  fma     666  0.247   25.4  ->  189.902
 75dqfma0118  fma   -3.87   3.06   78.0  ->  66.1578
 76dqfma0119  fma   0.742    192   35.6  ->  178.064
 77dqfma0120  fma   -91.6   5.29  0.153  ->  -484.411
 78
 79-- cases where result is different from separate multiply + add; each
 80-- is preceded by the result of unfused multiply and add
 81-- [this is about 20% of all similar  cases in general]
 82--                                                                                                            ->  4.500119002100000209469729375698778E+38
 83dqfma0202  fma       68537985861355864457.5694      6565875762972086605.85969       35892634447236753.172812  ->  4.500119002100000209469729375698779E+38 Inexact Rounded
 84--                                                                                                            ->  5.996248469584594346858881620185514E+41
 85dqfma0208  fma          89261822344727628571.9      6717595845654131383336.89      5061036497288796076266.11  ->  5.996248469584594346858881620185513E+41 Inexact Rounded
 86--                                                                                                            ->  1.899242968678256924021594770874070E+34
 87dqfma0210  fma       320506237232448685.495971       59257597764017967.984448      3205615239077711589912.85  ->  1.899242968678256924021594770874071E+34 Inexact Rounded
 88--                                                                                                            ->  7.078596978842809537929699954860309E+37
 89dqfma0215  fma        220247843259112263.17995       321392340287987979002.80        47533279819997167655440  ->  7.078596978842809537929699954860308E+37 Inexact Rounded
 90--                                                                                                            ->  1.224955667581427559754106862350743E+37
 91dqfma0226  fma       23880729790368880412.1449       512947333827064719.55407      217117438419590824502.963  ->  1.224955667581427559754106862350744E+37 Inexact Rounded
 92--                                                                                                            ->  -2.530094043253148806272276368579144E+42
 93dqfma0229  fma        2539892357016099706.4126      -996142232667504817717435       53682082598315949425.937  ->  -2.530094043253148806272276368579143E+42 Inexact Rounded
 94--                                                                                                            ->  1.713387085759711954319391412788454E+37
 95dqfma0233  fma        4546339491341624464.0804            3768717864169205581       83578980278690395184.620  ->  1.713387085759711954319391412788453E+37 Inexact Rounded
 96--                                                                                                            ->  4.062275663405823716411579117771547E+35
 97dqfma0235  fma        409242119433816131.42253      992633815166741501.477249        70179636544416756129546  ->  4.062275663405823716411579117771548E+35 Inexact Rounded
 98--                                                                                                            ->  6.002604327732568490562249875306823E+47
 99dqfma0258  fma        817941336593541742159684       733867339769310729266598      78563844650942419311830.8  ->  6.002604327732568490562249875306822E+47 Inexact Rounded
100--                                                                                                            ->  -2.027022514381452197510103395283874E+39
101dqfma0264  fma       387617310169161270.737532     -5229442703414956061216.62      57665666816652967150473.5  ->  -2.027022514381452197510103395283873E+39 Inexact Rounded
102--                                                                                                            ->  -7.856525039803554001144089842730361E+37
103dqfma0267  fma      -847655845720565274701.210        92685316564117739.83984      22780950041376424429.5686  ->  -7.856525039803554001144089842730360E+37 Inexact Rounded
104--                                                                                                            ->  1.695515562011520746125607502237559E+38
105dqfma0268  fma          21590290365127685.3675       7853139227576541379426.8       -3275859437236180.761544  ->  1.695515562011520746125607502237558E+38 Inexact Rounded
106--                                                                                                            ->  -8.448422935783289219748115038014710E+38
107dqfma0269  fma      -974320636272862697.971586      867109103641860247440.756        -9775170775902454762.98  ->  -8.448422935783289219748115038014709E+38 Inexact Rounded
108
109-- Cases where multiply would overflow or underflow if separate
110dqfma0300  fma   9e+6144    10   0         -> Infinity  Overflow Inexact Rounded
111dqfma0301  fma   1e+6144    10   0         -> Infinity  Overflow Inexact Rounded
112dqfma0302  fma   1e+6144    10   -1e+6144  -> 9.000000000000000000000000000000000E+6144 Clamped
113dqfma0303  fma   1e+6144    10   -9e+6144  -> 1.000000000000000000000000000000000E+6144 Clamped
114-- subnormal etc.
115dqfma0305  fma   1e-6176    0.1  0         -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
116dqfma0306  fma   1e-6176    0.1  1         -> 1.000000000000000000000000000000000 Inexact Rounded
117dqfma0307  fma   1e-6176    0.1  1e-6176   -> 1E-6176 Underflow Subnormal Inexact Rounded
118
119-- Infinite combinations
120dqfma0800 fma  Inf   Inf   Inf    ->  Infinity
121dqfma0801 fma  Inf   Inf  -Inf    ->  NaN Invalid_operation
122dqfma0802 fma  Inf  -Inf   Inf    ->  NaN Invalid_operation
123dqfma0803 fma  Inf  -Inf  -Inf    -> -Infinity
124dqfma0804 fma -Inf   Inf   Inf    ->  NaN Invalid_operation
125dqfma0805 fma -Inf   Inf  -Inf    -> -Infinity
126dqfma0806 fma -Inf  -Inf   Inf    ->  Infinity
127dqfma0807 fma -Inf  -Inf  -Inf    ->  NaN Invalid_operation
128
129-- Triple NaN propagation
130dqfma0900 fma  NaN2  NaN3  NaN5   ->  NaN2
131dqfma0901 fma  0     NaN3  NaN5   ->  NaN3
132dqfma0902 fma  0     0     NaN5   ->  NaN5
133-- first sNaN wins (consider qNaN from earlier sNaN being
134-- overridden by an sNaN in third operand)
135dqfma0903 fma  sNaN1 sNaN2 sNaN3  ->  NaN1 Invalid_operation
136dqfma0904 fma  0     sNaN2 sNaN3  ->  NaN2 Invalid_operation
137dqfma0905 fma  0     0     sNaN3  ->  NaN3 Invalid_operation
138dqfma0906 fma  sNaN1 sNaN2 sNaN3  ->  NaN1 Invalid_operation
139dqfma0907 fma  NaN7  sNaN2 sNaN3  ->  NaN2 Invalid_operation
140dqfma0908 fma  NaN7  NaN5  sNaN3  ->  NaN3 Invalid_operation
141
142-- MULTIPLICATION TESTS ------------------------------------------------
143rounding:    half_even
144
145-- sanity checks
146dqfma2000 fma  2      2   0e+6144  -> 4
147dqfma2001 fma  2      3   0e+6144  -> 6
148dqfma2002 fma  5      1   0e+6144  -> 5
149dqfma2003 fma  5      2   0e+6144  -> 10
150dqfma2004 fma  1.20   2   0e+6144  -> 2.40
151dqfma2005 fma  1.20   0   0e+6144  -> 0.00
152dqfma2006 fma  1.20  -2   0e+6144  -> -2.40
153dqfma2007 fma  -1.20  2   0e+6144  -> -2.40
154dqfma2008 fma  -1.20  0   0e+6144  -> 0.00
155dqfma2009 fma  -1.20 -2   0e+6144  -> 2.40
156dqfma2010 fma  5.09 7.1   0e+6144  -> 36.139
157dqfma2011 fma  2.5    4   0e+6144  -> 10.0
158dqfma2012 fma  2.50   4   0e+6144  -> 10.00
159dqfma2013 fma  1.23456789 1.0000000000000000000000000000   0e+6144  -> 1.234567890000000000000000000000000 Rounded
160dqfma2015 fma  2.50   4   0e+6144  -> 10.00
161dqfma2016 fma   9.99999999999999999  9.99999999999999999   0e+6144  ->  99.99999999999999980000000000000000 Inexact Rounded
162dqfma2017 fma   9.99999999999999999 -9.99999999999999999   0e+6144  -> -99.99999999999999980000000000000000 Inexact Rounded
163dqfma2018 fma  -9.99999999999999999  9.99999999999999999   0e+6144  -> -99.99999999999999980000000000000000 Inexact Rounded
164dqfma2019 fma  -9.99999999999999999 -9.99999999999999999   0e+6144  ->  99.99999999999999980000000000000000 Inexact Rounded
165
166-- zeros, etc.
167dqfma2021 fma   0      0       0e+6144  ->  0
168dqfma2022 fma   0     -0       0e+6144  ->  0
169dqfma2023 fma  -0      0       0e+6144  ->  0
170dqfma2024 fma  -0     -0       0e+6144  ->  0
171dqfma2025 fma  -0.0   -0.0     0e+6144  ->  0.00
172dqfma2026 fma  -0.0   -0.0     0e+6144  ->  0.00
173dqfma2027 fma  -0.0   -0.0     0e+6144  ->  0.00
174dqfma2028 fma  -0.0   -0.0     0e+6144  ->  0.00
175dqfma2030 fma   5.00   1E-3    0e+6144  ->  0.00500
176dqfma2031 fma   00.00  0.000   0e+6144  ->  0.00000
177dqfma2032 fma   00.00  0E-3    0e+6144  ->  0.00000     -- rhs is 0
178dqfma2033 fma   0E-3   00.00   0e+6144  ->  0.00000     -- lhs is 0
179dqfma2034 fma  -5.00   1E-3    0e+6144  -> -0.00500
180dqfma2035 fma  -00.00  0.000   0e+6144  ->  0.00000
181dqfma2036 fma  -00.00  0E-3    0e+6144  ->  0.00000     -- rhs is 0
182dqfma2037 fma  -0E-3   00.00   0e+6144  ->  0.00000     -- lhs is 0
183dqfma2038 fma   5.00  -1E-3    0e+6144  -> -0.00500
184dqfma2039 fma   00.00 -0.000   0e+6144  ->  0.00000
185dqfma2040 fma   00.00 -0E-3    0e+6144  ->  0.00000     -- rhs is 0
186dqfma2041 fma   0E-3  -00.00   0e+6144  ->  0.00000     -- lhs is 0
187dqfma2042 fma  -5.00  -1E-3    0e+6144  ->  0.00500
188dqfma2043 fma  -00.00 -0.000   0e+6144  ->  0.00000
189dqfma2044 fma  -00.00 -0E-3    0e+6144  ->  0.00000     -- rhs is 0
190dqfma2045 fma  -0E-3  -00.00   0e+6144  ->  0.00000     -- lhs is 0
191
192-- examples from decarith
193dqfma2050 fma  1.20 3          0e+6144  -> 3.60
194dqfma2051 fma  7    3          0e+6144  -> 21
195dqfma2052 fma  0.9  0.8        0e+6144  -> 0.72
196dqfma2053 fma  0.9  -0         0e+6144  -> 0.0
197dqfma2054 fma  654321 654321   0e+6144  -> 428135971041
198
199dqfma2060 fma  123.45 1e7    0e+6144  ->  1.2345E+9
200dqfma2061 fma  123.45 1e8    0e+6144  ->  1.2345E+10
201dqfma2062 fma  123.45 1e+9   0e+6144  ->  1.2345E+11
202dqfma2063 fma  123.45 1e10   0e+6144  ->  1.2345E+12
203dqfma2064 fma  123.45 1e11   0e+6144  ->  1.2345E+13
204dqfma2065 fma  123.45 1e12   0e+6144  ->  1.2345E+14
205dqfma2066 fma  123.45 1e13   0e+6144  ->  1.2345E+15
206
207
208-- test some intermediate lengths
209--                    1234567890123456
210dqfma2080 fma  0.1 1230123456456789       0e+6144  -> 123012345645678.9
211dqfma2084 fma  0.1 1230123456456789       0e+6144  -> 123012345645678.9
212dqfma2090 fma  1230123456456789     0.1   0e+6144  -> 123012345645678.9
213dqfma2094 fma  1230123456456789     0.1   0e+6144  -> 123012345645678.9
214
215-- test some more edge cases and carries
216dqfma2101 fma  9 9     0e+6144  -> 81
217dqfma2102 fma  9 90     0e+6144  -> 810
218dqfma2103 fma  9 900     0e+6144  -> 8100
219dqfma2104 fma  9 9000     0e+6144  -> 81000
220dqfma2105 fma  9 90000     0e+6144  -> 810000
221dqfma2106 fma  9 900000     0e+6144  -> 8100000
222dqfma2107 fma  9 9000000     0e+6144  -> 81000000
223dqfma2108 fma  9 90000000     0e+6144  -> 810000000
224dqfma2109 fma  9 900000000     0e+6144  -> 8100000000
225dqfma2110 fma  9 9000000000     0e+6144  -> 81000000000
226dqfma2111 fma  9 90000000000     0e+6144  -> 810000000000
227dqfma2112 fma  9 900000000000     0e+6144  -> 8100000000000
228dqfma2113 fma  9 9000000000000     0e+6144  -> 81000000000000
229dqfma2114 fma  9 90000000000000     0e+6144  -> 810000000000000
230dqfma2115 fma  9 900000000000000     0e+6144  -> 8100000000000000
231--dqfma2116 fma  9 9000000000000000     0e+6144  -> 81000000000000000
232--dqfma2117 fma  9 90000000000000000     0e+6144  -> 810000000000000000
233--dqfma2118 fma  9 900000000000000000     0e+6144  -> 8100000000000000000
234--dqfma2119 fma  9 9000000000000000000     0e+6144  -> 81000000000000000000
235--dqfma2120 fma  9 90000000000000000000     0e+6144  -> 810000000000000000000
236--dqfma2121 fma  9 900000000000000000000     0e+6144  -> 8100000000000000000000
237--dqfma2122 fma  9 9000000000000000000000     0e+6144  -> 81000000000000000000000
238--dqfma2123 fma  9 90000000000000000000000     0e+6144  -> 810000000000000000000000
239-- test some more edge cases without carries
240dqfma2131 fma  3 3     0e+6144  -> 9
241dqfma2132 fma  3 30     0e+6144  -> 90
242dqfma2133 fma  3 300     0e+6144  -> 900
243dqfma2134 fma  3 3000     0e+6144  -> 9000
244dqfma2135 fma  3 30000     0e+6144  -> 90000
245dqfma2136 fma  3 300000     0e+6144  -> 900000
246dqfma2137 fma  3 3000000     0e+6144  -> 9000000
247dqfma2138 fma  3 30000000     0e+6144  -> 90000000
248dqfma2139 fma  3 300000000     0e+6144  -> 900000000
249dqfma2140 fma  3 3000000000     0e+6144  -> 9000000000
250dqfma2141 fma  3 30000000000     0e+6144  -> 90000000000
251dqfma2142 fma  3 300000000000     0e+6144  -> 900000000000
252dqfma2143 fma  3 3000000000000     0e+6144  -> 9000000000000
253dqfma2144 fma  3 30000000000000     0e+6144  -> 90000000000000
254dqfma2145 fma  3 300000000000000     0e+6144  -> 900000000000000
255dqfma2146 fma  3 3000000000000000     0e+6144  -> 9000000000000000
256dqfma2147 fma  3 30000000000000000     0e+6144  -> 90000000000000000
257dqfma2148 fma  3 300000000000000000     0e+6144  -> 900000000000000000
258dqfma2149 fma  3 3000000000000000000     0e+6144  -> 9000000000000000000
259dqfma2150 fma  3 30000000000000000000     0e+6144  -> 90000000000000000000
260dqfma2151 fma  3 300000000000000000000     0e+6144  -> 900000000000000000000
261dqfma2152 fma  3 3000000000000000000000     0e+6144  -> 9000000000000000000000
262dqfma2153 fma  3 30000000000000000000000     0e+6144  -> 90000000000000000000000
263
264dqfma2263 fma  30269.587755640502150977251770554 4.8046009735990873395936309640543   0e+6144  -> 145433.2908011933696719165119928296 Inexact Rounded
265
266-- test some edge cases with exact rounding
267dqfma2301 fma  900000000000000000 9     0e+6144  -> 8100000000000000000
268dqfma2302 fma  900000000000000000 90     0e+6144  -> 81000000000000000000
269dqfma2303 fma  900000000000000000 900     0e+6144  -> 810000000000000000000
270dqfma2304 fma  900000000000000000 9000     0e+6144  -> 8100000000000000000000
271dqfma2305 fma  900000000000000000 90000     0e+6144  -> 81000000000000000000000
272dqfma2306 fma  900000000000000000 900000     0e+6144  -> 810000000000000000000000
273dqfma2307 fma  900000000000000000 9000000     0e+6144  -> 8100000000000000000000000
274dqfma2308 fma  900000000000000000 90000000     0e+6144  -> 81000000000000000000000000
275dqfma2309 fma  900000000000000000 900000000     0e+6144  -> 810000000000000000000000000
276dqfma2310 fma  900000000000000000 9000000000     0e+6144  -> 8100000000000000000000000000
277dqfma2311 fma  900000000000000000 90000000000     0e+6144  -> 81000000000000000000000000000
278dqfma2312 fma  900000000000000000 900000000000     0e+6144  -> 810000000000000000000000000000
279dqfma2313 fma  900000000000000000 9000000000000     0e+6144  -> 8100000000000000000000000000000
280dqfma2314 fma  900000000000000000 90000000000000     0e+6144  -> 81000000000000000000000000000000
281dqfma2315 fma  900000000000000000 900000000000000     0e+6144  -> 810000000000000000000000000000000
282dqfma2316 fma  900000000000000000 9000000000000000     0e+6144  -> 8100000000000000000000000000000000
283dqfma2317 fma  9000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+34  Rounded
284dqfma2318 fma  90000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+35  Rounded
285dqfma2319 fma  900000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+36  Rounded
286dqfma2320 fma  9000000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+37  Rounded
287dqfma2321 fma  90000000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+38  Rounded
288dqfma2322 fma  900000000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+39  Rounded
289dqfma2323 fma  9000000000000000000000000 9000000000000000     0e+6144  -> 8.100000000000000000000000000000000E+40  Rounded
290
291-- tryzeros cases
292dqfma2504  fma   0E-4260 1000E-4260    0e+6144  -> 0E-6176 Clamped
293dqfma2505  fma   100E+4260 0E+4260     0e+6144  -> 0E+6111 Clamped
294
295-- mixed with zeros
296dqfma2541 fma   0    -1       0e+6144  ->  0
297dqfma2542 fma  -0    -1       0e+6144  ->  0
298dqfma2543 fma   0     1       0e+6144  ->  0
299dqfma2544 fma  -0     1       0e+6144  ->  0
300dqfma2545 fma  -1     0       0e+6144  ->  0
301dqfma2546 fma  -1    -0       0e+6144  ->  0
302dqfma2547 fma   1     0       0e+6144  ->  0
303dqfma2548 fma   1    -0       0e+6144  ->  0
304
305dqfma2551 fma   0.0  -1       0e+6144  ->  0.0
306dqfma2552 fma  -0.0  -1       0e+6144  ->  0.0
307dqfma2553 fma   0.0   1       0e+6144  ->  0.0
308dqfma2554 fma  -0.0   1       0e+6144  ->  0.0
309dqfma2555 fma  -1.0   0       0e+6144  ->  0.0
310dqfma2556 fma  -1.0  -0       0e+6144  ->  0.0
311dqfma2557 fma   1.0   0       0e+6144  ->  0.0
312dqfma2558 fma   1.0  -0       0e+6144  ->  0.0
313
314dqfma2561 fma   0    -1.0     0e+6144  ->  0.0
315dqfma2562 fma  -0    -1.0     0e+6144  ->  0.0
316dqfma2563 fma   0     1.0     0e+6144  ->  0.0
317dqfma2564 fma  -0     1.0     0e+6144  ->  0.0
318dqfma2565 fma  -1     0.0     0e+6144  ->  0.0
319dqfma2566 fma  -1    -0.0     0e+6144  ->  0.0
320dqfma2567 fma   1     0.0     0e+6144  ->  0.0
321dqfma2568 fma   1    -0.0     0e+6144  ->  0.0
322
323dqfma2571 fma   0.0  -1.0     0e+6144  ->  0.00
324dqfma2572 fma  -0.0  -1.0     0e+6144  ->  0.00
325dqfma2573 fma   0.0   1.0     0e+6144  ->  0.00
326dqfma2574 fma  -0.0   1.0     0e+6144  ->  0.00
327dqfma2575 fma  -1.0   0.0     0e+6144  ->  0.00
328dqfma2576 fma  -1.0  -0.0     0e+6144  ->  0.00
329dqfma2577 fma   1.0   0.0     0e+6144  ->  0.00
330dqfma2578 fma   1.0  -0.0     0e+6144  ->  0.00
331dqfma2579 fma   1.0   0.0     0e+6144  ->  0.00
332dqfma2530 fma  -1.0  -0.0     0e+6144  ->  0.00
333dqfma2531 fma  -1.0   0.0     0e+6144  ->  0.00
334dqfma2532 fma   1.0  -0.0    -0e+6144  -> -0.00
335dqfma2533 fma   1.0   0.0    -0e+6144  ->  0.00
336dqfma2534 fma  -1.0  -0.0    -0e+6144  ->  0.00
337dqfma2535 fma  -1.0   0.0    -0e+6144  -> -0.00
338
339
340-- Specials
341dqfma2580 fma   Inf  -Inf     0e+6144  -> -Infinity
342dqfma2581 fma   Inf  -1000    0e+6144  -> -Infinity
343dqfma2582 fma   Inf  -1       0e+6144  -> -Infinity
344dqfma2583 fma   Inf  -0       0e+6144  ->  NaN  Invalid_operation
345dqfma2584 fma   Inf   0       0e+6144  ->  NaN  Invalid_operation
346dqfma2585 fma   Inf   1       0e+6144  ->  Infinity
347dqfma2586 fma   Inf   1000    0e+6144  ->  Infinity
348dqfma2587 fma   Inf   Inf     0e+6144  ->  Infinity
349dqfma2588 fma  -1000  Inf     0e+6144  -> -Infinity
350dqfma2589 fma  -Inf   Inf     0e+6144  -> -Infinity
351dqfma2590 fma  -1     Inf     0e+6144  -> -Infinity
352dqfma2591 fma  -0     Inf     0e+6144  ->  NaN  Invalid_operation
353dqfma2592 fma   0     Inf     0e+6144  ->  NaN  Invalid_operation
354dqfma2593 fma   1     Inf     0e+6144  ->  Infinity
355dqfma2594 fma   1000  Inf     0e+6144  ->  Infinity
356dqfma2595 fma   Inf   Inf     0e+6144  ->  Infinity
357
358dqfma2600 fma  -Inf  -Inf     0e+6144  ->  Infinity
359dqfma2601 fma  -Inf  -1000    0e+6144  ->  Infinity
360dqfma2602 fma  -Inf  -1       0e+6144  ->  Infinity
361dqfma2603 fma  -Inf  -0       0e+6144  ->  NaN  Invalid_operation
362dqfma2604 fma  -Inf   0       0e+6144  ->  NaN  Invalid_operation
363dqfma2605 fma  -Inf   1       0e+6144  -> -Infinity
364dqfma2606 fma  -Inf   1000    0e+6144  -> -Infinity
365dqfma2607 fma  -Inf   Inf     0e+6144  -> -Infinity
366dqfma2608 fma  -1000  Inf     0e+6144  -> -Infinity
367dqfma2609 fma  -Inf  -Inf     0e+6144  ->  Infinity
368dqfma2610 fma  -1    -Inf     0e+6144  ->  Infinity
369dqfma2611 fma  -0    -Inf     0e+6144  ->  NaN  Invalid_operation
370dqfma2612 fma   0    -Inf     0e+6144  ->  NaN  Invalid_operation
371dqfma2613 fma   1    -Inf     0e+6144  -> -Infinity
372dqfma2614 fma   1000 -Inf     0e+6144  -> -Infinity
373dqfma2615 fma   Inf  -Inf     0e+6144  -> -Infinity
374
375dqfma2621 fma   NaN -Inf      0e+6144  ->  NaN
376dqfma2622 fma   NaN -1000     0e+6144  ->  NaN
377dqfma2623 fma   NaN -1        0e+6144  ->  NaN
378dqfma2624 fma   NaN -0        0e+6144  ->  NaN
379dqfma2625 fma   NaN  0        0e+6144  ->  NaN
380dqfma2626 fma   NaN  1        0e+6144  ->  NaN
381dqfma2627 fma   NaN  1000     0e+6144  ->  NaN
382dqfma2628 fma   NaN  Inf      0e+6144  ->  NaN
383dqfma2629 fma   NaN  NaN      0e+6144  ->  NaN
384dqfma2630 fma  -Inf  NaN      0e+6144  ->  NaN
385dqfma2631 fma  -1000 NaN      0e+6144  ->  NaN
386dqfma2632 fma  -1    NaN      0e+6144  ->  NaN
387dqfma2633 fma  -0    NaN      0e+6144  ->  NaN
388dqfma2634 fma   0    NaN      0e+6144  ->  NaN
389dqfma2635 fma   1    NaN      0e+6144  ->  NaN
390dqfma2636 fma   1000 NaN      0e+6144  ->  NaN
391dqfma2637 fma   Inf  NaN      0e+6144  ->  NaN
392
393dqfma2641 fma   sNaN -Inf     0e+6144  ->  NaN  Invalid_operation
394dqfma2642 fma   sNaN -1000    0e+6144  ->  NaN  Invalid_operation
395dqfma2643 fma   sNaN -1       0e+6144  ->  NaN  Invalid_operation
396dqfma2644 fma   sNaN -0       0e+6144  ->  NaN  Invalid_operation
397dqfma2645 fma   sNaN  0       0e+6144  ->  NaN  Invalid_operation
398dqfma2646 fma   sNaN  1       0e+6144  ->  NaN  Invalid_operation
399dqfma2647 fma   sNaN  1000    0e+6144  ->  NaN  Invalid_operation
400dqfma2648 fma   sNaN  NaN     0e+6144  ->  NaN  Invalid_operation
401dqfma2649 fma   sNaN sNaN     0e+6144  ->  NaN  Invalid_operation
402dqfma2650 fma   NaN  sNaN     0e+6144  ->  NaN  Invalid_operation
403dqfma2651 fma  -Inf  sNaN     0e+6144  ->  NaN  Invalid_operation
404dqfma2652 fma  -1000 sNaN     0e+6144  ->  NaN  Invalid_operation
405dqfma2653 fma  -1    sNaN     0e+6144  ->  NaN  Invalid_operation
406dqfma2654 fma  -0    sNaN     0e+6144  ->  NaN  Invalid_operation
407dqfma2655 fma   0    sNaN     0e+6144  ->  NaN  Invalid_operation
408dqfma2656 fma   1    sNaN     0e+6144  ->  NaN  Invalid_operation
409dqfma2657 fma   1000 sNaN     0e+6144  ->  NaN  Invalid_operation
410dqfma2658 fma   Inf  sNaN     0e+6144  ->  NaN  Invalid_operation
411dqfma2659 fma   NaN  sNaN     0e+6144  ->  NaN  Invalid_operation
412
413-- propagating NaNs
414dqfma2661 fma   NaN9 -Inf     0e+6144  ->  NaN9
415dqfma2662 fma   NaN8  999     0e+6144  ->  NaN8
416dqfma2663 fma   NaN71 Inf     0e+6144  ->  NaN71
417dqfma2664 fma   NaN6  NaN5    0e+6144  ->  NaN6
418dqfma2665 fma  -Inf   NaN4    0e+6144  ->  NaN4
419dqfma2666 fma  -999   NaN33   0e+6144  ->  NaN33
420dqfma2667 fma   Inf   NaN2    0e+6144  ->  NaN2
421
422dqfma2671 fma   sNaN99 -Inf      0e+6144  ->  NaN99 Invalid_operation
423dqfma2672 fma   sNaN98 -11       0e+6144  ->  NaN98 Invalid_operation
424dqfma2673 fma   sNaN97  NaN      0e+6144  ->  NaN97 Invalid_operation
425dqfma2674 fma   sNaN16 sNaN94    0e+6144  ->  NaN16 Invalid_operation
426dqfma2675 fma   NaN95  sNaN93    0e+6144  ->  NaN93 Invalid_operation
427dqfma2676 fma  -Inf    sNaN92    0e+6144  ->  NaN92 Invalid_operation
428dqfma2677 fma   088    sNaN91    0e+6144  ->  NaN91 Invalid_operation
429dqfma2678 fma   Inf    sNaN90    0e+6144  ->  NaN90 Invalid_operation
430dqfma2679 fma   NaN    sNaN89    0e+6144  ->  NaN89 Invalid_operation
431
432dqfma2681 fma  -NaN9 -Inf     0e+6144  -> -NaN9
433dqfma2682 fma  -NaN8  999     0e+6144  -> -NaN8
434dqfma2683 fma  -NaN71 Inf     0e+6144  -> -NaN71
435dqfma2684 fma  -NaN6 -NaN5    0e+6144  -> -NaN6
436dqfma2685 fma  -Inf  -NaN4    0e+6144  -> -NaN4
437dqfma2686 fma  -999  -NaN33   0e+6144  -> -NaN33
438dqfma2687 fma   Inf  -NaN2    0e+6144  -> -NaN2
439
440dqfma2691 fma  -sNaN99 -Inf      0e+6144  -> -NaN99 Invalid_operation
441dqfma2692 fma  -sNaN98 -11       0e+6144  -> -NaN98 Invalid_operation
442dqfma2693 fma  -sNaN97  NaN      0e+6144  -> -NaN97 Invalid_operation
443dqfma2694 fma  -sNaN16 -sNaN94   0e+6144  -> -NaN16 Invalid_operation
444dqfma2695 fma  -NaN95  -sNaN93   0e+6144  -> -NaN93 Invalid_operation
445dqfma2696 fma  -Inf    -sNaN92   0e+6144  -> -NaN92 Invalid_operation
446dqfma2697 fma   088    -sNaN91   0e+6144  -> -NaN91 Invalid_operation
447dqfma2698 fma   Inf    -sNaN90   0e+6144  -> -NaN90 Invalid_operation
448dqfma2699 fma  -NaN    -sNaN89   0e+6144  -> -NaN89 Invalid_operation
449
450dqfma2701 fma  -NaN  -Inf     0e+6144  -> -NaN
451dqfma2702 fma  -NaN   999     0e+6144  -> -NaN
452dqfma2703 fma  -NaN   Inf     0e+6144  -> -NaN
453dqfma2704 fma  -NaN  -NaN     0e+6144  -> -NaN
454dqfma2705 fma  -Inf  -NaN0    0e+6144  -> -NaN
455dqfma2706 fma  -999  -NaN     0e+6144  -> -NaN
456dqfma2707 fma   Inf  -NaN     0e+6144  -> -NaN
457
458dqfma2711 fma  -sNaN   -Inf      0e+6144  -> -NaN Invalid_operation
459dqfma2712 fma  -sNaN   -11       0e+6144  -> -NaN Invalid_operation
460dqfma2713 fma  -sNaN00  NaN      0e+6144  -> -NaN Invalid_operation
461dqfma2714 fma  -sNaN   -sNaN     0e+6144  -> -NaN Invalid_operation
462dqfma2715 fma  -NaN    -sNaN     0e+6144  -> -NaN Invalid_operation
463dqfma2716 fma  -Inf    -sNaN     0e+6144  -> -NaN Invalid_operation
464dqfma2717 fma   088    -sNaN     0e+6144  -> -NaN Invalid_operation
465dqfma2718 fma   Inf    -sNaN     0e+6144  -> -NaN Invalid_operation
466dqfma2719 fma  -NaN    -sNaN     0e+6144  -> -NaN Invalid_operation
467
468-- overflow and underflow tests .. note subnormal results
469-- signs
470dqfma2751 fma   1e+4277  1e+3311   0e+6144  ->  Infinity Overflow Inexact Rounded
471dqfma2752 fma   1e+4277 -1e+3311   0e+6144  -> -Infinity Overflow Inexact Rounded
472dqfma2753 fma  -1e+4277  1e+3311   0e+6144  -> -Infinity Overflow Inexact Rounded
473dqfma2754 fma  -1e+4277 -1e+3311   0e+6144  ->  Infinity Overflow Inexact Rounded
474dqfma2755 fma   1e-4277  1e-3311   0e+6144  ->  0E-6176 Underflow Subnormal Inexact Rounded Clamped
475dqfma2756 fma   1e-4277 -1e-3311   0e+6144  -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
476dqfma2757 fma  -1e-4277  1e-3311   0e+6144  -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
477dqfma2758 fma  -1e-4277 -1e-3311   0e+6144  ->  0E-6176 Underflow Subnormal Inexact Rounded Clamped
478
479-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
480dqfma2760 fma  1e-6069 1e-101   0e+6144  -> 1E-6170 Subnormal
481dqfma2761 fma  1e-6069 1e-102   0e+6144  -> 1E-6171 Subnormal
482dqfma2762 fma  1e-6069 1e-103   0e+6144  -> 1E-6172 Subnormal
483dqfma2763 fma  1e-6069 1e-104   0e+6144  -> 1E-6173 Subnormal
484dqfma2764 fma  1e-6069 1e-105   0e+6144  -> 1E-6174 Subnormal
485dqfma2765 fma  1e-6069 1e-106   0e+6144  -> 1E-6175 Subnormal
486dqfma2766 fma  1e-6069 1e-107   0e+6144  -> 1E-6176 Subnormal
487dqfma2767 fma  1e-6069 1e-108   0e+6144  -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
488dqfma2768 fma  1e-6069 1e-109   0e+6144  -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
489dqfma2769 fma  1e-6069 1e-110   0e+6144  -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
490-- [no equivalent of 'subnormal' for overflow]
491dqfma2770 fma  1e+40 1e+6101   0e+6144  -> 1.000000000000000000000000000000E+6141 Clamped
492dqfma2771 fma  1e+40 1e+6102   0e+6144  -> 1.0000000000000000000000000000000E+6142  Clamped
493dqfma2772 fma  1e+40 1e+6103   0e+6144  -> 1.00000000000000000000000000000000E+6143  Clamped
494dqfma2773 fma  1e+40 1e+6104   0e+6144  -> 1.000000000000000000000000000000000E+6144  Clamped
495dqfma2774 fma  1e+40 1e+6105   0e+6144  -> Infinity Overflow Inexact Rounded
496dqfma2775 fma  1e+40 1e+6106   0e+6144  -> Infinity Overflow Inexact Rounded
497dqfma2776 fma  1e+40 1e+6107   0e+6144  -> Infinity Overflow Inexact Rounded
498dqfma2777 fma  1e+40 1e+6108   0e+6144  -> Infinity Overflow Inexact Rounded
499dqfma2778 fma  1e+40 1e+6109   0e+6144  -> Infinity Overflow Inexact Rounded
500dqfma2779 fma  1e+40 1e+6110   0e+6144  -> Infinity Overflow Inexact Rounded
501
502dqfma2801 fma   1.0000E-6172  1       0e+6144  -> 1.0000E-6172 Subnormal
503dqfma2802 fma   1.000E-6172   1e-1    0e+6144  -> 1.000E-6173  Subnormal
504dqfma2803 fma   1.00E-6172    1e-2    0e+6144  -> 1.00E-6174   Subnormal
505dqfma2804 fma   1.0E-6172     1e-3    0e+6144  -> 1.0E-6175    Subnormal
506dqfma2805 fma   1.0E-6172     1e-4    0e+6144  -> 1E-6176     Subnormal Rounded
507dqfma2806 fma   1.3E-6172     1e-4    0e+6144  -> 1E-6176     Underflow Subnormal Inexact Rounded
508dqfma2807 fma   1.5E-6172     1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
509dqfma2808 fma   1.7E-6172     1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
510dqfma2809 fma   2.3E-6172     1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
511dqfma2810 fma   2.5E-6172     1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
512dqfma2811 fma   2.7E-6172     1e-4    0e+6144  -> 3E-6176     Underflow Subnormal Inexact Rounded
513dqfma2812 fma   1.49E-6172    1e-4    0e+6144  -> 1E-6176     Underflow Subnormal Inexact Rounded
514dqfma2813 fma   1.50E-6172    1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
515dqfma2814 fma   1.51E-6172    1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
516dqfma2815 fma   2.49E-6172    1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
517dqfma2816 fma   2.50E-6172    1e-4    0e+6144  -> 2E-6176     Underflow Subnormal Inexact Rounded
518dqfma2817 fma   2.51E-6172    1e-4    0e+6144  -> 3E-6176     Underflow Subnormal Inexact Rounded
519
520dqfma2818 fma   1E-6172       1e-4    0e+6144  -> 1E-6176     Subnormal
521dqfma2819 fma   3E-6172       1e-5    0e+6144  -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
522dqfma2820 fma   5E-6172       1e-5    0e+6144  -> 0E-6176     Underflow Subnormal Inexact Rounded Clamped
523dqfma2821 fma   7E-6172       1e-5    0e+6144  -> 1E-6176     Underflow Subnormal Inexact Rounded
524dqfma2822 fma   9E-6172       1e-5    0e+6144  -> 1E-6176     Underflow Subnormal Inexact Rounded
525dqfma2823 fma   9.9E-6172     1e-5    0e+6144  -> 1E-6176     Underflow Subnormal Inexact Rounded
526
527dqfma2824 fma   1E-6172      -1e-4    0e+6144  -> -1E-6176    Subnormal
528dqfma2825 fma   3E-6172      -1e-5    0e+6144  -> -0E-6176    Underflow Subnormal Inexact Rounded Clamped
529dqfma2826 fma  -5E-6172       1e-5    0e+6144  -> -0E-6176    Underflow Subnormal Inexact Rounded Clamped
530dqfma2827 fma   7E-6172      -1e-5    0e+6144  -> -1E-6176    Underflow Subnormal Inexact Rounded
531dqfma2828 fma  -9E-6172       1e-5    0e+6144  -> -1E-6176    Underflow Subnormal Inexact Rounded
532dqfma2829 fma   9.9E-6172    -1e-5    0e+6144  -> -1E-6176    Underflow Subnormal Inexact Rounded
533dqfma2830 fma   3.0E-6172    -1e-5    0e+6144  -> -0E-6176    Underflow Subnormal Inexact Rounded Clamped
534
535dqfma2831 fma   1.0E-5977     1e-200   0e+6144  -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
536dqfma2832 fma   1.0E-5977     1e-199   0e+6144  -> 1E-6176    Subnormal Rounded
537dqfma2833 fma   1.0E-5977     1e-198   0e+6144  -> 1.0E-6175    Subnormal
538dqfma2834 fma   2.0E-5977     2e-198   0e+6144  -> 4.0E-6175    Subnormal
539dqfma2835 fma   4.0E-5977     4e-198   0e+6144  -> 1.60E-6174   Subnormal
540dqfma2836 fma  10.0E-5977    10e-198   0e+6144  -> 1.000E-6173  Subnormal
541dqfma2837 fma  30.0E-5977    30e-198   0e+6144  -> 9.000E-6173  Subnormal
542dqfma2838 fma  40.0E-5982    40e-166   0e+6144  -> 1.6000E-6145 Subnormal
543dqfma2839 fma  40.0E-5982    40e-165   0e+6144  -> 1.6000E-6144 Subnormal
544dqfma2840 fma  40.0E-5982    40e-164   0e+6144  -> 1.6000E-6143
545
546-- Long operand overflow may be a different path
547dqfma2870 fma  100  9.999E+6143       0e+6144  ->  Infinity Inexact Overflow Rounded
548dqfma2871 fma  100 -9.999E+6143       0e+6144  -> -Infinity Inexact Overflow Rounded
549dqfma2872 fma       9.999E+6143 100   0e+6144  ->  Infinity Inexact Overflow Rounded
550dqfma2873 fma      -9.999E+6143 100   0e+6144  -> -Infinity Inexact Overflow Rounded
551
552-- check for double-rounded subnormals
553dqfma2881 fma   1.2347E-6133 1.2347E-40    0e+6144  ->  1.524E-6173 Inexact Rounded Subnormal Underflow
554dqfma2882 fma   1.234E-6133 1.234E-40      0e+6144  ->  1.523E-6173 Inexact Rounded Subnormal Underflow
555dqfma2883 fma   1.23E-6133  1.23E-40       0e+6144  ->  1.513E-6173 Inexact Rounded Subnormal Underflow
556dqfma2884 fma   1.2E-6133   1.2E-40        0e+6144  ->  1.44E-6173  Subnormal
557dqfma2885 fma   1.2E-6133   1.2E-41        0e+6144  ->  1.44E-6174  Subnormal
558dqfma2886 fma   1.2E-6133   1.2E-42        0e+6144  ->  1.4E-6175   Subnormal Inexact Rounded Underflow
559dqfma2887 fma   1.2E-6133   1.3E-42        0e+6144  ->  1.6E-6175   Subnormal Inexact Rounded Underflow
560dqfma2888 fma   1.3E-6133   1.3E-42        0e+6144  ->  1.7E-6175   Subnormal Inexact Rounded Underflow
561dqfma2889 fma   1.3E-6133   1.3E-43        0e+6144  ->    2E-6176   Subnormal Inexact Rounded Underflow
562dqfma2890 fma   1.3E-6134   1.3E-43        0e+6144  ->    0E-6176   Clamped Subnormal Inexact Rounded Underflow
563
564dqfma2891 fma   1.2345E-39    1.234E-6133   0e+6144  ->  1.5234E-6172 Inexact Rounded Subnormal Underflow
565dqfma2892 fma   1.23456E-39   1.234E-6133   0e+6144  ->  1.5234E-6172 Inexact Rounded Subnormal Underflow
566dqfma2893 fma   1.2345E-40   1.234E-6133   0e+6144  ->  1.523E-6173  Inexact Rounded Subnormal Underflow
567dqfma2894 fma   1.23456E-40  1.234E-6133   0e+6144  ->  1.523E-6173  Inexact Rounded Subnormal Underflow
568dqfma2895 fma   1.2345E-41   1.234E-6133   0e+6144  ->  1.52E-6174   Inexact Rounded Subnormal Underflow
569dqfma2896 fma   1.23456E-41  1.234E-6133   0e+6144  ->  1.52E-6174   Inexact Rounded Subnormal Underflow
570
571-- Now explore the case where we get a normal result with Underflow
572-- prove operands are exact
573dqfma2906 fma   9.999999999999999999999999999999999E-6143  1                         0e+6144  -> 9.999999999999999999999999999999999E-6143
574dqfma2907 fma                        1  0.09999999999999999999999999999999999       0e+6144  -> 0.09999999999999999999999999999999999
575-- the next rounds to Nmin
576dqfma2908 fma   9.999999999999999999999999999999999E-6143  0.09999999999999999999999999999999999       0e+6144  -> 1.000000000000000000000000000000000E-6143 Underflow Inexact Subnormal Rounded
577
578-- hugest
579dqfma2909 fma  9999999999999999999999999999999999 9999999999999999999999999999999999   0e+6144  -> 9.999999999999999999999999999999998E+67 Inexact Rounded
580
581-- Examples from SQL proposal (Krishna Kulkarni)
582precision:   34
583rounding:    half_up
584maxExponent: 6144
585minExponent: -6143
586dqfma21001  fma  130E-2  120E-2   0e+6144  -> 1.5600
587dqfma21002  fma  130E-2  12E-1    0e+6144  -> 1.560
588dqfma21003  fma  130E-2  1E0      0e+6144  -> 1.30
589dqfma21004  fma  1E2     1E4      0e+6144  -> 1E+6
590
591-- Null tests
592dqfma2990 fma  10  #   0e+6144  -> NaN Invalid_operation
593dqfma2991 fma   # 10   0e+6144  -> NaN Invalid_operation
594
595
596-- ADDITION TESTS ------------------------------------------------------
597rounding:    half_even
598
599-- [first group are 'quick confidence check']
600dqadd3001 fma  1  1       1       ->  2
601dqadd3002 fma  1  2       3       ->  5
602dqadd3003 fma  1  '5.75'  '3.3'   ->  9.05
603dqadd3004 fma  1  '5'     '-3'    ->  2
604dqadd3005 fma  1  '-5'    '-3'    ->  -8
605dqadd3006 fma  1  '-7'    '2.5'   ->  -4.5
606dqadd3007 fma  1  '0.7'   '0.3'   ->  1.0
607dqadd3008 fma  1  '1.25'  '1.25'  ->  2.50
608dqadd3009 fma  1  '1.23456789'  '1.00000000' -> '2.23456789'
609dqadd3010 fma  1  '1.23456789'  '1.00000011' -> '2.23456800'
610
611--             1234567890123456      1234567890123456
612dqadd3011 fma  1  '0.4444444444444444444444444444444446'  '0.5555555555555555555555555555555555' -> '1.000000000000000000000000000000000' Inexact Rounded
613dqadd3012 fma  1  '0.4444444444444444444444444444444445'  '0.5555555555555555555555555555555555' -> '1.000000000000000000000000000000000' Rounded
614dqadd3013 fma  1  '0.4444444444444444444444444444444444'  '0.5555555555555555555555555555555555' -> '0.9999999999999999999999999999999999'
615dqadd3014 fma  1    '4444444444444444444444444444444444' '0.49'   -> '4444444444444444444444444444444444' Inexact Rounded
616dqadd3015 fma  1    '4444444444444444444444444444444444' '0.499'  -> '4444444444444444444444444444444444' Inexact Rounded
617dqadd3016 fma  1    '4444444444444444444444444444444444' '0.4999' -> '4444444444444444444444444444444444' Inexact Rounded
618dqadd3017 fma  1    '4444444444444444444444444444444444' '0.5000' -> '4444444444444444444444444444444444' Inexact Rounded
619dqadd3018 fma  1    '4444444444444444444444444444444444' '0.5001' -> '4444444444444444444444444444444445' Inexact Rounded
620dqadd3019 fma  1    '4444444444444444444444444444444444' '0.501'  -> '4444444444444444444444444444444445' Inexact Rounded
621dqadd3020 fma  1    '4444444444444444444444444444444444' '0.51'   -> '4444444444444444444444444444444445' Inexact Rounded
622
623dqadd3021 fma  1  0 1 -> 1
624dqadd3022 fma  1  1 1 -> 2
625dqadd3023 fma  1  2 1 -> 3
626dqadd3024 fma  1  3 1 -> 4
627dqadd3025 fma  1  4 1 -> 5
628dqadd3026 fma  1  5 1 -> 6
629dqadd3027 fma  1  6 1 -> 7
630dqadd3028 fma  1  7 1 -> 8
631dqadd3029 fma  1  8 1 -> 9
632dqadd3030 fma  1  9 1 -> 10
633
634-- some carrying effects
635dqadd3031 fma  1  '0.9998'  '0.0000' -> '0.9998'
636dqadd3032 fma  1  '0.9998'  '0.0001' -> '0.9999'
637dqadd3033 fma  1  '0.9998'  '0.0002' -> '1.0000'
638dqadd3034 fma  1  '0.9998'  '0.0003' -> '1.0001'
639
640dqadd3035 fma  1  '70'  '10000e+34' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
641dqadd3036 fma  1  '700'  '10000e+34' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
642dqadd3037 fma  1  '7000'  '10000e+34' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
643dqadd3038 fma  1  '70000'  '10000e+34' -> '1.000000000000000000000000000000001E+38' Inexact Rounded
644dqadd3039 fma  1  '700000'  '10000e+34' -> '1.000000000000000000000000000000007E+38' Rounded
645
646-- symmetry:
647dqadd3040 fma  1  '10000e+34'  '70' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
648dqadd3041 fma  1  '10000e+34'  '700' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
649dqadd3042 fma  1  '10000e+34'  '7000' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
650dqadd3044 fma  1  '10000e+34'  '70000' -> '1.000000000000000000000000000000001E+38' Inexact Rounded
651dqadd3045 fma  1  '10000e+34'  '700000' -> '1.000000000000000000000000000000007E+38' Rounded
652
653-- same, without rounding
654dqadd3046 fma  1  '10000e+9'  '7' -> '10000000000007'
655dqadd3047 fma  1  '10000e+9'  '70' -> '10000000000070'
656dqadd3048 fma  1  '10000e+9'  '700' -> '10000000000700'
657dqadd3049 fma  1  '10000e+9'  '7000' -> '10000000007000'
658dqadd3050 fma  1  '10000e+9'  '70000' -> '10000000070000'
659dqadd3051 fma  1  '10000e+9'  '700000' -> '10000000700000'
660dqadd3052 fma  1  '10000e+9'  '7000000' -> '10000007000000'
661
662-- examples from decarith
663dqadd3053 fma  1  '12' '7.00' -> '19.00'
664dqadd3054 fma  1  '1.3' '-1.07' -> '0.23'
665dqadd3055 fma  1  '1.3' '-1.30' -> '0.00'
666dqadd3056 fma  1  '1.3' '-2.07' -> '-0.77'
667dqadd3057 fma  1  '1E+2' '1E+4' -> '1.01E+4'
668
669-- leading zero preservation
670dqadd3061 fma  1  1 '0.0001' -> '1.0001'
671dqadd3062 fma  1  1 '0.00001' -> '1.00001'
672dqadd3063 fma  1  1 '0.000001' -> '1.000001'
673dqadd3064 fma  1  1 '0.0000001' -> '1.0000001'
674dqadd3065 fma  1  1 '0.00000001' -> '1.00000001'
675
676-- some funny zeros [in case of bad signum]
677dqadd3070 fma  1  1  0    -> 1
678dqadd3071 fma  1  1 0.    -> 1
679dqadd3072 fma  1  1  .0   -> 1.0
680dqadd3073 fma  1  1 0.0   -> 1.0
681dqadd3074 fma  1  1 0.00  -> 1.00
682dqadd3075 fma  1   0  1   -> 1
683dqadd3076 fma  1  0.  1   -> 1
684dqadd3077 fma  1   .0 1   -> 1.0
685dqadd3078 fma  1  0.0 1   -> 1.0
686dqadd3079 fma  1  0.00 1  -> 1.00
687
688-- some carries
689dqadd3080 fma  1  999999998 1  -> 999999999
690dqadd3081 fma  1  999999999 1  -> 1000000000
691dqadd3082 fma  1   99999999 1  -> 100000000
692dqadd3083 fma  1    9999999 1  -> 10000000
693dqadd3084 fma  1     999999 1  -> 1000000
694dqadd3085 fma  1      99999 1  -> 100000
695dqadd3086 fma  1       9999 1  -> 10000
696dqadd3087 fma  1        999 1  -> 1000
697dqadd3088 fma  1         99 1  -> 100
698dqadd3089 fma  1          9 1  -> 10
699
700
701-- more LHS swaps
702dqadd3090 fma  1  '-56267E-10'   0 ->  '-0.0000056267'
703dqadd3091 fma  1  '-56267E-6'    0 ->  '-0.056267'
704dqadd3092 fma  1  '-56267E-5'    0 ->  '-0.56267'
705dqadd3093 fma  1  '-56267E-4'    0 ->  '-5.6267'
706dqadd3094 fma  1  '-56267E-3'    0 ->  '-56.267'
707dqadd3095 fma  1  '-56267E-2'    0 ->  '-562.67'
708dqadd3096 fma  1  '-56267E-1'    0 ->  '-5626.7'
709dqadd3097 fma  1  '-56267E-0'    0 ->  '-56267'
710dqadd3098 fma  1  '-5E-10'       0 ->  '-5E-10'
711dqadd3099 fma  1  '-5E-7'        0 ->  '-5E-7'
712dqadd3100 fma  1  '-5E-6'        0 ->  '-0.000005'
713dqadd3101 fma  1  '-5E-5'        0 ->  '-0.00005'
714dqadd3102 fma  1  '-5E-4'        0 ->  '-0.0005'
715dqadd3103 fma  1  '-5E-1'        0 ->  '-0.5'
716dqadd3104 fma  1  '-5E0'         0 ->  '-5'
717dqadd3105 fma  1  '-5E1'         0 ->  '-50'
718dqadd3106 fma  1  '-5E5'         0 ->  '-500000'
719dqadd3107 fma  1  '-5E33'        0 ->  '-5000000000000000000000000000000000'
720dqadd3108 fma  1  '-5E34'        0 ->  '-5.000000000000000000000000000000000E+34'  Rounded
721dqadd3109 fma  1  '-5E35'        0 ->  '-5.000000000000000000000000000000000E+35'  Rounded
722dqadd3110 fma  1  '-5E36'        0 ->  '-5.000000000000000000000000000000000E+36'  Rounded
723dqadd3111 fma  1  '-5E100'       0 ->  '-5.000000000000000000000000000000000E+100' Rounded
724
725-- more RHS swaps
726dqadd3113 fma  1  0  '-56267E-10' ->  '-0.0000056267'
727dqadd3114 fma  1  0  '-56267E-6'  ->  '-0.056267'
728dqadd3116 fma  1  0  '-56267E-5'  ->  '-0.56267'
729dqadd3117 fma  1  0  '-56267E-4'  ->  '-5.6267'
730dqadd3119 fma  1  0  '-56267E-3'  ->  '-56.267'
731dqadd3120 fma  1  0  '-56267E-2'  ->  '-562.67'
732dqadd3121 fma  1  0  '-56267E-1'  ->  '-5626.7'
733dqadd3122 fma  1  0  '-56267E-0'  ->  '-56267'
734dqadd3123 fma  1  0  '-5E-10'     ->  '-5E-10'
735dqadd3124 fma  1  0  '-5E-7'      ->  '-5E-7'
736dqadd3125 fma  1  0  '-5E-6'      ->  '-0.000005'
737dqadd3126 fma  1  0  '-5E-5'      ->  '-0.00005'
738dqadd3127 fma  1  0  '-5E-4'      ->  '-0.0005'
739dqadd3128 fma  1  0  '-5E-1'      ->  '-0.5'
740dqadd3129 fma  1  0  '-5E0'       ->  '-5'
741dqadd3130 fma  1  0  '-5E1'       ->  '-50'
742dqadd3131 fma  1  0  '-5E5'       ->  '-500000'
743dqadd3132 fma  1  0  '-5E33'      ->  '-5000000000000000000000000000000000'
744dqadd3133 fma  1  0  '-5E34'      ->  '-5.000000000000000000000000000000000E+34'   Rounded
745dqadd3134 fma  1  0  '-5E35'      ->  '-5.000000000000000000000000000000000E+35'   Rounded
746dqadd3135 fma  1  0  '-5E36'      ->  '-5.000000000000000000000000000000000E+36'   Rounded
747dqadd3136 fma  1  0  '-5E100'     ->  '-5.000000000000000000000000000000000E+100'  Rounded
748
749-- related
750dqadd3137 fma  1   1  '0E-39'      ->  '1.000000000000000000000000000000000'  Rounded
751dqadd3138 fma  1  -1  '0E-39'      ->  '-1.000000000000000000000000000000000' Rounded
752dqadd3139 fma  1  '0E-39' 1        ->  '1.000000000000000000000000000000000'  Rounded
753dqadd3140 fma  1  '0E-39' -1       ->  '-1.000000000000000000000000000000000' Rounded
754dqadd3141 fma  1  1E+29   0.0000   ->  '100000000000000000000000000000.0000'
755dqadd3142 fma  1  1E+29   0.00000  ->  '100000000000000000000000000000.0000'  Rounded
756dqadd3143 fma  1  0.000   1E+30    ->  '1000000000000000000000000000000.000'
757dqadd3144 fma  1  0.0000  1E+30    ->  '1000000000000000000000000000000.000'  Rounded
758
759-- [some of the next group are really constructor tests]
760dqadd3146 fma  1  '00.0'  0       ->  '0.0'
761dqadd3147 fma  1  '0.00'  0       ->  '0.00'
762dqadd3148 fma  1   0      '0.00'  ->  '0.00'
763dqadd3149 fma  1   0      '00.0'  ->  '0.0'
764dqadd3150 fma  1  '00.0'  '0.00'  ->  '0.00'
765dqadd3151 fma  1  '0.00'  '00.0'  ->  '0.00'
766dqadd3152 fma  1  '3'     '.3'    ->  '3.3'
767dqadd3153 fma  1  '3.'    '.3'    ->  '3.3'
768dqadd3154 fma  1  '3.0'   '.3'    ->  '3.3'
769dqadd3155 fma  1  '3.00'  '.3'    ->  '3.30'
770dqadd3156 fma  1  '3'     '3'     ->  '6'
771dqadd3157 fma  1  '3'     '+3'    ->  '6'
772dqadd3158 fma  1  '3'     '-3'    ->  '0'
773dqadd3159 fma  1  '0.3'   '-0.3'  ->  '0.0'
774dqadd3160 fma  1  '0.03'  '-0.03' ->  '0.00'
775
776-- try borderline precision, with carries, etc.
777dqadd3161 fma  1  '1E+12' '-1'    -> '999999999999'
778dqadd3162 fma  1  '1E+12'  '1.11' -> '1000000000001.11'
779dqadd3163 fma  1  '1.11'  '1E+12' -> '1000000000001.11'
780dqadd3164 fma  1  '-1'    '1E+12' -> '999999999999'
781dqadd3165 fma  1  '7E+12' '-1'    -> '6999999999999'
782dqadd3166 fma  1  '7E+12'  '1.11' -> '7000000000001.11'
783dqadd3167 fma  1  '1.11'  '7E+12' -> '7000000000001.11'
784dqadd3168 fma  1  '-1'    '7E+12' -> '6999999999999'
785
786rounding: half_up
787dqadd3170 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555567' -> '5.000000000000000000000000000000001' Inexact Rounded
788dqadd3171 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555566' -> '5.000000000000000000000000000000001' Inexact Rounded
789dqadd3172 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555565' -> '5.000000000000000000000000000000001' Inexact Rounded
790dqadd3173 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555564' -> '5.000000000000000000000000000000000' Inexact Rounded
791dqadd3174 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555553' -> '4.999999999999999999999999999999999' Inexact Rounded
792dqadd3175 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555552' -> '4.999999999999999999999999999999999' Inexact Rounded
793dqadd3176 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555551' -> '4.999999999999999999999999999999999' Inexact Rounded
794dqadd3177 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555550' -> '4.999999999999999999999999999999999' Rounded
795dqadd3178 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555545' -> '4.999999999999999999999999999999999' Inexact Rounded
796dqadd3179 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555544' -> '4.999999999999999999999999999999998' Inexact Rounded
797dqadd3180 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555543' -> '4.999999999999999999999999999999998' Inexact Rounded
798dqadd3181 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555542' -> '4.999999999999999999999999999999998' Inexact Rounded
799dqadd3182 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555541' -> '4.999999999999999999999999999999998' Inexact Rounded
800dqadd3183 fma  1  '4.444444444444444444444444444444444'  '0.5555555555555555555555555555555540' -> '4.999999999999999999999999999999998' Rounded
801
802-- and some more, including residue effects and different roundings
803rounding: half_up
804dqadd3200 fma  1  '1231234567890123456784560123456789' 0             -> '1231234567890123456784560123456789'
805dqadd3201 fma  1  '1231234567890123456784560123456789' 0.000000001   -> '1231234567890123456784560123456789' Inexact Rounded
806dqadd3202 fma  1  '1231234567890123456784560123456789' 0.000001      -> '1231234567890123456784560123456789' Inexact Rounded
807dqadd3203 fma  1  '1231234567890123456784560123456789' 0.1           -> '1231234567890123456784560123456789' Inexact Rounded
808dqadd3204 fma  1  '1231234567890123456784560123456789' 0.4       …

Large files files are truncated, but you can click here to view the full file