• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1------------------------------------------------------------------------
2-- fma.decTest -- decimal 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.59
21
22extended:    1
23precision:   9
24rounding:    half_up
25maxExponent: 384
26minexponent: -383
27
28-- These tests comprise three parts:
29--   1. Sanity checks and other three-operand tests (especially those
30--      where the fused operation makes a difference)
31--   2. Multiply tests (third operand is neutral zero [0E+emax])
32--   3. Addition tests (first operand is 1)
33-- The multiply and addition tests are extensive because FMA may have
34-- its own dedicated multiplication or addition routine(s), and they
35-- also inherently check the left-to-right properties.
36
37-- Sanity checks
38fmax0001 fma  1   1   1 ->   2
39fmax0002 fma  1   1   2 ->   3
40fmax0003 fma  2   2   3 ->   7
41fmax0004 fma  9   9   9 ->  90
42fmax0005 fma -1   1   1 ->   0
43fmax0006 fma -1   1   2 ->   1
44fmax0007 fma -2   2   3 ->  -1
45fmax0008 fma -9   9   9 -> -72
46fmax0011 fma  1  -1   1 ->   0
47fmax0012 fma  1  -1   2 ->   1
48fmax0013 fma  2  -2   3 ->  -1
49fmax0014 fma  9  -9   9 -> -72
50fmax0015 fma  1   1  -1 ->   0
51fmax0016 fma  1   1  -2 ->  -1
52fmax0017 fma  2   2  -3 ->   1
53fmax0018 fma  9   9  -9 ->  72
54fmax0019 fma  3   5   7 ->  22
55fmax0029 fma  3  -5   7 ->  -8
56
57-- non-integer exacts
58fma0100  fma    25.2   63.6   -438  ->  1164.72
59fma0101  fma   0.301  0.380    334  ->  334.114380
60fma0102  fma    49.2   -4.8   23.3  ->  -212.86
61fma0103  fma    4.22  0.079  -94.6  ->  -94.26662
62fma0104  fma     903  0.797  0.887  ->  720.578
63fma0105  fma    6.13   -161   65.9  ->  -921.03
64fma0106  fma    28.2    727   5.45  ->  20506.85
65fma0107  fma       4    605    688  ->  3108
66fma0108  fma    93.3   0.19  0.226  ->  17.953
67fma0109  fma   0.169   -341   5.61  ->  -52.019
68fma0110  fma   -72.2     30  -51.2  ->  -2217.2
69fma0111  fma  -0.409     13   20.4  ->  15.083
70fma0112  fma     317   77.0   19.0  ->  24428.0
71fma0113  fma      47   6.58   1.62  ->  310.88
72fma0114  fma    1.36  0.984  0.493  ->  1.83124
73fma0115  fma    72.7    274   1.56  ->  19921.36
74fma0116  fma     335    847     83  ->  283828
75fma0117  fma     666  0.247   25.4  ->  189.902
76fma0118  fma   -3.87   3.06   78.0  ->  66.1578
77fma0119  fma   0.742    192   35.6  ->  178.064
78fma0120  fma   -91.6   5.29  0.153  ->  -484.411
79
80-- cases where result is different from separate multiply + add; each
81-- is preceded by the result of unfused multiply and add
82-- [this is about 20% of all similar  cases in general]
83--               888565290   1557.96930  -86087.7578  -> 1.38435735E+12
84fma0201  fma     888565290   1557.96930  -86087.7578  -> 1.38435736E+12  Inexact Rounded
85--             -85519342.9    735155419     42010431  -> -6.28700084E+16
86fma0205  fma   -85519342.9    735155419     42010431  -> -6.28700083E+16 Inexact Rounded
87--                -98025.5  -294603.472   10414348.2  -> 2.88890669E+10
88fma0208  fma      -98025.5  -294603.472   10414348.2  -> 2.88890670E+10  Inexact Rounded
89--              5967627.39   83526540.6   498494.810  -> 4.98455271E+14
90fma0211  fma    5967627.39   83526540.6   498494.810  -> 4.98455272E+14  Inexact Rounded
91--               3456.9433    874.39518   197866.615  ->  3220601.18
92fma0216  fma     3456.9433    874.39518   197866.615  ->  3220601.17     Inexact Rounded
93--              62769.8287   2096.98927    48.420317  ->  131627705
94fma0218  fma    62769.8287   2096.98927    48.420317  ->  131627706      Inexact Rounded
95--               -68.81500   59961113.9     -8988862  -> -4.13521291E+9
96fma0219  fma     -68.81500   59961113.9     -8988862  -> -4.13521292E+9  Inexact Rounded
97--              2126341.02   63491.5152    302427455  -> 1.35307040E+11
98fma0226  fma    2126341.02   63491.5152    302427455  -> 1.35307041E+11  Inexact Rounded
99
100
101-- Infinite combinations
102fmax0800 fma  Inf   Inf   Inf    ->  Infinity
103fmax0801 fma  Inf   Inf  -Inf    ->  NaN Invalid_operation
104fmax0802 fma  Inf  -Inf   Inf    ->  NaN Invalid_operation
105fmax0803 fma  Inf  -Inf  -Inf    -> -Infinity
106fmax0804 fma -Inf   Inf   Inf    ->  NaN Invalid_operation
107fmax0805 fma -Inf   Inf  -Inf    -> -Infinity
108fmax0806 fma -Inf  -Inf   Inf    ->  Infinity
109fmax0807 fma -Inf  -Inf  -Inf    ->  NaN Invalid_operation
110fmax0808 fma -Inf   0       1    ->  NaN Invalid_operation
111fmax0809 fma -Inf   0     NaN    ->  NaN Invalid_operation
112
113-- Triple NaN propagation
114fmax0900 fma  NaN2  NaN3  NaN5   ->  NaN2
115fmax0901 fma  0     NaN3  NaN5   ->  NaN3
116fmax0902 fma  0     0     NaN5   ->  NaN5
117-- first sNaN wins (consider qNaN from earlier sNaN being
118-- overridden by an sNaN in third operand)
119fmax0903 fma  sNaN1 sNaN2 sNaN3  ->  NaN1 Invalid_operation
120fmax0904 fma  0     sNaN2 sNaN3  ->  NaN2 Invalid_operation
121fmax0905 fma  0     0     sNaN3  ->  NaN3 Invalid_operation
122fmax0906 fma  sNaN1 sNaN2 sNaN3  ->  NaN1 Invalid_operation
123fmax0907 fma  NaN7  sNaN2 sNaN3  ->  NaN2 Invalid_operation
124fmax0908 fma  NaN7  NaN5  sNaN3  ->  NaN3 Invalid_operation
125
126-- MULTIPLICATION TESTS ------------------------------------------------
127-- sanity checks (as base, above)
128fmax2000 fma 2      2  0E+999999  -> 4
129fmax2001 fma 2      3  0E+999999  -> 6
130fmax2002 fma 5      1  0E+999999  -> 5
131fmax2003 fma 5      2  0E+999999  -> 10
132fmax2004 fma 1.20   2  0E+999999  -> 2.40
133fmax2005 fma 1.20   0  0E+999999  -> 0.00
134fmax2006 fma 1.20  -2  0E+999999  -> -2.40
135fmax2007 fma -1.20  2  0E+999999  -> -2.40
136fmax2008 fma -1.20  0  0E+999999  -> 0.00
137fmax2009 fma -1.20 -2  0E+999999  -> 2.40
138fmax2010 fma 5.09 7.1  0E+999999  -> 36.139
139fmax2011 fma 2.5    4  0E+999999  -> 10.0
140fmax2012 fma 2.50   4  0E+999999  -> 10.00
141fmax2013 fma 1.23456789 1.00000000  0E+999999  -> 1.23456789 Rounded
142fmax2014 fma 9.999999999 9.999999999  0E+999999  -> 100.000000 Inexact Rounded
143fmax2015 fma 2.50   4  0E+999999  -> 10.00
144precision: 6
145fmax2016 fma 2.50   4  0E+999999  -> 10.00
146fmax2017 fma  9.999999  9.999999  0E+999999  ->  100.000 Inexact Rounded
147fmax2018 fma  9.999999 -9.999999  0E+999999  -> -100.000 Inexact Rounded
148fmax2019 fma -9.999999  9.999999  0E+999999  -> -100.000 Inexact Rounded
149fmax2020 fma -9.999999 -9.999999  0E+999999  ->  100.000 Inexact Rounded
150
151-- 1999.12.21: next one is an edge case if intermediate longs are used
152precision: 15
153fmax2059 fma 999999999999 9765625  0E+999999  -> 9.76562499999023E+18 Inexact Rounded
154precision: 30
155fmax2160 fma 999999999999 9765625  0E+999999  -> 9765624999990234375
156precision: 9
157-----
158
159-- zeros, etc.
160fmax2021 fma  0      0      0E+999999  ->  0
161fmax2022 fma  0     -0      0E+999999  ->  0
162fmax2023 fma -0      0      0E+999999  ->  0
163fmax2024 fma -0     -0      0E+999999  ->  0
164fmax2025 fma -0.0   -0.0    0E+999999  ->  0.00
165fmax2026 fma -0.0   -0.0    0E+999999  ->  0.00
166fmax2027 fma -0.0   -0.0    0E+999999  ->  0.00
167fmax2028 fma -0.0   -0.0    0E+999999  ->  0.00
168fmax2030 fma  5.00   1E-3   0E+999999  ->  0.00500
169fmax2031 fma  00.00  0.000  0E+999999  ->  0.00000
170fmax2032 fma  00.00  0E-3   0E+999999  ->  0.00000     -- rhs is 0
171fmax2033 fma  0E-3   00.00  0E+999999  ->  0.00000     -- lhs is 0
172fmax2034 fma -5.00   1E-3   0E+999999  -> -0.00500
173fmax2035 fma -00.00  0.000  0E+999999  ->  0.00000
174fmax2036 fma -00.00  0E-3   0E+999999  ->  0.00000     -- rhs is 0
175fmax2037 fma -0E-3   00.00  0E+999999  ->  0.00000     -- lhs is 0
176fmax2038 fma  5.00  -1E-3   0E+999999  -> -0.00500
177fmax2039 fma  00.00 -0.000  0E+999999  ->  0.00000
178fmax2040 fma  00.00 -0E-3   0E+999999  ->  0.00000     -- rhs is 0
179fmax2041 fma  0E-3  -00.00  0E+999999  ->  0.00000     -- lhs is 0
180fmax2042 fma -5.00  -1E-3   0E+999999  ->  0.00500
181fmax2043 fma -00.00 -0.000  0E+999999  ->  0.00000
182fmax2044 fma -00.00 -0E-3   0E+999999  ->  0.00000     -- rhs is 0
183fmax2045 fma -0E-3  -00.00  0E+999999  ->  0.00000     -- lhs is 0
184
185-- examples from decarith multiply
186fmax2050 fma 1.20 3         0E+999999  -> 3.60
187fmax2051 fma 7    3         0E+999999  -> 21
188fmax2052 fma 0.9  0.8       0E+999999  -> 0.72
189fmax2053 fma 0.9  -0        0E+999999  -> 0.0
190fmax2054 fma 654321 654321  0E+999999  -> 4.28135971E+11  Inexact Rounded
191
192fmax2060 fma 123.45 1e7   0E+999999  ->  1.2345E+9
193fmax2061 fma 123.45 1e8   0E+999999  ->  1.2345E+10
194fmax2062 fma 123.45 1e+9  0E+999999  ->  1.2345E+11
195fmax2063 fma 123.45 1e10  0E+999999  ->  1.2345E+12
196fmax2064 fma 123.45 1e11  0E+999999  ->  1.2345E+13
197fmax2065 fma 123.45 1e12  0E+999999  ->  1.2345E+14
198fmax2066 fma 123.45 1e13  0E+999999  ->  1.2345E+15
199
200
201-- test some intermediate lengths
202precision: 9
203fmax2080 fma 0.1 123456789           0E+999999  -> 12345678.9
204fmax2081 fma 0.1 1234567891          0E+999999  -> 123456789 Inexact Rounded
205fmax2082 fma 0.1 12345678912         0E+999999  -> 1.23456789E+9 Inexact Rounded
206fmax2083 fma 0.1 12345678912345      0E+999999  -> 1.23456789E+12 Inexact Rounded
207fmax2084 fma 0.1 123456789           0E+999999  -> 12345678.9
208precision: 8
209fmax2085 fma 0.1 12345678912         0E+999999  -> 1.2345679E+9 Inexact Rounded
210fmax2086 fma 0.1 12345678912345      0E+999999  -> 1.2345679E+12 Inexact Rounded
211precision: 7
212fmax2087 fma 0.1 12345678912         0E+999999  -> 1.234568E+9 Inexact Rounded
213fmax2088 fma 0.1 12345678912345      0E+999999  -> 1.234568E+12 Inexact Rounded
214
215precision: 9
216fmax2090 fma 123456789          0.1  0E+999999  -> 12345678.9
217fmax2091 fma 1234567891         0.1  0E+999999  -> 123456789 Inexact Rounded
218fmax2092 fma 12345678912        0.1  0E+999999  -> 1.23456789E+9 Inexact Rounded
219fmax2093 fma 12345678912345     0.1  0E+999999  -> 1.23456789E+12 Inexact Rounded
220fmax2094 fma 123456789          0.1  0E+999999  -> 12345678.9
221precision: 8
222fmax2095 fma 12345678912        0.1  0E+999999  -> 1.2345679E+9 Inexact Rounded
223fmax2096 fma 12345678912345     0.1  0E+999999  -> 1.2345679E+12 Inexact Rounded
224precision: 7
225fmax2097 fma 12345678912        0.1  0E+999999  -> 1.234568E+9 Inexact Rounded
226fmax2098 fma 12345678912345     0.1  0E+999999  -> 1.234568E+12 Inexact Rounded
227
228-- test some more edge cases and carries
229maxexponent: 9999
230minexponent: -9999
231precision: 33
232fmax2101 fma 9 9    0E+999999  -> 81
233fmax2102 fma 9 90    0E+999999  -> 810
234fmax2103 fma 9 900    0E+999999  -> 8100
235fmax2104 fma 9 9000    0E+999999  -> 81000
236fmax2105 fma 9 90000    0E+999999  -> 810000
237fmax2106 fma 9 900000    0E+999999  -> 8100000
238fmax2107 fma 9 9000000    0E+999999  -> 81000000
239fmax2108 fma 9 90000000    0E+999999  -> 810000000
240fmax2109 fma 9 900000000    0E+999999  -> 8100000000
241fmax2110 fma 9 9000000000    0E+999999  -> 81000000000
242fmax2111 fma 9 90000000000    0E+999999  -> 810000000000
243fmax2112 fma 9 900000000000    0E+999999  -> 8100000000000
244fmax2113 fma 9 9000000000000    0E+999999  -> 81000000000000
245fmax2114 fma 9 90000000000000    0E+999999  -> 810000000000000
246fmax2115 fma 9 900000000000000    0E+999999  -> 8100000000000000
247fmax2116 fma 9 9000000000000000    0E+999999  -> 81000000000000000
248fmax2117 fma 9 90000000000000000    0E+999999  -> 810000000000000000
249fmax2118 fma 9 900000000000000000    0E+999999  -> 8100000000000000000
250fmax2119 fma 9 9000000000000000000    0E+999999  -> 81000000000000000000
251fmax2120 fma 9 90000000000000000000    0E+999999  -> 810000000000000000000
252fmax2121 fma 9 900000000000000000000    0E+999999  -> 8100000000000000000000
253fmax2122 fma 9 9000000000000000000000    0E+999999  -> 81000000000000000000000
254fmax2123 fma 9 90000000000000000000000    0E+999999  -> 810000000000000000000000
255-- test some more edge cases without carries
256fmax2131 fma 3 3    0E+999999  -> 9
257fmax2132 fma 3 30    0E+999999  -> 90
258fmax2133 fma 3 300    0E+999999  -> 900
259fmax2134 fma 3 3000    0E+999999  -> 9000
260fmax2135 fma 3 30000    0E+999999  -> 90000
261fmax2136 fma 3 300000    0E+999999  -> 900000
262fmax2137 fma 3 3000000    0E+999999  -> 9000000
263fmax2138 fma 3 30000000    0E+999999  -> 90000000
264fmax2139 fma 3 300000000    0E+999999  -> 900000000
265fmax2140 fma 3 3000000000    0E+999999  -> 9000000000
266fmax2141 fma 3 30000000000    0E+999999  -> 90000000000
267fmax2142 fma 3 300000000000    0E+999999  -> 900000000000
268fmax2143 fma 3 3000000000000    0E+999999  -> 9000000000000
269fmax2144 fma 3 30000000000000    0E+999999  -> 90000000000000
270fmax2145 fma 3 300000000000000    0E+999999  -> 900000000000000
271fmax2146 fma 3 3000000000000000    0E+999999  -> 9000000000000000
272fmax2147 fma 3 30000000000000000    0E+999999  -> 90000000000000000
273fmax2148 fma 3 300000000000000000    0E+999999  -> 900000000000000000
274fmax2149 fma 3 3000000000000000000    0E+999999  -> 9000000000000000000
275fmax2150 fma 3 30000000000000000000    0E+999999  -> 90000000000000000000
276fmax2151 fma 3 300000000000000000000    0E+999999  -> 900000000000000000000
277fmax2152 fma 3 3000000000000000000000    0E+999999  -> 9000000000000000000000
278fmax2153 fma 3 30000000000000000000000    0E+999999  -> 90000000000000000000000
279
280maxexponent: 999999
281minexponent: -999999
282precision: 9
283-- test some cases that are close to exponent overflow/underflow
284fmax2170 fma 1 9e999999     0E+999999  -> 9E+999999
285fmax2171 fma 1 9.9e999999   0E+999999  -> 9.9E+999999
286fmax2172 fma 1 9.99e999999  0E+999999  -> 9.99E+999999
287fmax2173 fma 9e999999    1  0E+999999  -> 9E+999999
288fmax2174 fma 9.9e999999  1  0E+999999  -> 9.9E+999999
289fmax2176 fma 9.99e999999 1  0E+999999  -> 9.99E+999999
290fmax2177 fma 1 9.99999e999999  0E+999999  -> 9.99999E+999999
291fmax2178 fma 9.99999e999999 1  0E+999999  -> 9.99999E+999999
292
293fmax2180 fma 0.1 9e-999998    0E+999999  -> 9E-999999
294fmax2181 fma 0.1 99e-999998   0E+999999  -> 9.9E-999998
295fmax2182 fma 0.1 999e-999998  0E+999999  -> 9.99E-999997
296
297fmax2183 fma 0.1 9e-999998      0E+999999  -> 9E-999999
298fmax2184 fma 0.1 99e-999998     0E+999999  -> 9.9E-999998
299fmax2185 fma 0.1 999e-999998    0E+999999  -> 9.99E-999997
300fmax2186 fma 0.1 999e-999997    0E+999999  -> 9.99E-999996
301fmax2187 fma 0.1 9999e-999997   0E+999999  -> 9.999E-999995
302fmax2188 fma 0.1 99999e-999997  0E+999999  -> 9.9999E-999994
303
304fmax2190 fma 1 9e-999998    0E+999999  -> 9E-999998
305fmax2191 fma 1 99e-999998   0E+999999  -> 9.9E-999997
306fmax2192 fma 1 999e-999998  0E+999999  -> 9.99E-999996
307fmax2193 fma 9e-999998   1  0E+999999  -> 9E-999998
308fmax2194 fma 99e-999998  1  0E+999999  -> 9.9E-999997
309fmax2195 fma 999e-999998 1  0E+999999  -> 9.99E-999996
310
311-- long operand triangle
312precision: 33
313fmax2246 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193369671916511992830 Inexact Rounded
314precision: 32
315fmax2247 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119336967191651199283  Inexact Rounded
316precision: 31
317fmax2248 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908011933696719165119928   Inexact Rounded
318precision: 30
319fmax2249 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193369671916511993    Inexact Rounded
320precision: 29
321fmax2250 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119336967191651199     Inexact Rounded
322precision: 28
323fmax2251 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908011933696719165120      Inexact Rounded
324precision: 27
325fmax2252 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193369671916512       Inexact Rounded
326precision: 26
327fmax2253 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119336967191651        Inexact Rounded
328precision: 25
329fmax2254 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908011933696719165         Inexact Rounded
330precision: 24
331fmax2255 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193369671917          Inexact Rounded
332precision: 23
333fmax2256 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119336967192           Inexact Rounded
334precision: 22
335fmax2257 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908011933696719            Inexact Rounded
336precision: 21
337fmax2258 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193369672             Inexact Rounded
338precision: 20
339fmax2259 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119336967              Inexact Rounded
340precision: 19
341fmax2260 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908011933697               Inexact Rounded
342precision: 18
343fmax2261 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193370                Inexact Rounded
344precision: 17
345fmax2262 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119337                 Inexact Rounded
346precision: 16
347fmax2263 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908011934                  Inexact Rounded
348precision: 15
349fmax2264 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801193                   Inexact Rounded
350precision: 14
351fmax2265 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080119                    Inexact Rounded
352precision: 13
353fmax2266 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908012                     Inexact Rounded
354precision: 12
355fmax2267 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.290801                      Inexact Rounded
356precision: 11
357fmax2268 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29080                       Inexact Rounded
358precision: 10
359fmax2269 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.2908                        Inexact Rounded
360precision:  9
361fmax2270 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.291                         Inexact Rounded
362precision:  8
363fmax2271 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.29                          Inexact Rounded
364precision:  7
365fmax2272 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433.3                           Inexact Rounded
366precision:  6
367fmax2273 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 145433                            Inexact Rounded
368precision:  5
369fmax2274 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 1.4543E+5                         Inexact Rounded
370precision:  4
371fmax2275 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 1.454E+5                         Inexact Rounded
372precision:  3
373fmax2276 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 1.45E+5                         Inexact Rounded
374precision:  2
375fmax2277 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 1.5E+5                         Inexact Rounded
376precision:  1
377fmax2278 fma 30269.587755640502150977251770554 4.8046009735990873395936309640543  0E+999999  -> 1E+5                          Inexact Rounded
378
379-- test some edge cases with exact rounding
380maxexponent: 9999
381minexponent: -9999
382precision: 9
383fmax2301 fma 9 9    0E+999999  -> 81
384fmax2302 fma 9 90    0E+999999  -> 810
385fmax2303 fma 9 900    0E+999999  -> 8100
386fmax2304 fma 9 9000    0E+999999  -> 81000
387fmax2305 fma 9 90000    0E+999999  -> 810000
388fmax2306 fma 9 900000    0E+999999  -> 8100000
389fmax2307 fma 9 9000000    0E+999999  -> 81000000
390fmax2308 fma 9 90000000    0E+999999  -> 810000000
391fmax2309 fma 9 900000000    0E+999999  -> 8.10000000E+9   Rounded
392fmax2310 fma 9 9000000000    0E+999999  -> 8.10000000E+10  Rounded
393fmax2311 fma 9 90000000000    0E+999999  -> 8.10000000E+11  Rounded
394fmax2312 fma 9 900000000000    0E+999999  -> 8.10000000E+12  Rounded
395fmax2313 fma 9 9000000000000    0E+999999  -> 8.10000000E+13  Rounded
396fmax2314 fma 9 90000000000000    0E+999999  -> 8.10000000E+14  Rounded
397fmax2315 fma 9 900000000000000    0E+999999  -> 8.10000000E+15  Rounded
398fmax2316 fma 9 9000000000000000    0E+999999  -> 8.10000000E+16  Rounded
399fmax2317 fma 9 90000000000000000    0E+999999  -> 8.10000000E+17  Rounded
400fmax2318 fma 9 900000000000000000    0E+999999  -> 8.10000000E+18  Rounded
401fmax2319 fma 9 9000000000000000000    0E+999999  -> 8.10000000E+19  Rounded
402fmax2320 fma 9 90000000000000000000    0E+999999  -> 8.10000000E+20  Rounded
403fmax2321 fma 9 900000000000000000000    0E+999999  -> 8.10000000E+21  Rounded
404fmax2322 fma 9 9000000000000000000000    0E+999999  -> 8.10000000E+22  Rounded
405fmax2323 fma 9 90000000000000000000000    0E+999999  -> 8.10000000E+23  Rounded
406
407-- fastpath breakers
408precision:   29
409fmax2330 fma 1.491824697641270317824852952837224 1.105170918075647624811707826490246514675628614562883537345747603  0E+999999  -> 1.6487212707001281468486507878 Inexact Rounded
410precision:   55
411fmax2331 fma 0.8958341352965282506768545828765117803873717284891040428 0.8958341352965282506768545828765117803873717284891040428  0E+999999  -> 0.8025187979624784829842553829934069955890983696752228299 Inexact Rounded
412
413
414-- tryzeros cases
415precision:   7
416rounding:    half_up
417maxExponent: 92
418minexponent: -92
419fmax2504  fma  0E-60 1000E-60   0E+999999  -> 0E-98 Clamped
420fmax2505  fma  100E+60 0E+60    0E+999999  -> 0E+92 Clamped
421
422-- mixed with zeros
423maxexponent: 999999
424minexponent: -999999
425precision: 9
426fmax2541 fma  0    -1      0E+999999  ->  0
427fmax2542 fma -0    -1      0E+999999  ->  0
428fmax2543 fma  0     1      0E+999999  ->  0
429fmax2544 fma -0     1      0E+999999  ->  0
430fmax2545 fma -1     0      0E+999999  ->  0
431fmax2546 fma -1    -0      0E+999999  ->  0
432fmax2547 fma  1     0      0E+999999  ->  0
433fmax2548 fma  1    -0      0E+999999  ->  0
434
435fmax2551 fma  0.0  -1      0E+999999  ->  0.0
436fmax2552 fma -0.0  -1      0E+999999  ->  0.0
437fmax2553 fma  0.0   1      0E+999999  ->  0.0
438fmax2554 fma -0.0   1      0E+999999  ->  0.0
439fmax2555 fma -1.0   0      0E+999999  ->  0.0
440fmax2556 fma -1.0  -0      0E+999999  ->  0.0
441fmax2557 fma  1.0   0      0E+999999  ->  0.0
442fmax2558 fma  1.0  -0      0E+999999  ->  0.0
443
444fmax2561 fma  0    -1.0    0E+999999  ->  0.0
445fmax2562 fma -0    -1.0    0E+999999  ->  0.0
446fmax2563 fma  0     1.0    0E+999999  ->  0.0
447fmax2564 fma -0     1.0    0E+999999  ->  0.0
448fmax2565 fma -1     0.0    0E+999999  ->  0.0
449fmax2566 fma -1    -0.0    0E+999999  ->  0.0
450fmax2567 fma  1     0.0    0E+999999  ->  0.0
451fmax2568 fma  1    -0.0    0E+999999  ->  0.0
452
453fmax2571 fma  0.0  -1.0    0E+999999  ->  0.00
454fmax2572 fma -0.0  -1.0    0E+999999  ->  0.00
455fmax2573 fma  0.0   1.0    0E+999999  ->  0.00
456fmax2574 fma -0.0   1.0    0E+999999  ->  0.00
457fmax2575 fma -1.0   0.0    0E+999999  ->  0.00
458fmax2576 fma -1.0  -0.0    0E+999999  ->  0.00
459fmax2577 fma  1.0   0.0    0E+999999  ->  0.00
460fmax2578 fma  1.0  -0.0    0E+999999  ->  0.00
461
462
463-- Specials
464fmax2580 fma  Inf  -Inf    0E+999999  -> -Infinity
465fmax2581 fma  Inf  -1000   0E+999999  -> -Infinity
466fmax2582 fma  Inf  -1      0E+999999  -> -Infinity
467fmax2583 fma  Inf  -0      0E+999999  ->  NaN  Invalid_operation
468fmax2584 fma  Inf   0      0E+999999  ->  NaN  Invalid_operation
469fmax2585 fma  Inf   1      0E+999999  ->  Infinity
470fmax2586 fma  Inf   1000   0E+999999  ->  Infinity
471fmax2587 fma  Inf   Inf    0E+999999  ->  Infinity
472fmax2588 fma -1000  Inf    0E+999999  -> -Infinity
473fmax2589 fma -Inf   Inf    0E+999999  -> -Infinity
474fmax2590 fma -1     Inf    0E+999999  -> -Infinity
475fmax2591 fma -0     Inf    0E+999999  ->  NaN  Invalid_operation
476fmax2592 fma  0     Inf    0E+999999  ->  NaN  Invalid_operation
477fmax2593 fma  1     Inf    0E+999999  ->  Infinity
478fmax2594 fma  1000  Inf    0E+999999  ->  Infinity
479fmax2595 fma  Inf   Inf    0E+999999  ->  Infinity
480
481fmax2600 fma -Inf  -Inf    0E+999999  ->  Infinity
482fmax2601 fma -Inf  -1000   0E+999999  ->  Infinity
483fmax2602 fma -Inf  -1      0E+999999  ->  Infinity
484fmax2603 fma -Inf  -0      0E+999999  ->  NaN  Invalid_operation
485fmax2604 fma -Inf   0      0E+999999  ->  NaN  Invalid_operation
486fmax2605 fma -Inf   1      0E+999999  -> -Infinity
487fmax2606 fma -Inf   1000   0E+999999  -> -Infinity
488fmax2607 fma -Inf   Inf    0E+999999  -> -Infinity
489fmax2608 fma -1000  Inf    0E+999999  -> -Infinity
490fmax2609 fma -Inf  -Inf    0E+999999  ->  Infinity
491fmax2610 fma -1    -Inf    0E+999999  ->  Infinity
492fmax2611 fma -0    -Inf    0E+999999  ->  NaN  Invalid_operation
493fmax2612 fma  0    -Inf    0E+999999  ->  NaN  Invalid_operation
494fmax2613 fma  1    -Inf    0E+999999  -> -Infinity
495fmax2614 fma  1000 -Inf    0E+999999  -> -Infinity
496fmax2615 fma  Inf  -Inf    0E+999999  -> -Infinity
497
498fmax2621 fma  NaN -Inf     0E+999999  ->  NaN
499fmax2622 fma  NaN -1000    0E+999999  ->  NaN
500fmax2623 fma  NaN -1       0E+999999  ->  NaN
501fmax2624 fma  NaN -0       0E+999999  ->  NaN
502fmax2625 fma  NaN  0       0E+999999  ->  NaN
503fmax2626 fma  NaN  1       0E+999999  ->  NaN
504fmax2627 fma  NaN  1000    0E+999999  ->  NaN
505fmax2628 fma  NaN  Inf     0E+999999  ->  NaN
506fmax2629 fma  NaN  NaN     0E+999999  ->  NaN
507fmax2630 fma -Inf  NaN     0E+999999  ->  NaN
508fmax2631 fma -1000 NaN     0E+999999  ->  NaN
509fmax2632 fma -1    NaN     0E+999999  ->  NaN
510fmax2633 fma -0    NaN     0E+999999  ->  NaN
511fmax2634 fma  0    NaN     0E+999999  ->  NaN
512fmax2635 fma  1    NaN     0E+999999  ->  NaN
513fmax2636 fma  1000 NaN     0E+999999  ->  NaN
514fmax2637 fma  Inf  NaN     0E+999999  ->  NaN
515
516fmax2641 fma  sNaN -Inf    0E+999999  ->  NaN  Invalid_operation
517fmax2642 fma  sNaN -1000   0E+999999  ->  NaN  Invalid_operation
518fmax2643 fma  sNaN -1      0E+999999  ->  NaN  Invalid_operation
519fmax2644 fma  sNaN -0      0E+999999  ->  NaN  Invalid_operation
520fmax2645 fma  sNaN  0      0E+999999  ->  NaN  Invalid_operation
521fmax2646 fma  sNaN  1      0E+999999  ->  NaN  Invalid_operation
522fmax2647 fma  sNaN  1000   0E+999999  ->  NaN  Invalid_operation
523fmax2648 fma  sNaN  NaN    0E+999999  ->  NaN  Invalid_operation
524fmax2649 fma  sNaN sNaN    0E+999999  ->  NaN  Invalid_operation
525fmax2650 fma  NaN  sNaN    0E+999999  ->  NaN  Invalid_operation
526fmax2651 fma -Inf  sNaN    0E+999999  ->  NaN  Invalid_operation
527fmax2652 fma -1000 sNaN    0E+999999  ->  NaN  Invalid_operation
528fmax2653 fma -1    sNaN    0E+999999  ->  NaN  Invalid_operation
529fmax2654 fma -0    sNaN    0E+999999  ->  NaN  Invalid_operation
530fmax2655 fma  0    sNaN    0E+999999  ->  NaN  Invalid_operation
531fmax2656 fma  1    sNaN    0E+999999  ->  NaN  Invalid_operation
532fmax2657 fma  1000 sNaN    0E+999999  ->  NaN  Invalid_operation
533fmax2658 fma  Inf  sNaN    0E+999999  ->  NaN  Invalid_operation
534fmax2659 fma  NaN  sNaN    0E+999999  ->  NaN  Invalid_operation
535
536-- propagating NaNs
537fmax2661 fma  NaN9 -Inf    0E+999999  ->  NaN9
538fmax2662 fma  NaN8  999    0E+999999  ->  NaN8
539fmax2663 fma  NaN71 Inf    0E+999999  ->  NaN71
540fmax2664 fma  NaN6  NaN5   0E+999999  ->  NaN6
541fmax2665 fma -Inf   NaN4   0E+999999  ->  NaN4
542fmax2666 fma -999   NaN33  0E+999999  ->  NaN33
543fmax2667 fma  Inf   NaN2   0E+999999  ->  NaN2
544
545fmax2671 fma  sNaN99 -Inf     0E+999999  ->  NaN99 Invalid_operation
546fmax2672 fma  sNaN98 -11      0E+999999  ->  NaN98 Invalid_operation
547fmax2673 fma  sNaN97  NaN     0E+999999  ->  NaN97 Invalid_operation
548fmax2674 fma  sNaN16 sNaN94   0E+999999  ->  NaN16 Invalid_operation
549fmax2675 fma  NaN95  sNaN93   0E+999999  ->  NaN93 Invalid_operation
550fmax2676 fma -Inf    sNaN92   0E+999999  ->  NaN92 Invalid_operation
551fmax2677 fma  088    sNaN91   0E+999999  ->  NaN91 Invalid_operation
552fmax2678 fma  Inf    sNaN90   0E+999999  ->  NaN90 Invalid_operation
553fmax2679 fma  NaN    sNaN89   0E+999999  ->  NaN89 Invalid_operation
554
555fmax2681 fma -NaN9 -Inf    0E+999999  -> -NaN9
556fmax2682 fma -NaN8  999    0E+999999  -> -NaN8
557fmax2683 fma -NaN71 Inf    0E+999999  -> -NaN71
558fmax2684 fma -NaN6 -NaN5   0E+999999  -> -NaN6
559fmax2685 fma -Inf  -NaN4   0E+999999  -> -NaN4
560fmax2686 fma -999  -NaN33  0E+999999  -> -NaN33
561fmax2687 fma  Inf  -NaN2   0E+999999  -> -NaN2
562
563fmax2691 fma -sNaN99 -Inf     0E+999999  -> -NaN99 Invalid_operation
564fmax2692 fma -sNaN98 -11      0E+999999  -> -NaN98 Invalid_operation
565fmax2693 fma -sNaN97  NaN     0E+999999  -> -NaN97 Invalid_operation
566fmax2694 fma -sNaN16 -sNaN94  0E+999999  -> -NaN16 Invalid_operation
567fmax2695 fma -NaN95  -sNaN93  0E+999999  -> -NaN93 Invalid_operation
568fmax2696 fma -Inf    -sNaN92  0E+999999  -> -NaN92 Invalid_operation
569fmax2697 fma  088    -sNaN91  0E+999999  -> -NaN91 Invalid_operation
570fmax2698 fma  Inf    -sNaN90  0E+999999  -> -NaN90 Invalid_operation
571fmax2699 fma -NaN    -sNaN89  0E+999999  -> -NaN89 Invalid_operation
572
573fmax2701 fma -NaN  -Inf    0E+999999  -> -NaN
574fmax2702 fma -NaN   999    0E+999999  -> -NaN
575fmax2703 fma -NaN   Inf    0E+999999  -> -NaN
576fmax2704 fma -NaN  -NaN    0E+999999  -> -NaN
577fmax2705 fma -Inf  -NaN0   0E+999999  -> -NaN
578fmax2706 fma -999  -NaN    0E+999999  -> -NaN
579fmax2707 fma  Inf  -NaN    0E+999999  -> -NaN
580
581fmax2711 fma -sNaN   -Inf     0E+999999  -> -NaN Invalid_operation
582fmax2712 fma -sNaN   -11      0E+999999  -> -NaN Invalid_operation
583fmax2713 fma -sNaN00  NaN     0E+999999  -> -NaN Invalid_operation
584fmax2714 fma -sNaN   -sNaN    0E+999999  -> -NaN Invalid_operation
585fmax2715 fma -NaN    -sNaN    0E+999999  -> -NaN Invalid_operation
586fmax2716 fma -Inf    -sNaN    0E+999999  -> -NaN Invalid_operation
587fmax2717 fma  088    -sNaN    0E+999999  -> -NaN Invalid_operation
588fmax2718 fma  Inf    -sNaN    0E+999999  -> -NaN Invalid_operation
589fmax2719 fma -NaN    -sNaN    0E+999999  -> -NaN Invalid_operation
590
591-- overflow and underflow tests .. note subnormal results
592maxexponent: 999999
593minexponent: -999999
594fmax2730 fma +1.23456789012345E-0 9E+999999  0E+999999  -> Infinity Inexact Overflow Rounded
595fmax2731 fma 9E+999999 +1.23456789012345E-0  0E+999999  -> Infinity Inexact Overflow Rounded
596fmax2732 fma +0.100 9E-999999  0E+999999  -> 9.00E-1000000 Subnormal
597fmax2733 fma 9E-999999 +0.100  0E+999999  -> 9.00E-1000000 Subnormal
598fmax2735 fma -1.23456789012345E-0 9E+999999  0E+999999  -> -Infinity Inexact Overflow Rounded
599fmax2736 fma 9E+999999 -1.23456789012345E-0  0E+999999  -> -Infinity Inexact Overflow Rounded
600fmax2737 fma -0.100 9E-999999  0E+999999  -> -9.00E-1000000 Subnormal
601fmax2738 fma 9E-999999 -0.100  0E+999999  -> -9.00E-1000000 Subnormal
602
603-- signs
604fmax2751 fma  1e+777777  1e+411111  0E+999999  ->  Infinity Overflow Inexact Rounded
605fmax2752 fma  1e+777777 -1e+411111  0E+999999  -> -Infinity Overflow Inexact Rounded
606fmax2753 fma -1e+777777  1e+411111  0E+999999  -> -Infinity Overflow Inexact Rounded
607fmax2754 fma -1e+777777 -1e+411111  0E+999999  ->  Infinity Overflow Inexact Rounded
608fmax2755 fma  1e-777777  1e-411111  0E+999999  ->  0E-1000007 Underflow Subnormal Inexact Rounded Clamped
609fmax2756 fma  1e-777777 -1e-411111  0E+999999  -> -0E-1000007 Underflow Subnormal Inexact Rounded Clamped
610fmax2757 fma -1e-777777  1e-411111  0E+999999  -> -0E-1000007 Underflow Subnormal Inexact Rounded Clamped
611fmax2758 fma -1e-777777 -1e-411111  0E+999999  ->  0E-1000007 Underflow Subnormal Inexact Rounded Clamped
612
613-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
614precision: 9
615fmax2760 fma 1e-600000 1e-400001  0E+999999  -> 1E-1000001 Subnormal
616fmax2761 fma 1e-600000 1e-400002  0E+999999  -> 1E-1000002 Subnormal
617fmax2762 fma 1e-600000 1e-400003  0E+999999  -> 1E-1000003 Subnormal
618fmax2763 fma 1e-600000 1e-400004  0E+999999  -> 1E-1000004 Subnormal
619fmax2764 fma 1e-600000 1e-400005  0E+999999  -> 1E-1000005 Subnormal
620fmax2765 fma 1e-600000 1e-400006  0E+999999  -> 1E-1000006 Subnormal
621fmax2766 fma 1e-600000 1e-400007  0E+999999  -> 1E-1000007 Subnormal
622fmax2767 fma 1e-600000 1e-400008  0E+999999  -> 0E-1000007 Underflow Subnormal Inexact Rounded Clamped
623fmax2768 fma 1e-600000 1e-400009  0E+999999  -> 0E-1000007 Underflow Subnormal Inexact Rounded Clamped
624fmax2769 fma 1e-600000 1e-400010  0E+999999  -> 0E-1000007 Underflow Subnormal Inexact Rounded Clamped
625-- [no equivalent of 'subnormal' for overflow]
626fmax2770 fma 1e+600000 1e+400001  0E+999999  -> Infinity Overflow Inexact Rounded
627fmax2771 fma 1e+600000 1e+400002  0E+999999  -> Infinity Overflow Inexact Rounded
628fmax2772 fma 1e+600000 1e+400003  0E+999999  -> Infinity Overflow Inexact Rounded
629fmax2773 fma 1e+600000 1e+400004  0E+999999  -> Infinity Overflow Inexact Rounded
630fmax2774 fma 1e+600000 1e+400005  0E+999999  -> Infinity Overflow Inexact Rounded
631fmax2775 fma 1e+600000 1e+400006  0E+999999  -> Infinity Overflow Inexact Rounded
632fmax2776 fma 1e+600000 1e+400007  0E+999999  -> Infinity Overflow Inexact Rounded
633fmax2777 fma 1e+600000 1e+400008  0E+999999  -> Infinity Overflow Inexact Rounded
634fmax2778 fma 1e+600000 1e+400009  0E+999999  -> Infinity Overflow Inexact Rounded
635fmax2779 fma 1e+600000 1e+400010  0E+999999  -> Infinity Overflow Inexact Rounded
636
637-- 'subnormal' test edge condition at higher precisions
638precision: 99
639fmax2780 fma 1e-600000 1e-400007  0E+999999  -> 1E-1000007 Subnormal
640fmax2781 fma 1e-600000 1e-400008  0E+999999  -> 1E-1000008 Subnormal
641fmax2782 fma 1e-600000 1e-400097  0E+999999  -> 1E-1000097 Subnormal
642fmax2783 fma 1e-600000 1e-400098  0E+999999  -> 0E-1000097 Underflow Subnormal Inexact Rounded Clamped
643precision: 999
644fmax2784 fma 1e-600000 1e-400997  0E+999999  -> 1E-1000997 Subnormal
645fmax2785 fma 1e-600000 1e-400998  0E+999999  -> 0E-1000997 Underflow Subnormal Inexact Rounded Clamped
646
647-- test subnormals rounding
648precision:   5
649maxExponent: 999
650minexponent: -999
651rounding:    half_even
652
653fmax2801 fma  1.0000E-999  1      0E+999999  -> 1.0000E-999
654fmax2802 fma  1.000E-999   1e-1   0E+999999  -> 1.000E-1000 Subnormal
655fmax2803 fma  1.00E-999    1e-2   0E+999999  -> 1.00E-1001  Subnormal
656fmax2804 fma  1.0E-999     1e-3   0E+999999  -> 1.0E-1002   Subnormal
657fmax2805 fma  1.0E-999     1e-4   0E+999999  -> 1E-1003     Subnormal Rounded
658fmax2806 fma  1.3E-999     1e-4   0E+999999  -> 1E-1003     Underflow Subnormal Inexact Rounded
659fmax2807 fma  1.5E-999     1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
660fmax2808 fma  1.7E-999     1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
661fmax2809 fma  2.3E-999     1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
662fmax2810 fma  2.5E-999     1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
663fmax2811 fma  2.7E-999     1e-4   0E+999999  -> 3E-1003     Underflow Subnormal Inexact Rounded
664fmax2812 fma  1.49E-999    1e-4   0E+999999  -> 1E-1003     Underflow Subnormal Inexact Rounded
665fmax2813 fma  1.50E-999    1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
666fmax2814 fma  1.51E-999    1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
667fmax2815 fma  2.49E-999    1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
668fmax2816 fma  2.50E-999    1e-4   0E+999999  -> 2E-1003     Underflow Subnormal Inexact Rounded
669fmax2817 fma  2.51E-999    1e-4   0E+999999  -> 3E-1003     Underflow Subnormal Inexact Rounded
670
671fmax2818 fma  1E-999       1e-4   0E+999999  -> 1E-1003     Subnormal
672fmax2819 fma  3E-999       1e-5   0E+999999  -> 0E-1003     Underflow Subnormal Inexact Rounded Clamped
673fmax2820 fma  5E-999       1e-5   0E+999999  -> 0E-1003     Underflow Subnormal Inexact Rounded Clamped
674fmax2821 fma  7E-999       1e-5   0E+999999  -> 1E-1003     Underflow Subnormal Inexact Rounded
675fmax2822 fma  9E-999       1e-5   0E+999999  -> 1E-1003     Underflow Subnormal Inexact Rounded
676fmax2823 fma  9.9E-999     1e-5   0E+999999  -> 1E-1003     Underflow Subnormal Inexact Rounded
677
678fmax2824 fma  1E-999      -1e-4   0E+999999  -> -1E-1003    Subnormal
679fmax2825 fma  3E-999      -1e-5   0E+999999  -> -0E-1003    Underflow Subnormal Inexact Rounded Clamped
680fmax2826 fma -5E-999       1e-5   0E+999999  -> -0E-1003    Underflow Subnormal Inexact Rounded Clamped
681fmax2827 fma  7E-999      -1e-5   0E+999999  -> -1E-1003    Underflow Subnormal Inexact Rounded
682fmax2828 fma -9E-999       1e-5   0E+999999  -> -1E-1003    Underflow Subnormal Inexact Rounded
683fmax2829 fma  9.9E-999    -1e-5   0E+999999  -> -1E-1003    Underflow Subnormal Inexact Rounded
684fmax2830 fma  3.0E-999    -1e-5   0E+999999  -> -0E-1003    Underflow Subnormal Inexact Rounded Clamped
685
686fmax2831 fma  1.0E-501     1e-501  0E+999999  -> 1.0E-1002   Subnormal
687fmax2832 fma  2.0E-501     2e-501  0E+999999  -> 4.0E-1002   Subnormal
688fmax2833 fma  4.0E-501     4e-501  0E+999999  -> 1.60E-1001  Subnormal
689fmax2834 fma 10.0E-501    10e-501  0E+999999  -> 1.000E-1000 Subnormal
690fmax2835 fma 30.0E-501    30e-501  0E+999999  -> 9.000E-1000 Subnormal
691fmax2836 fma 40.0E-501    40e-501  0E+999999  -> 1.6000E-999
692
693-- squares
694fmax2840 fma  1E-502       1e-502  0E+999999  -> 0E-1003     Underflow Subnormal Inexact Rounded Clamped
695fmax2841 fma  1E-501       1e-501  0E+999999  -> 1E-1002     Subnormal
696fmax2842 fma  2E-501       2e-501  0E+999999  -> 4E-1002     Subnormal
697fmax2843 fma  4E-501       4e-501  0E+999999  -> 1.6E-1001   Subnormal
698fmax2844 fma 10E-501      10e-501  0E+999999  -> 1.00E-1000  Subnormal
699fmax2845 fma 30E-501      30e-501  0E+999999  -> 9.00E-1000  Subnormal
700fmax2846 fma 40E-501      40e-501  0E+999999  -> 1.600E-999
701
702-- cubes
703fmax2850 fma  1E-670     1e-335  0E+999999  -> 0E-1003    Underflow Subnormal Inexact Rounded Clamped
704fmax2851 fma  1E-668     1e-334  0E+999999  -> 1E-1002    Subnormal
705fmax2852 fma  4E-668     2e-334  0E+999999  -> 8E-1002    Subnormal
706fmax2853 fma  9E-668     3e-334  0E+999999  -> 2.7E-1001  Subnormal
707fmax2854 fma 16E-668     4e-334  0E+999999  -> 6.4E-1001  Subnormal
708fmax2855 fma 25E-668     5e-334  0E+999999  -> 1.25E-1000 Subnormal
709fmax2856 fma 10E-668   100e-334  0E+999999  -> 1.000E-999
710
711-- test derived from result of 0.099 ** 999 at 15 digits with unlimited exponent
712precision: 19
713fmax2860 fma  6636851557994578716E-520 6636851557994578716E-520  0E+999999  -> 4.40477986028551E-1003 Underflow Subnormal Inexact Rounded
714
715-- Long operand overflow may be a different path
716precision: 3
717maxExponent: 999999
718minexponent: -999999
719fmax2870 fma 1  9.999E+999999    0E+999999  ->  Infinity Inexact Overflow Rounded
720fmax2871 fma 1 -9.999E+999999    0E+999999  -> -Infinity Inexact Overflow Rounded
721fmax2872 fma    9.999E+999999 1  0E+999999  ->  Infinity Inexact Overflow Rounded
722fmax2873 fma   -9.999E+999999 1  0E+999999  -> -Infinity Inexact Overflow Rounded
723
724-- check for double-rounded subnormals
725precision:   5
726maxexponent: 79
727minexponent: -79
728fmax2881 fma  1.2347E-40  1.2347E-40   0E+999999  ->  1.524E-80  Inexact Rounded Subnormal Underflow
729fmax2882 fma  1.234E-40  1.234E-40     0E+999999  ->  1.523E-80  Inexact Rounded Subnormal Underflow
730fmax2883 fma  1.23E-40   1.23E-40      0E+999999  ->  1.513E-80  Inexact Rounded Subnormal Underflow
731fmax2884 fma  1.2E-40    1.2E-40       0E+999999  ->  1.44E-80   Subnormal
732fmax2885 fma  1.2E-40    1.2E-41       0E+999999  ->  1.44E-81   Subnormal
733fmax2886 fma  1.2E-40    1.2E-42       0E+999999  ->  1.4E-82    Subnormal Inexact Rounded Underflow
734fmax2887 fma  1.2E-40    1.3E-42       0E+999999  ->  1.6E-82    Subnormal Inexact Rounded Underflow
735fmax2888 fma  1.3E-40    1.3E-42       0E+999999  ->  1.7E-82    Subnormal Inexact Rounded Underflow
736fmax2889 fma  1.3E-40    1.3E-43       0E+999999  ->    2E-83    Subnormal Inexact Rounded Underflow
737fmax2890 fma  1.3E-41    1.3E-43       0E+999999  ->    0E-83    Clamped Subnormal Inexact Rounded Underflow
738
739fmax2891 fma  1.2345E-39   1.234E-40   0E+999999  ->  1.5234E-79 Inexact Rounded
740fmax2892 fma  1.23456E-39  1.234E-40   0E+999999  ->  1.5234E-79 Inexact Rounded
741fmax2893 fma  1.2345E-40   1.234E-40   0E+999999  ->  1.523E-80  Inexact Rounded Subnormal Underflow
742fmax2894 fma  1.23456E-40  1.234E-40   0E+999999  ->  1.523E-80  Inexact Rounded Subnormal Underflow
743fmax2895 fma  1.2345E-41   1.234E-40   0E+999999  ->  1.52E-81   Inexact Rounded Subnormal Underflow
744fmax2896 fma  1.23456E-41  1.234E-40   0E+999999  ->  1.52E-81   Inexact Rounded Subnormal Underflow
745
746-- Now explore the case where we get a normal result with Underflow
747precision:   16
748rounding:    half_up
749maxExponent: 384
750minExponent: -383
751
752fmax2900 fma  0.3000000000E-191 0.3000000000E-191  0E+999999  -> 9.00000000000000E-384 Subnormal Rounded
753fmax2901 fma  0.3000000001E-191 0.3000000001E-191  0E+999999  -> 9.00000000600000E-384 Underflow Inexact Subnormal Rounded
754fmax2902 fma  9.999999999999999E-383  0.0999999999999          0E+999999  -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded
755fmax2903 fma  9.999999999999999E-383  0.09999999999999         0E+999999  -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded
756fmax2904 fma  9.999999999999999E-383  0.099999999999999        0E+999999  -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded
757fmax2905 fma  9.999999999999999E-383  0.0999999999999999       0E+999999  -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded
758-- prove operands are exact
759fmax2906 fma  9.999999999999999E-383  1                        0E+999999  -> 9.999999999999999E-383
760fmax2907 fma                       1  0.09999999999999999      0E+999999  -> 0.09999999999999999
761-- the next rounds to Nmin
762fmax2908 fma  9.999999999999999E-383  0.09999999999999999      0E+999999  -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
763fmax2909 fma  9.999999999999999E-383  0.099999999999999999     0E+999999  -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
764fmax2910 fma  9.999999999999999E-383  0.0999999999999999999    0E+999999  -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
765fmax2911 fma  9.999999999999999E-383  0.09999999999999999999   0E+999999  -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
766
767-- Examples from SQL proposal (Krishna Kulkarni)
768precision:   34
769rounding:    half_up
770maxExponent: 6144
771minExponent: -6143
772fmax2921  fma 130E-2  120E-2  0E+999999  -> 1.5600
773fmax2922  fma 130E-2  12E-1   0E+999999  -> 1.560
774fmax2923  fma 130E-2  1E0     0E+999999  -> 1.30
775
776-- Null tests
777fmax2990 fma  # 10  0E+999999  -> NaN Invalid_operation
778fmax2991 fma 10  #  0E+999999  -> NaN Invalid_operation
779
780-- ADDITION TESTS ------------------------------------------------------
781precision:   9
782rounding:    half_up
783maxExponent: 384
784minexponent: -383
785
786-- [first group are 'quick confidence check']
787fmax3001 fma  1   1       1       ->  2
788fmax3002 fma  1   2       3       ->  5
789fmax3003 fma  1   '5.75'  '3.3'   ->  9.05
790fmax3004 fma  1   '5'     '-3'    ->  2
791fmax3005 fma  1   '-5'    '-3'    ->  -8
792fmax3006 fma  1   '-7'    '2.5'   ->  -4.5
793fmax3007 fma  1   '0.7'   '0.3'   ->  1.0
794fmax3008 fma  1   '1.25'  '1.25'  ->  2.50
795fmax3009 fma  1   '1.23456789'  '1.00000000' -> '2.23456789'
796fmax3010 fma  1   '1.23456789'  '1.00000011' -> '2.23456800'
797
798fmax3011 fma  1   '0.4444444444'  '0.5555555555' -> '1.00000000' Inexact Rounded
799fmax3012 fma  1   '0.4444444440'  '0.5555555555' -> '1.00000000' Inexact Rounded
800fmax3013 fma  1   '0.4444444444'  '0.5555555550' -> '0.999999999' Inexact Rounded
801fmax3014 fma  1   '0.44444444449'    '0' -> '0.444444444' Inexact Rounded
802fmax3015 fma  1   '0.444444444499'   '0' -> '0.444444444' Inexact Rounded
803fmax3016 fma  1   '0.4444444444999'  '0' -> '0.444444444' Inexact Rounded
804fmax3017 fma  1   '0.4444444445000'  '0' -> '0.444444445' Inexact Rounded
805fmax3018 fma  1   '0.4444444445001'  '0' -> '0.444444445' Inexact Rounded
806fmax3019 fma  1   '0.444444444501'   '0' -> '0.444444445' Inexact Rounded
807fmax3020 fma  1   '0.44444444451'    '0' -> '0.444444445' Inexact Rounded
808
809fmax3021 fma  1   0 1 -> 1
810fmax3022 fma  1   1 1 -> 2
811fmax3023 fma  1   2 1 -> 3
812fmax3024 fma  1   3 1 -> 4
813fmax3025 fma  1   4 1 -> 5
814fmax3026 fma  1   5 1 -> 6
815fmax3027 fma  1   6 1 -> 7
816fmax3028 fma  1   7 1 -> 8
817fmax3029 fma  1   8 1 -> 9
818fmax3030 fma  1   9 1 -> 10
819
820-- some carrying effects
821fmax3031 fma  1   '0.9998'  '0.0000' -> '0.9998'
822fmax3032 fma  1   '0.9998'  '0.0001' -> '0.9999'
823fmax3033 fma  1   '0.9998'  '0.0002' -> '1.0000'
824fmax3034 fma  1   '0.9998'  '0.0003' -> '1.0001'
825
826fmax3035 fma  1   '70'  '10000e+9' -> '1.00000000E+13' Inexact Rounded
827fmax3036 fma  1   '700'  '10000e+9' -> '1.00000000E+13' Inexact Rounded
828fmax3037 fma  1   '7000'  '10000e+9' -> '1.00000000E+13' Inexact Rounded
829fmax3038 fma  1   '70000'  '10000e+9' -> '1.00000001E+13' Inexact Rounded
830fmax3039 fma  1   '700000'  '10000e+9' -> '1.00000007E+13' Rounded
831
832-- symmetry:
833fmax3040 fma  1   '10000e+9'  '70' -> '1.00000000E+13' Inexact Rounded
834fmax3041 fma  1   '10000e+9'  '700' -> '1.00000000E+13' Inexact Rounded
835fmax3042 fma  1   '10000e+9'  '7000' -> '1.00000000E+13' Inexact Rounded
836fmax3044 fma  1   '10000e+9'  '70000' -> '1.00000001E+13' Inexact Rounded
837fmax3045 fma  1   '10000e+9'  '700000' -> '1.00000007E+13' Rounded
838
839-- same, higher precision
840precision: 15
841fmax3046 fma  1   '10000e+9'  '7' -> '10000000000007'
842fmax3047 fma  1   '10000e+9'  '70' -> '10000000000070'
843fmax3048 fma  1   '10000e+9'  '700' -> '10000000000700'
844fmax3049 fma  1   '10000e+9'  '7000' -> '10000000007000'
845fmax3050 fma  1   '10000e+9'  '70000' -> '10000000070000'
846fmax3051 fma  1   '10000e+9'  '700000' -> '10000000700000'
847fmax3052 fma  1   '10000e+9'  '7000000' -> '10000007000000'
848
849-- examples from decarith
850fmax3053 fma  1   '12' '7.00' -> '19.00'
851fmax3054 fma  1   '1.3' '-1.07' -> '0.23'
852fmax3055 fma  1   '1.3' '-1.30' -> '0.00'
853fmax3056 fma  1   '1.3' '-2.07' -> '-0.77'
854fmax3057 fma  1   '1E+2' '1E+4' -> '1.01E+4'
855
856-- zero preservation
857precision: 6
858fmax3060 fma  1   '10000e+9'  '70000' -> '1.00000E+13' Inexact Rounded
859fmax3061 fma  1   1 '0.0001' -> '1.0001'
860fmax3062 fma  1   1 '0.00001' -> '1.00001'
861fmax3063 fma  1   1 '0.000001' -> '1.00000' Inexact Rounded
862fmax3064 fma  1   1 '0.0000001' -> '1.00000' Inexact Rounded
863fmax3065 fma  1   1 '0.00000001' -> '1.00000' Inexact Rounded
864
865-- some funny zeros [in case of bad signum]
866fmax3070 fma  1   1  0    -> 1
867fmax3071 fma  1   1 0.    -> 1
868fmax3072 fma  1   1  .0   -> 1.0
869fmax3073 fma  1   1 0.0   -> 1.0
870fmax3074 fma  1   1 0.00  -> 1.00
871fmax3075 fma  1    0  1   -> 1
872fmax3076 fma  1   0.  1   -> 1
873fmax3077 fma  1    .0 1   -> 1.0
874fmax3078 fma  1   0.0 1   -> 1.0
875fmax3079 fma  1   0.00 1  -> 1.00
876
877precision: 9
878
879-- some carries
880fmax3080 fma  1   999999998 1  -> 999999999
881fmax3081 fma  1   999999999 1  -> 1.00000000E+9 Rounded
882fmax3082 fma  1    99999999 1  -> 100000000
883fmax3083 fma  1     9999999 1  -> 10000000
884fmax3084 fma  1      999999 1  -> 1000000
885fmax3085 fma  1       99999 1  -> 100000
886fmax3086 fma  1        9999 1  -> 10000
887fmax3087 fma  1         999 1  -> 1000
888fmax3088 fma  1          99 1  -> 100
889fmax3089 fma  1           9 1  -> 10
890
891
892-- more LHS swaps
893fmax3090 fma  1   '-56267E-10'   0 ->  '-0.0000056267'
894fmax3091 fma  1   '-56267E-6'    0 ->  '-0.056267'
895fmax3092 fma  1   '-56267E-5'    0 ->  '-0.56267'
896fmax3093 fma  1   '-56267E-4'    0 ->  '-5.6267'
897fmax3094 fma  1   '-56267E-3'    0 ->  '-56.267'
898fmax3095 fma  1   '-56267E-2'    0 ->  '-562.67'
899fmax3096 fma  1   '-56267E-1'    0 ->  '-5626.7'
900fmax3097 fma  1   '-56267E-0'    0 ->  '-56267'
901fmax3098 fma  1   '-5E-10'       0 ->  '-5E-10'
902fmax3099 fma  1   '-5E-7'        0 ->  '-5E-7'
903fmax3100 fma  1   '-5E-6'        0 ->  '-0.000005'
904fmax3101 fma  1   '-5E-5'        0 ->  '-0.00005'
905fmax3102 fma  1   '-5E-4'        0 ->  '-0.0005'
906fmax3103 fma  1   '-5E-1'        0 ->  '-0.5'
907fmax3104 fma  1   '-5E0'         0 ->  '-5'
908fmax3105 fma  1   '-5E1'         0 ->  '-50'
909fmax3106 fma  1   '-5E5'         0 ->  '-500000'
910fmax3107 fma  1   '-5E8'         0 ->  '-500000000'
911fmax3108 fma  1   '-5E9'         0 ->  '-5.00000000E+9'   Rounded
912fmax3109 fma  1   '-5E10'        0 ->  '-5.00000000E+10'  Rounded
913fmax3110 fma  1   '-5E11'        0 ->  '-5.00000000E+11'  Rounded
914fmax3111 fma  1   '-5E100'       0 ->  '-5.00000000E+100' Rounded
915
916-- more RHS swaps
917fmax3113 fma  1   0  '-56267E-10' ->  '-0.0000056267'
918fmax3114 fma  1   0  '-56267E-6'  ->  '-0.056267'
919fmax3116 fma  1   0  '-56267E-5'  ->  '-0.56267'
920fmax3117 fma  1   0  '-56267E-4'  ->  '-5.6267'
921fmax3119 fma  1   0  '-56267E-3'  ->  '-56.267'
922fmax3120 fma  1   0  '-56267E-2'  ->  '-562.67'
923fmax3121 fma  1   0  '-56267E-1'  ->  '-5626.7'
924fmax3122 fma  1   0  '-56267E-0'  ->  '-56267'
925fmax3123 fma  1   0  '-5E-10'     ->  '-5E-10'
926fmax3124 fma  1   0  '-5E-7'      ->  '-5E-7'
927fmax3125 fma  1   0  '-5E-6'      ->  '-0.000005'
928fmax3126 fma  1   0  '-5E-5'      ->  '-0.00005'
929fmax3127 fma  1   0  '-5E-4'      ->  '-0.0005'
930fmax3128 fma  1   0  '-5E-1'      ->  '-0.5'
931fmax3129 fma  1   0  '-5E0'       ->  '-5'
932fmax3130 fma  1   0  '-5E1'       ->  '-50'
933fmax3131 fma  1   0  '-5E5'       ->  '-500000'
934fmax3132 fma  1   0  '-5E8'       ->  '-500000000'
935fmax3133 fma  1   0  '-5E9'       ->  '-5.00000000E+9'    Rounded
936fmax3134 fma  1   0  '-5E10'      ->  '-5.00000000E+10'   Rounded
937fmax3135 fma  1   0  '-5E11'      ->  '-5.00000000E+11'   Rounded
938fmax3136 fma  1   0  '-5E100'     ->  '-5.00000000E+100'  Rounded
939
940-- related
941fmax3137 fma  1    1  '0E-12'      ->  '1.00000000'  Rounded
942fmax3138 fma  1   -1  '0E-12'      ->  '-1.00000000' Rounded
943fmax3139 fma  1   '0E-12' 1        ->  '1.00000000'  Rounded
944fmax3140 fma  1   '0E-12' -1       ->  '-1.00000000' Rounded
945fmax3141 fma  1   1E+4    0.0000   ->  '10000.0000'
946fmax3142 fma  1   1E+4    0.00000  ->  '10000.0000'  Rounded
947fmax3143 fma  1   0.000   1E+5     ->  '100000.000'
948fmax3144 fma  1   0.0000  1E+5     ->  '100000.000'  Rounded
949
950-- [some of the next group are really constructor tests]
951fmax3146 fma  1   '00.0'  0       ->  '0.0'
952fmax3147 fma  1   '0.00'  0       ->  '0.00'
953fmax3148 fma  1    0      '0.00'  ->  '0.00'
954fmax3149 fma  1    0      '00.0'  ->  '0.0'
955fmax3150 fma  1   '00.0'  '0.00'  ->  '0.00'
956fmax3151 fma  1   '0.00'  '00.0'  ->  '0.00'
957fmax3152 fma  1   '3'     '.3'    ->  '3.3'
958fmax3153 fma  1   '3.'    '.3'    ->  '3.3'
959fmax3154 fma  1   '3.0'   '.3'    ->  '3.3'
960fmax3155 fma  1   '3.00'  '.3'    ->  '3.30'
961fmax3156 fma  1   '3'     '3'     ->  '6'
962fmax3157 fma  1   '3'     '+3'    ->  '6'
963fmax3158 fma  1   '3'     '-3'    ->  '0'
964fmax3159 fma  1   '0.3'   '-0.3'  ->  '0.0'
965fmax3160 fma  1   '0.03'  '-0.03' ->  '0.00'
966
967-- try borderline precision, with carries, etc.
968precision: 15
969fmax3161 fma  1   '1E+12' '-1'    -> '999999999999'
970fmax3162 fma  1   '1E+12'  '1.11' -> '1000000000001.11'
971fmax3163 fma  1   '1.11'  '1E+12' -> '1000000000001.11'
972fmax3164 fma  1   '-1'    '1E+12' -> '999999999999'
973fmax3165 fma  1   '7E+12' '-1'    -> '6999999999999'
974fmax3166 fma  1   '7E+12'  '1.11' -> '7000000000001.11'
975fmax3167 fma  1   '1.11'  '7E+12' -> '7000000000001.11'
976fmax3168 fma  1   '-1'    '7E+12' -> '6999999999999'
977
978--             123456789012345      123456789012345      1 23456789012345
979fmax3170 fma  1   '0.444444444444444'  '0.555555555555563' -> '1.00000000000001' Inexact Rounded
980fmax3171 fma  1   '0.444444444444444'  '0.555555555555562' -> '1.00000000000001' Inexact Rounded
981fmax3172 fma  1   '0.444444444444444'  '0.555555555555561' -> '1.00000000000001' Inexact Rounded
982fmax3173 fma  1   '0.444444444444444'  '0.555555555555560' -> '1.00000000000000' Inexact Rounded
983fmax3174 fma  1   '0.444444444444444'  '0.555555555555559' -> '1.00000000000000' Inexact Rounded
984fmax3175 fma  1   '0.444444444444444'  '0.555555555555558' -> '1.00000000000000' Inexact Rounded
985fmax3176 fma  1   '0.444444444444444'  '0.555555555555557' -> '1.00000000000000' Inexact Rounded
986fmax3177 fma  1   '0.444444444444444'  '0.555555555555556' -> '1.00000000000000' Rounded
987fmax3178 fma  1   '0.444444444444444'  '0.555555555555555' -> '0.999999999999999'
988fmax3179 fma  1   '0.444444444444444'  '0.555555555555554' -> '0.999999999999998'
989fmax3180 fma  1   '0.444444444444444'  '0.555555555555553' -> '0.999999999999997'
990fmax3181 fma  1   '0.444444444444444'  '0.555555555555552' -> '0.999999999999996'
991fmax3182 fma  1   '0.444444444444444'  '0.555555555555551' -> '0.999999999999995'
992fmax3183 fma  1   '0.444444444444444'  '0.555555555555550' -> '0.999999999999994'
993
994-- and some more, including residue effects and different roundings
995precision: 9
996rounding: half_up
997fmax3200 fma  1   '123456789' 0             -> '123456789'
998fmax3201 fma  1   '123456789' 0.000000001   -> '123456789' Inexact Rounded
999fmax3202 fma  1   '123456789' 0.000001      -> '123456789' Inexact Rounded
1000fmax3203 fma  1   '123456789' 0.1           -> '123456789' Inexact Rounded
1001fmax3204 fma  1   '123456789' 0.4           -> '123456789' Inexact Rounded
1002fmax3205 fma  1   '123456789' 0.49          -> '123456789' Inexact Rounded
1003fmax3206 fma  1   '123456789' 0.499999      -> '123456789' Inexact Rounded
1004fmax3207 fma  1   '123456789' 0.499999999   -> '123456789' Inexact Rounded
1005fmax3208 fma  1   '123456789' 0.5           -> '123456790' Inexact Rounded
1006fmax3209 fma  1   '123456789' 0.500000001   -> '123456790' Inexact Rounded
1007fmax3210 fma  1   '123456789' 0.500001      -> '123456790' Inexact Rounded
1008fmax3211 fma  1   '123456789' 0.51          -> '123456790' Inexact Rounded
1009fmax3212 fma  1   '123456789' 0.6           -> '123456790' Inexact Rounded
1010fmax3213 fma  1   '123456789' 0.9           -> '123456790' Inexact Rounded
1011fmax3214 fma  1   '123456789' 0.99999       -> '123456790' Inexact Rounded
1012fmax3215 fma  1   '123456789' 0.999999999   -> '123456790' Inexact Rounded
1013fmax3216 fma  1   '123456789' 1             -> '123456790'
1014fmax3217 fma  1   '123456789' 1.000000001   -> '123456790' Inexact Rounded
1015fmax3218 fma  1   '123456789' 1.00001       -> '123456790' Inexact Rounded
1016fmax3219 fma  1   '123456789' 1.1           -> '123456790' Inexact Rounded
1017
1018rounding: half_even
1019fmax3220 fma  1   '123456789' 0             -> '123456789'
1020fmax3221 fma  1   '123456789' 0.000000001   -> '123456789' Inexact Rounded
1021fmax3222 fma  1   '123456789' 0.000001      -> '123456789' Inexact Rounded
1022fmax3223 fma  1   '123456789' 0.1           -> '123456789' Inexact Rounded
1023fmax3224 fma  1   '123456789' 0.4           -> '123456789' Inexact Rounded
1024fmax3225 fma  1   '123456789' 0.49          -> '123456789' Inexact Rounded
1025fmax3226 fma  1   '123456789' 0.499999      -> '123456789' Inexact Rounded
1026fmax3227 fma  1   '123456789' 0.499999999   -> '123456789' Inexact Rounded
1027fmax3228 fma  1   '123456789' 0.5           -> '123456790' Inexact Rounded
1028fmax3229 fma  1   '123456789' 0.500000001   -> '123456790' Inexact Rounded
1029fmax3230 fma  1   '123456789' 0.500001      -> '123456790' Inexact Rounded
1030fmax3231 fma  1   '123456789' 0.51          -> '123456790' Inexact Rounded
1031fmax3232 fma  1   '123456789' 0.6           -> '123456790' Inexact Rounded
1032fmax3233 fma  1   '123456789' 0.9           -> '123456790' Inexact Rounded
1033fmax3234 fma  1   '123456789' 0.99999       -> '123456790' Inexact Rounded
1034fmax3235 fma  1   '123456789' 0.999999999   -> '123456790' Inexact Rounded
1035fmax3236 fma  1   '123456789' 1             -> '123456790'
1036fmax3237 fma  1   '123456789' 1.00000001    -> '123456790' Inexact Rounded
1037fmax3238 fma  1   '123456789' 1.00001       -> '123456790' Inexact Rounded
1038fmax3239 fma  1   '123456789' 1.1           -> '123456790' Inexact Rounded
1039-- critical few with even bottom digit...
1040fmax3240 fma  1   '123456788' 0.499999999   -> '123456788' Inexact Rounded
1041fmax3241 fma  1   '123456788' 0.5           -> '123456788' Inexact Rounded
1042fmax3242 fma  1   '123456788' 0.500000001   -> '123456789' Inexact Rounded
1043
1044rounding: down
1045fmax3250 fma  1   '123456789' 0             -> '123456789'
1046fmax3251 fma  1   '123456789' 0.000000001   -> '123456789' Inexact Rounded
1047fmax3252 fma  1   '123456789' 0.000001      -> '123456789' Inexact Rounded
1048fmax3253 fma  1   '123456789' 0.1           -> '123456789' Inexact Rounded
1049fmax3254 fma  1   '123456789' 0.4           -> '123456789' Inexact Rounded
1050fmax3255 fma  1   '123456789' 0.49          -> '123456789' Inexact Rounded
1051fmax3256 fma  1   '123456789' 0.499999      -> '123456789' Inexact Rounded
1052fmax3257 fma  1   '123456789' 0.499999999   -> '123456789' Inexact Rounded
1053fmax3258 fma  1   '123456789' 0.5           -> '123456789' Inexact Rounded
1054fmax3259 fma  1   '123456789' 0.500000001   -> '123456789' Inexact Rounded
1055fmax3260 fma  1   '123456789' 0.500001      -> '123456789' Inexact Rounded
1056fmax3261 fma  1   '123456789' 0.51          -> '123456789' Inexact Rounded
1057fmax3262 fma  1   '123456789' 0.6           -> '123456789' Inexact Rounded
1058fmax3263 fma  1   '123456789' 0.9           -> '123456789' Inexact Rounded
1059fmax3264 fma  1   '123456789' 0.99999       -> '123456789' Inexact Rounded
1060fmax3265 fma  1   '123456789' 0.999999999   -> '123456789' Inexact Rounded
1061fmax3266 fma  1   '123456789' 1             -> '123456790'
1062fmax3267 fma  1   '123456789' 1.00000001    -> '123456790' Inexact Rounded
1063fmax3268 fma  1   '123456789' 1.00001       -> '123456790' Inexact Rounded
1064fmax3269 fma  1   '123456789' 1.1           -> '123456790' Inexact Rounded
1065
1066-- input preparation tests (operands should not be rounded)
1067precision: 3
1068rounding: half_up
1069
1070fmax3270 fma  1   '12345678900000'  9999999999999 ->  '2.23E+13' Inexact Rounded
1071fmax3271 fma  1    '9999999999999' 12345678900000 ->  '2.23E+13' Inexact Rounded
1072
1073fmax3272 fma  1   '12E+3'  '3444'   ->  '1.54E+4' Inexact Rounded
1074fmax3273 fma  1   '12E+3'  '3446'   ->  '1.54E+4' Inexact Rounded
1075fmax3274 fma  1   '12E+3'  '3449.9' ->  '1.54E+4' Inexact Rounded
1076fmax3275 fma  1   '12E+3'  '3450.0' ->  '1.55E+4' Inexact Rounded
1077fmax3276 fma  1   '12E+3'  '3450.1' ->  '1.55E+4' Inexact Rounded
1078fmax3277 fma  1   '12E+3'  '3454'   ->  '1.55E+4' Inexact Rounded
1079fmax3278 fma  1   '12E+3'  '3456'   ->  '1.55E+4' Inexact Rounded
1080
1081fmax3281 fma  1   '3444'   '12E+3'  ->  '1.54E+4' Inexact Rounded
1082fmax3282 fma  1   '3446'   '12E+3'  ->  '1.54E+4' Inexact Rounded
1083fmax3283 fma  1   '3449.9' '12E+3'  ->  '1.54E+4' Inexact Rounded
1084fmax3284 fma  1   '3450.0' '12E+3'  ->  '1.55E+4' Inexact Rounded
1085fmax3285 fma  1   '3450.1' '12E+3'  ->  '1.55E+4' Inexact Rounded
1086fmax3286 fma  1   '3454'   '12E+3'  ->  '1.55E+4' Inexact Rounded
1087fmax3287 fma  1   '3456'   '12E+3'  ->  '1.55E+4' Inexact Rounded
1088
1089rounding: half_down
1090fmax3291 fma  1   '3444'   '12E+3'  ->  '1.54E+4' Inexact Rounded
1091fmax3292 fma  1   '3446'   '12E+3'  ->  '1.54E+4' Inexact Rounded
1092fmax3293 fma  1   '3449.9' '12E+3'  ->  '1.54E+4' Inexact Rounded
1093fmax3294 fma  1   '3450.0' '12E+3'  ->  '1.54E+4' Inexact Rounded
1094fmax3295 fma  1   '3450.1' '12E+3'  ->  '1.55E+4' Inexact Rounded
1095fmax3296 fma  1   '3454'   '12E+3'  ->  '1.55E+4' Inexact Rounded
1096fmax3297 fma  1   '3456'   '12E+3'  ->  '1.55E+4' Inexact Rounded
1097
1098-- 1 in last place tests
1099rounding: half_up
1100fmax3301 fma  1    -1   1      ->   0
1101fmax3302 fma  1     0   1      ->   1
1102fmax3303 fma  1     1   1      ->   2
1103fmax3304 fma  1    12   1      ->  13
1104fmax3305 fma  1    98   1      ->  99
1105fmax3306 fma  1    99   1      -> 100
1106fmax3307 fma  1   100   1      -> 101
1107fmax3308 fma  1   101   1      -> 102
1108fmax3309 fma  1    -1  -1      ->  -2
1109fmax3310 fma  1     0  -1      ->  -1
1110fmax3311 fma  1     1  -1      ->   0
1111fmax3312 fma  1    12  -1      ->  11
1112fmax3313 fma  1    98  -1      ->  97
1113fmax3314 fma  1    99  -1      ->  98
1114fmax3315 fma  1   100  -1      ->  99
1115fmax3316 fma  1   101  -1      -> 100
1116
1117fmax3321 fma  1   -0.01  0.01    ->  0.00
1118fmax3322 fma  1    0.00  0.01    ->  0.01
1119fmax3323 fma  1    0.01  0.01    ->  0.02
1120fmax3324 fma  1    0.12  0.01    ->  0.13
1121fmax3325 fma  1    0.98  0.01    ->  0.99
1122fmax3326 fma  1    0.99  0.01    ->  1.00
1123fmax3327 fma  1    1.00  0.01    ->  1.01
1124fmax3328 fma  1    1.01  0.01    ->  1.02
1125fmax3329 fma  1   -0.01 -0.01    -> -0.02
1126fmax3330 fma  1    0.00 -0.01    -> -0.01
1127fmax3331 fma  1    0.01 -0.01    ->  0.00
1128fmax3332 fma  1    0.12 -0.01    ->  0.11
1129fmax3333 fma  1    0.98 -0.01    ->  0.97
1130fmax3334 fma  1    0.99 -0.01    ->  0.98
1131fmax3335 fma  1    1.00 -0.01    ->  0.99
1132fmax3336 fma  1    1.01 -0.01    ->  1.00
1133
1134-- some more cases where fma  1  ing 0 affects the coefficient
1135precision: 9
1136fmax3340 fma  1   1E+3    0    ->         1000
1137fmax3341 fma  1   1E+8    0    ->    100000000
1138fmax3342 fma  1   1E+9    0    ->   1.00000000E+9   Rounded
1139fmax3343 fma  1   1E+10   0    ->   1.00000000E+10  Rounded
1140-- which simply follow from these cases ...
1141fmax3344 fma  1   1E+3    1    ->         1001
1142fmax3345 fma  1   1E+8    1    ->    100000001
1143fmax3346 fma  1   1E+9    1    ->   1.00000000E+9   Inexact Rounded
1144fmax3347 fma  1   1E+10   1    ->   1.00000000E+10  Inexact Rounded
1145fmax3348 fma  1   1E+3    7    ->         1007
1146fmax3349 fma  1   1E+8    7    ->    100000007
1147fmax3350 fma  1   1E+9    7    ->   1.00000001E+9   Inexact Rounded
1148fmax3351 fma  1   1E+10   7    ->   1.00000000E+10  Inexact Rounded
1149
1150-- tryzeros cases
1151precision:   7
1152rounding:    half_up
1153maxExponent: 92
1154minexponent: -92
1155fmax3361  fma  1   0E+50 10000E+1  -> 1.0000E+5
1156fmax3362  fma  1   10000E+1 0E-50  -> 100000.0  Rounded
1157fmax3363  fma  1   10000E+1 10000E-50  -> 100000.0  Rounded Inexact
1158fmax3364  fma  1   9.999999E+92 -9.999999E+92 -> 0E+86
1159
1160-- a curiosity from JSR 13 testing
1161rounding:    half_down
1162precision:   10
1163fmax3370 fma  1   99999999 81512 -> 100081511
1164precision:      6
1165fmax3371 fma  1   99999999 81512 -> 1.00082E+8 Rounded Inexact
1166rounding:    half_up
1167precision:   10
1168fmax3372 fma  1   99999999 81512 -> 100081511
1169precision:      6
1170fmax3373 fma  1   99999999 81512 -> 1.00082E+8 Rounded Inexact
1171rounding:    half_even
1172precision:   10
1173fmax3374 fma  1   99999999 81512 -> 100081511
1174precision:      6
1175fmax3375 fma  1   99999999 81512 -> 1.00082E+8 Rounded Inexact
1176
1177-- ulp replacement tests
1178precision: 9
1179maxexponent: 999999
1180minexponent: -999999
1181fmax3400 fma  1     1   77e-7       ->  1.0000077
1182fmax3401 fma  1     1   77e-8       ->  1.00000077
1183fmax3402 fma  1     1   77e-9       ->  1.00000008 Inexact Rounded
1184fmax3403 fma  1     1   77e-10      ->  1.00000001 Inexact Rounded
1185fmax3404 fma  1     1   77e-11      ->  1.00000000 Inexact Rounded
1186fmax3405 fma  1     1   77e-12      ->  1.00000000 Inexact Rounded
1187fmax3406 fma  1     1   77e-999     ->  1.00000000 Inexact Rounded
1188fmax3407 fma  1     1   77e-999999  ->  1.00000000 Inexact Rounded
1189
1190fmax3410 fma  1    10   77e-7       ->  10.0000077
1191fmax3411 fma  1    10   77e-8       ->  10.0000008 Inexact Rounded
1192fmax3412 fma  1    10   77e-9       ->  10.0000001 Inexact Rounded
1193fmax3413 fma  1    10   77e-10      ->  10.0000000 Inexact Rounded
1194fmax3414 fma  1    10   77e-11      ->  10.0000000 Inexact Rounded
1195fmax3415 fma  1    10   77e-12      ->  10.0000000 Inexact Rounded
1196fmax3416 fma  1    10   77e-999     ->  10.0000000 Inexact Rounded
1197fmax3417 fma  1    10   77e-999999  ->  10.0000000 Inexact Rounded
1198
1199fmax3420 fma  1    77e-7        1   ->  1.0000077
1200fmax3421 fma  1    77e-8        1   ->  1.00000077
1201fmax3422 fma  1    77e-9        1   ->  1.00000008 Inexact Rounded
1202fmax3423 fma  1    77e-10       1   ->  1.00000001 Inexact Rounded
1203fmax3424 fma  1    77e-11       1   ->  1.00000000 Inexact Rounded
1204fmax3425 fma  1    77e-12       1   ->  1.00000000 Inexact Rounded
1205fmax3426 fma  1    77e-999      1   ->  1.00000000 Inexact Rounded
1206fmax3427 fma  1    77e-999999   1   ->  1.00000000 Inexact Rounded
1207
1208fmax3430 fma  1    77e-7       10   ->  10.0000077
1209fmax3431 fma  1    77e-8       10   ->  10.0000008 Inexact Rounded
1210fmax3432 fma  1    77e-9       10   ->  10.0000001 Inexact Rounded
1211fmax3433 fma  1    77e-10      10   ->  10.0000000 Inexact Rounded
1212fmax3434 fma  1    77e-11      10   ->  10.0000000 Inexact Rounded
1213fmax3435 fma  1    77e-12      10   ->  10.0000000 Inexact Rounded
1214fmax3436 fma  1    77e-999     10   ->  10.0000000 Inexact Rounded
1215fmax3437 fma  1    77e-999999  10   ->  10.0000000 Inexact Rounded
1216
1217-- negative ulps
1218fmax3440 fma  1     1   -77e-7       ->  0.9999923
1219fmax3441 fma  1     1   -77e-8       ->  0.99999923
1220fmax3442 fma  1     1   -77e-9       ->  0.999999923
1221fmax3443 fma  1     1   -77e-10      ->  0.999999992 Inexact Rounded
1222fmax3444 fma  1     1   -77e-11      ->  0.999999999 Inexact Rounded
1223fmax3445 fma  1     1   -77e-12      ->  1.00000000 Inexact Rounded
1224fmax3446 fma  1     1   -77e-999     ->  1.00000000 Inexact Rounded
1225fmax3447 fma  1     1   -77e-999999  ->  1.00000000 Inexact Rounded
1226
1227fmax3450 fma  1    10   -77e-7       ->   9.9999923
1228fmax3451 fma  1    10   -77e-8       ->   9.99999923
1229fmax3452 fma  1    10   -77e-9       ->   9.99999992 Inexact Rounded
1230fmax3453 fma  1    10   -77e-10      ->   9.99999999 Inexact Rounded
1231fmax3454 fma  1    10   -77e-11      ->  10.0000000 Inexact Rounded
1232fmax3455 fma  1    10   -77e-12      ->  10.0000000 Inexact Rounded
1233fmax3456 fma  1    10   -77e-999     ->  10.0000000 Inexact Rounded
1234fmax3457 fma  1    10   -77e-999999  ->  10.0000000 Inexact Rounded
1235
1236fmax3460 fma  1    -77e-7        1   ->  0.9999923
1237fmax3461 fma  1    -77e-8        1   ->  0.99999923
1238fmax3462 fma  1    -77e-9        1   ->  0.999999923
1239fmax3463 fma  1    -77e-10       1   ->  0.999999992 Inexact Rounded
1240fmax3464 fma  1    -77e-11       1   ->  0.999999999 Inexact Rounded
1241fmax3465 fma  1    -77e-12       1   ->  1.00000000 Inexact Rounded
1242fmax3466 fma  1    -77e-999      1   ->  1.00000000 Inexact Rounded
1243fmax3467 fma  1    -77e-999999   1   ->  1.00000000 Inexact Rounded
1244
1245fmax3470 fma  1    -77e-7       10   ->   9.9999923
1246fmax3471 fma  1    -77e-8       10   ->   9.99999923
1247fmax3472 fma  1    -77e-9       10   ->   9.99999992 Inexact Rounded
1248fmax3473 fma  1    -77e-10      10   ->   9.99999999 Inexact Rounded
1249fmax3474 fma  1    -77e-11      10   ->  10.0000000 Inexact Rounded
1250fmax3475 fma  1    -77e-12      10   ->  10.0000000 Inexact Rounded
1251fmax3476 fma  1    -77e-999     10   ->  10.0000000 Inexact Rounded
1252fmax3477 fma  1    -77e-999999  10   ->  10.0000000 Inexact Rounded
1253
1254-- negative ulps
1255fmax3480 fma  1    -1    77e-7       ->  -0.9999923
1256fmax3481 fma  1    -1    77e-8       ->  -0.99999923
1257fmax3482 fma  1    -1    77e-9       ->  -0.999999923
1258fmax3483 fma  1    -1    77e-10      ->  -0.999999992 Inexact Rounded
1259fmax3484 fma  1    -1    77e-11      ->  -0.999999999 Inexact Rounded
1260fmax3485 fma  1    -1    77e-12      ->  -1.00000000 Inexact Rounded
1261fmax3486 fma  1    -1    77e-999     ->  -1.00000000 Inexact Rounded
1262fmax3487 fma  1    -1    77e-999999  ->  -1.00000000 Inexact Rounded
1263
1264fmax3490 fma  1   -10    77e-7       ->   -9.9999923
1265fmax3491 fma  1   -10    77e-8       ->   -9.99999923
1266fmax3492 fma  1   -10    77e-9       ->   -9.99999992 Inexact Rounded
1267fmax3493 fma  1   -10    77e-10      ->   -9.99999999 Inexact Rounded
1268fmax3494 fma  1   -10    77e-11      ->  -10.0000000 Inexact Rounded
1269fmax3495 fma  1   -10    77e-12      ->  -10.0000000 Inexact Rounded
1270fmax3496 fma  1   -10    77e-999     ->  -10.0000000 Inexact Rounded
1271fmax3497 fma  1   -10    77e-999999  ->  -10.0000000 Inexact Rounded
1272
1273fmax3500 fma  1     77e-7       -1   ->  -0.9999923
1274fmax3501 fma  1     77e-8       -1   ->  -0.99999923
1275fmax3502 fma  1     77e-9       -1   ->  -0.999999923
1276fmax3503 fma  1     77e-10      -1   ->  -0.999999992 Inexact Rounded
1277fmax3504 fma  1     77e-11      -1   ->  -0.999999999 Inexact Rounded
1278fmax3505 fma  1     77e-12      -1   ->  -1.00000000 Inexact Rounded
1279fmax3506 fma  1     77e-999     -1   ->  -1.00000000 Inexact Rounded
1280fmax3507 fma  1     77e-999999  -1   ->  -1.00000000 Inexact Rounded
1281
1282fmax3510 fma  1     77e-7       -10  ->   -9.9999923
1283fmax3511 fma  1     77e-8       -10  ->   -9.99999923
1284fmax3512 fma  1     77e-9       -10  ->   -9.99999992 Inexact Rounded
1285fmax3513 fma  1     77e-10      -10  ->   -9.99999999 Inexact Rounded
1286fmax3514 fma  1     77e-11      -10  ->  -10.0000000 Inexact Rounded
1287fmax3515 fma  1     77e-12      -10  ->  -10.0000000 Inexact Rounded
1288fmax3516 fma  1     77e-999     -10  ->  -10.0000000 Inexact Rounded
1289fmax3517 fma  1     77e-999999  -10  ->  -10.0000000 Inexact Rounded
1290
1291
1292-- long operands
1293maxexponent: 999
1294minexponent: -999
1295precision: 9
1296fmax3521 fma  1   12345678000 0 -> 1.23456780E+10 Rounded
1297fmax3522 fma  1   0 12345678000 -> 1.23456780E+10 Rounded
1298fmax3523 fma  1   1234567800  0 -> 1.23456780E+9 Rounded
1299fmax3524 fma  1   0 1234567800  -> 1.23456780E+9 Rounded
1300fmax3525 fma  1   1234567890  0 -> 1.23456789E+9 Rounded
1301fmax3526 fma  1   0 1234567890  -> 1.23456789E+9 Rounded
1302fmax3527 fma  1   1234567891  0 -> 1.23456789E+9 Inexact Rounded
1303fmax3528 fma  1   0 1234567891  -> 1.23456789E+9 Inexact Rounded
1304fmax3529 fma  1   12345678901 0 -> 1.23456789E+10 Inexact Rounded
1305fmax3530 fma  1   0 12345678901 -> 1.23456789E+10 Inexact Rounded
1306fmax3531 fma  1   1234567896  0 -> 1.23456790E+9 Inexact Rounded
1307fmax3532 fma  1   0 1234567896  -> 1.23456790E+9 Inexact Rounded
1308
1309precision: 15
1310-- still checking
1311fmax3541 fma  1   12345678000 0 -> 12345678000
1312fmax3542 fma  1   0 12345678000 -> 12345678000
1313fmax3543 fma  1   1234567800  0 -> 1234567800
1314fmax3544 fma  1   0 1234567800  -> 1234567800
1315fmax3545 fma  1   1234567890  0 -> 1234567890
1316fmax3546 fma  1   0 1234567890  -> 1234567890
1317fmax3547 fma  1   1234567891  0 -> 1234567891
1318fmax3548 fma  1   0 1234567891  -> 1234567891
1319fmax3549 fma  1   12345678901 0 -> 12345678901
1320fmax3550 fma  1   0 12345678901 -> 12345678901
1321fmax3551 fma  1   1234567896  0 -> 1234567896
1322fmax3552 fma  1   0 1234567896  -> 1234567896
1323
1324-- verify a query
1325precision:    16
1326maxExponent: +394
1327minExponent: -393
1328rounding:     down
1329fmax3561 fma  1   1e-398 9.000000000000000E+384 -> 9.000000000000000E+384 Inexact Rounded
1330fmax3562 fma  1        0 9.000000000000000E+384 -> 9.000000000000000E+384 Rounded
1331-- and using decimal64 bounds...
1332precision:    16
1333maxExponent: +384
1334minExponent: -383
1335rounding:     down
1336fmax3563 fma  1   1e-388 9.000000000000000E+374 -> 9.000000000000000E+374 Inexact Rounded
1337fmax3564 fma  1        0 9.000000000000000E+374 -> 9.000000000000000E+374 Rounded
1338
1339
1340-- some more residue effects with extreme rounding
1341precision:   9
1342rounding: half_up
1343fmax3601 fma  1   123456789  0.000001 -> 123456789 Inexact Rounded
1344rounding: half_even
1345fmax3602 fma  1   123456789  0.000001 -> 123456789 Inexact Rounded
1346rounding: half_down
1347fmax3603 fma  1   123456789  0.000001 -> 123456789 Inexact Rounded
1348rounding: floor
1349fmax3604 fma  1   123456789  0.000001 -> 123456789 Inexact Rounded
1350rounding: ceiling
1351fmax3605 fma  1   123456789  0.000001 -> 123456790 Inexact Rounded
1352rounding: up
1353fmax3606 fma  1   123456789  0.000001 -> 123456790 Inexact Rounded
1354rounding: down
1355fmax3607 fma  1   123456789  0.000001 -> 123456789 Inexact Rounded
1356
1357rounding: half_up
1358fmax3611 fma  1   123456789 -0.000001 -> 123456789 Inexact Rounded
1359rounding: half_even
1360fmax3612 fma  1   123456789 -0.000001 -> 123456789 Inexact Rounded
1361rounding: half_down
1362fmax3613 fma  1   123456789 -0.000001 -> 123456789 Inexact Rounded
1363rounding: floor
1364fmax3614 fma  1   123456789 -0.000001 -> 123456788 Inexact Rounded
1365rounding: ceiling
1366fmax3615 fma  1   123456789 -0.000001 -> 123456789 Inexact Rounded
1367rounding: up
1368fmax3616 fma  1   123456789 -0.000001 -> 123456789 Inexact Rounded
1369rounding: down
1370fmax3617 fma  1   123456789 -0.000001 -> 123456788 Inexact Rounded
1371
1372rounding: half_up
1373fmax3621 fma  1   123456789  0.499999 -> 123456789 Inexact Rounded
1374rounding: half_even
1375fmax3622 fma  1   123456789  0.499999 -> 123456789 Inexact Rounded
1376rounding: half_down
1377fmax3623 fma  1   123456789  0.499999 -> 123456789 Inexact Rounded
1378rounding: floor
1379fmax3624 fma  1   123456789  0.499999 -> 123456789 Inexact Rounded
1380rounding: ceiling
1381fmax3625 fma  1   123456789  0.499999 -> 123456790 Inexact Rounded
1382rounding: up
1383fmax3626 fma  1   123456789  0.499999 -> 123456790 Inexact Rounded
1384rounding: down
1385fmax3627 fma  1   123456789  0.499999 -> 123456789 Inexact Rounded
1386
1387rounding: half_up
1388fmax3631 fma  1   123456789 -0.499999 -> 123456789 Inexact Rounded
1389rounding: half_even
1390fmax3632 fma  1   123456789 -0.499999 -> 123456789 Inexact Rounded
1391rounding: half_down
1392fmax3633 fma  1   123456789 -0.499999 -> 123456789 Inexact Rounded
1393rounding: floor
1394fmax3634 fma  1   123456789 -0.499999 -> 123456788 Inexact Rounded
1395rounding: ceiling
1396fmax3635 fma  1   123456789 -0.499999 -> 123456789 Inexact Rounded
1397rounding: up
1398fmax3636 fma  1   123456789 -0.499999 -> 123456789 Inexact Rounded
1399rounding: down
1400fmax3637 fma  1   123456789 -0.499999 -> 123456788 Inexact Rounded
1401
1402rounding: half_up
1403fmax3641 fma  1   123456789  0.500001 -> 123456790 Inexact Rounded
1404rounding: half_even
1405fmax3642 fma  1   123456789  0.500001 -> 123456790 Inexact Rounded
1406rounding: half_down
1407fmax3643 fma  1   123456789  0.500001 -> 123456790 Inexact Rounded
1408rounding: floor
1409fmax3644 fma  1   123456789  0.500001 -> 123456789 Inexact Rounded
1410rounding: ceiling
1411fmax3645 fma  1   123456789  0.500001 -> 123456790 Inexact Rounded
1412rounding: up
1413fmax3646 fma  1   123456789  0.500001 -> 123456790 Inexact Rounded
1414rounding: down
1415fmax3647 fma  1   123456789  0.500001 -> 123456789 Inexact Rounded
1416
1417rounding: half_up
1418fmax3651 fma  1   123456789 -0.500001 -> 123456788 Inexact Rounded
1419rounding: half_even
1420fmax3652 fma  1   123456789 -0.500001 -> 123456788 Inexact Rounded
1421rounding: half_down
1422fmax3653 fma  1   123456789 -0.500001 -> 123456788 Inexact Rounded
1423rounding: floor
1424fmax3654 fma  1   123456789 -0.500001 -> 123456788 Inexact Rounded
1425rounding: ceiling
1426fmax3655 fma  1   123456789 -0.500001 -> 123456789 Inexact Rounded
1427rounding: up
1428fmax3656 fma  1   123456789 -0.500001 -> 123456789 Inexact Rounded
1429rounding: down
1430fmax3657 fma  1   123456789 -0.500001 -> 123456788 Inexact Rounded
1431
1432-- long operand triangle
1433rounding: half_up
1434precision:  37
1435fmax3660 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211023638922337114834538
1436precision:  36
1437fmax3661 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102363892233711483454  Inexact Rounded
1438precision:  35
1439fmax3662 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110236389223371148345   Inexact Rounded
1440precision:  34
1441fmax3663 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211023638922337114835    Inexact Rounded
1442precision:  33
1443fmax3664 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102363892233711483     Inexact Rounded
1444precision:  32
1445fmax3665 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110236389223371148      Inexact Rounded
1446precision:  31
1447fmax3666 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211023638922337115       Inexact Rounded
1448precision:  30
1449fmax3667 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102363892233711        Inexact Rounded
1450precision:  29
1451fmax3668 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110236389223371         Inexact Rounded
1452precision:  28
1453fmax3669 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211023638922337          Inexact Rounded
1454precision:  27
1455fmax3670 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102363892234           Inexact Rounded
1456precision:  26
1457fmax3671 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110236389223            Inexact Rounded
1458precision:  25
1459fmax3672 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211023638922             Inexact Rounded
1460precision:  24
1461fmax3673 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102363892              Inexact Rounded
1462precision:  23
1463fmax3674 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110236389               Inexact Rounded
1464precision:  22
1465fmax3675 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211023639                Inexact Rounded
1466precision:  21
1467fmax3676 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102364                 Inexact Rounded
1468precision:  20
1469fmax3677 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110236                  Inexact Rounded
1470precision:  19
1471fmax3678 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211024                   Inexact Rounded
1472precision:  18
1473fmax3679 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221102                    Inexact Rounded
1474precision:  17
1475fmax3680 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422110                     Inexact Rounded
1476precision:  16
1477fmax3681 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42211                      Inexact Rounded
1478precision:  15
1479fmax3682 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4221                       Inexact Rounded
1480precision:  14
1481fmax3683 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.422                        Inexact Rounded
1482precision:  13
1483fmax3684 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.42                         Inexact Rounded
1484precision:  12
1485fmax3685 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166.4                          Inexact Rounded
1486precision:  11
1487fmax3686 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 98471174166                            Inexact Rounded
1488precision:  10
1489fmax3687 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.847117417E+10                        Inexact Rounded
1490precision:   9
1491fmax3688 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.84711742E+10                         Inexact Rounded
1492precision:   8
1493fmax3689 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.8471174E+10                          Inexact Rounded
1494precision:   7
1495fmax3690 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.847117E+10                          Inexact Rounded
1496precision:   6
1497fmax3691 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.84712E+10                          Inexact Rounded
1498precision:   5
1499fmax3692 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.8471E+10                          Inexact Rounded
1500precision:   4
1501fmax3693 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.847E+10                          Inexact Rounded
1502precision:   3
1503fmax3694 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.85E+10                          Inexact Rounded
1504precision:   2
1505fmax3695 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 9.8E+10                          Inexact Rounded
1506precision:   1
1507fmax3696 fma  1   98471198160.56524417578665886060 -23994.14313393939743548945165462 -> 1E+11                          Inexact Rounded
1508
1509-- more zeros, etc.
1510rounding: half_up
1511precision:   9
1512
1513fmax3701 fma  1   5.00 1.00E-3 -> 5.00100
1514fmax3702 fma  1   00.00 0.000  -> 0.000
1515fmax3703 fma  1   00.00 0E-3   -> 0.000
1516fmax3704 fma  1   0E-3  00.00  -> 0.000
1517
1518fmax3710 fma  1   0E+3  00.00  -> 0.00
1519fmax3711 fma  1   0E+3  00.0   -> 0.0
1520fmax3712 fma  1   0E+3  00.    -> 0
1521fmax3713 fma  1   0E+3  00.E+1 -> 0E+1
1522fmax3714 fma  1   0E+3  00.E+2 -> 0E+2
1523fmax3715 fma  1   0E+3  00.E+3 -> 0E+3
1524fmax3716 fma  1   0E+3  00.E+4 -> 0E+3
1525fmax3717 fma  1   0E+3  00.E+5 -> 0E+3
1526fmax3718 fma  1   0E+3  -00.0   -> 0.0
1527fmax3719 fma  1   0E+3  -00.    -> 0
1528fmax3731 fma  1   0E+3  -00.E+1 -> 0E+1
1529
1530fmax3720 fma  1   00.00  0E+3  -> 0.00
1531fmax3721 fma  1   00.0   0E+3  -> 0.0
1532fmax3722 fma  1   00.    0E+3  -> 0
1533fmax3723 fma  1   00.E+1 0E+3  -> 0E+1
1534fmax3724 fma  1   00.E+2 0E+3  -> 0E+2
1535fmax3725 fma  1   00.E+3 0E+3  -> 0E+3
1536fmax3726 fma  1   00.E+4 0E+3  -> 0E+3
1537fmax3727 fma  1   00.E+5 0E+3  -> 0E+3
1538fmax3728 fma  1   -00.00 0E+3  -> 0.00
1539fmax3729 fma  1   -00.0  0E+3  -> 0.0
1540fmax3730 fma  1   -00.   0E+3  -> 0
1541
1542fmax3732 fma  1    0     0     ->  0
1543fmax3733 fma  1    0    -0     ->  0
1544fmax3734 fma  1   -0     0     ->  0
1545fmax3735 fma  1   -0    -0     -> -0     -- IEEE 854 special case
1546
1547fmax3736 fma  1    1    -1     ->  0
1548fmax3737 fma  1   -1    -1     -> -2
1549fmax3738 fma  1    1     1     ->  2
1550fmax3739 fma  1   -1     1     ->  0
1551
1552fmax3741 fma  1    0    -1     -> -1
1553fmax3742 fma  1   -0    -1     -> -1
1554fmax3743 fma  1    0     1     ->  1
1555fmax3744 fma  1   -0     1     ->  1
1556fmax3745 fma  1   -1     0     -> -1
1557fmax3746 fma  1   -1    -0     -> -1
1558fmax3747 fma  1    1     0     ->  1
1559fmax3748 fma  1    1    -0     ->  1
1560
1561fmax3751 fma  1    0.0  -1     -> -1.0
1562fmax3752 fma  1   -0.0  -1     -> -1.0
1563fmax3753 fma  1    0.0   1     ->  1.0
1564fmax3754 fma  1   -0.0   1     ->  1.0
1565fmax3755 fma  1   -1.0   0     -> -1.0
1566fmax3756 fma  1   -1.0  -0     -> -1.0
1567fmax3757 fma  1    1.0   0     ->  1.0
1568fmax3758 fma  1    1.0  -0     ->  1.0
1569
1570fmax3761 fma  1    0    -1.0   -> -1.0
1571fmax3762 fma  1   -0    -1.0   -> -1.0
1572fmax3763 fma  1    0     1.0   ->  1.0
1573fmax3764 fma  1   -0     1.0   ->  1.0
1574fmax3765 fma  1   -1     0.0   -> -1.0
1575fmax3766 fma  1   -1    -0.0   -> -1.0
1576fmax3767 fma  1    1     0.0   ->  1.0
1577fmax3768 fma  1    1    -0.0   ->  1.0
1578
1579fmax3771 fma  1    0.0  -1.0   -> -1.0
1580fmax3772 fma  1   -0.0  -1.0   -> -1.0
1581fmax3773 fma  1    0.0   1.0   ->  1.0
1582fmax3774 fma  1   -0.0   1.0   ->  1.0
1583fmax3775 fma  1   -1.0   0.0   -> -1.0
1584fmax3776 fma  1   -1.0  -0.0   -> -1.0
1585fmax3777 fma  1    1.0   0.0   ->  1.0
1586fmax3778 fma  1    1.0  -0.0   ->  1.0
1587
1588-- Specials
1589fmax3780 fma  1   -Inf  -Inf   -> -Infinity
1590fmax3781 fma  1   -Inf  -1000  -> -Infinity
1591fmax3782 fma  1   -Inf  -1     -> -Infinity
1592fmax3783 fma  1   -Inf  -0     -> -Infinity
1593fmax3784 fma  1   -Inf   0     -> -Infinity
1594fmax3785 fma  1   -Inf   1     -> -Infinity
1595fmax3786 fma  1   -Inf   1000  -> -Infinity
1596fmax3787 fma  1   -1000 -Inf   -> -Infinity
1597fmax3788 fma  1   -Inf  -Inf   -> -Infinity
1598fmax3789 fma  1   -1    -Inf   -> -Infinity
1599fmax3790 fma  1   -0    -Inf   -> -Infinity
1600fmax3791 fma  1    0    -Inf   -> -Infinity
1601fmax3792 fma  1    1    -Inf   -> -Infinity
1602fmax3793 fma  1    1000 -Inf   -> -Infinity
1603fmax3794 fma  1    Inf  -Inf   ->  NaN  Invalid_operation
1604
1605fmax3800 fma  1    Inf  -Inf   ->  NaN  Invalid_operation
1606fmax3801 fma  1    Inf  -1000  ->  Infinity
1607fmax3802 fma  1    Inf  -1     ->  Infinity
1608fmax3803 fma  1    Inf  -0     ->  Infinity
1609fmax3804 fma  1    Inf   0     ->  Infinity
1610fmax3805 fma  1    Inf   1     ->  Infinity
1611fmax3806 fma  1    Inf   1000  ->  Infinity
1612fmax3807 fma  1    Inf   Inf   ->  Infinity
1613fmax3808 fma  1   -1000  Inf   ->  Infinity
1614fmax3809 fma  1   -Inf   Inf   ->  NaN  Invalid_operation
1615fmax3810 fma  1   -1     Inf   ->  Infinity
1616fmax3811 fma  1   -0     Inf   ->  Infinity
1617fmax3812 fma  1    0     Inf   ->  Infinity
1618fmax3813 fma  1    1     Inf   ->  Infinity
1619fmax3814 fma  1    1000  Inf   ->  Infinity
1620fmax3815 fma  1    Inf   Inf   ->  Infinity
1621
1622fmax3821 fma  1    NaN -Inf    ->  NaN
1623fmax3822 fma  1    NaN -1000   ->  NaN
1624fmax3823 fma  1    NaN -1      ->  NaN
1625fmax3824 fma  1    NaN -0      ->  NaN
1626fmax3825 fma  1    NaN  0      ->  NaN
1627fmax3826 fma  1    NaN  1      ->  NaN
1628fmax3827 fma  1    NaN  1000   ->  NaN
1629fmax3828 fma  1    NaN  Inf    ->  NaN
1630fmax3829 fma  1    NaN  NaN    ->  NaN
1631fmax3830 fma  1   -Inf  NaN    ->  NaN
1632fmax3831 fma  1   -1000 NaN    ->  NaN
1633fmax3832 fma  1   -1    NaN    ->  NaN
1634fmax3833 fma  1   -0    NaN    ->  NaN
1635fmax3834 fma  1    0    NaN    ->  NaN
1636fmax3835 fma  1    1    NaN    ->  NaN
1637fmax3836 fma  1    1000 NaN    ->  NaN
1638fmax3837 fma  1    Inf  NaN    ->  NaN
1639
1640fmax3841 fma  1    sNaN -Inf   ->  NaN  Invalid_operation
1641fmax3842 fma  1    sNaN -1000  ->  NaN  Invalid_operation
1642fmax3843 fma  1    sNaN -1     ->  NaN  Invalid_operation
1643fmax3844 fma  1    sNaN -0     ->  NaN  Invalid_operation
1644fmax3845 fma  1    sNaN  0     ->  NaN  Invalid_operation
1645fmax3846 fma  1    sNaN  1     ->  NaN  Invalid_operation
1646fmax3847 fma  1    sNaN  1000  ->  NaN  Invalid_operation
1647fmax3848 fma  1    sNaN  NaN   ->  NaN  Invalid_operation
1648fmax3849 fma  1    sNaN sNaN   ->  NaN  Invalid_operation
1649fmax3850 fma  1    NaN  sNaN   ->  NaN  Invalid_operation
1650fmax3851 fma  1   -Inf  sNaN   ->  NaN  Invalid_operation
1651fmax3852 fma  1   -1000 sNaN   ->  NaN  Invalid_operation
1652fmax3853 fma  1   -1    sNaN   ->  NaN  Invalid_operation
1653fmax3854 fma  1   -0    sNaN   ->  NaN  Invalid_operation
1654fmax3855 fma  1    0    sNaN   ->  NaN  Invalid_operation
1655fmax3856 fma  1    1    sNaN   ->  NaN  Invalid_operation
1656fmax3857 fma  1    1000 sNaN   ->  NaN  Invalid_operation
1657fmax3858 fma  1    Inf  sNaN   ->  NaN  Invalid_operation
1658fmax3859 fma  1    NaN  sNaN   ->  NaN  Invalid_operation
1659
1660-- propagating NaNs
1661fmax3861 fma  1    NaN1   -Inf    ->  NaN1
1662fmax3862 fma  1   +NaN2   -1000   ->  NaN2
1663fmax3863 fma  1    NaN3    1000   ->  NaN3
1664fmax3864 fma  1    NaN4    Inf    ->  NaN4
1665fmax3865 fma  1    NaN5   +NaN6   ->  NaN5
1666fmax3866 fma  1   -Inf     NaN7   ->  NaN7
1667fmax3867 fma  1   -1000    NaN8   ->  NaN8
1668fmax3868 fma  1    1000    NaN9   ->  NaN9
1669fmax3869 fma  1    Inf    +NaN10  ->  NaN10
1670fmax3871 fma  1    sNaN11  -Inf   ->  NaN11  Invalid_operation
1671fmax3872 fma  1    sNaN12  -1000  ->  NaN12  Invalid_operation
1672fmax3873 fma  1    sNaN13   1000  ->  NaN13  Invalid_operation
1673fmax3874 fma  1    sNaN14   NaN17 ->  NaN14  Invalid_operation
1674fmax3875 fma  1    sNaN15  sNaN18 ->  NaN15  Invalid_operation
1675fmax3876 fma  1    NaN16   sNaN19 ->  NaN19  Invalid_operation
1676fmax3877 fma  1   -Inf    +sNaN20 ->  NaN20  Invalid_operation
1677fmax3878 fma  1   -1000    sNaN21 ->  NaN21  Invalid_operation
1678fmax3879 fma  1    1000    sNaN22 ->  NaN22  Invalid_operation
1679fmax3880 fma  1    Inf     sNaN23 ->  NaN23  Invalid_operation
1680fmax3881 fma  1   +NaN25  +sNaN24 ->  NaN24  Invalid_operation
1681fmax3882 fma  1   -NaN26    NaN28 -> -NaN26
1682fmax3883 fma  1   -sNaN27  sNaN29 -> -NaN27  Invalid_operation
1683fmax3884 fma  1    1000    -NaN30 -> -NaN30
1684fmax3885 fma  1    1000   -sNaN31 -> -NaN31  Invalid_operation
1685
1686-- overflow, underflow and subnormal tests
1687maxexponent: 999999
1688minexponent: -999999
1689precision: 9
1690fmax3890 fma  1   1E+999999     9E+999999   -> Infinity Overflow Inexact Rounded
1691fmax3891 fma  1   9E+999999     1E+999999   -> Infinity Overflow Inexact Rounded
1692fmax3892 fma  1   -1.1E-999999  1E-999999   -> -1E-1000000    Subnormal
1693fmax3893 fma  1   1E-999999    -1.1e-999999 -> -1E-1000000    Subnormal
1694fmax3894 fma  1   -1.0001E-999999  1E-999999   -> -1E-1000003 Subnormal
1695fmax3895 fma  1   1E-999999    -1.0001e-999999 -> -1E-1000003 Subnormal
1696fmax3896 fma  1   -1E+999999   -9E+999999   -> -Infinity Overflow Inexact Rounded
1697fmax3897 fma  1   -9E+999999   -1E+999999   -> -Infinity Overflow Inexact Rounded
1698fmax3898 fma  1   +1.1E-999999 -1E-999999   -> 1E-1000000   Subnormal
1699fmax3899 fma  1   -1E-999999   +1.1e-999999 -> 1E-1000000    Subnormal
1700fmax3900 fma  1   +1.0001E-999999 -1E-999999   -> 1E-1000003 Subnormal
1701fmax3901 fma  1   -1E-999999   +1.0001e-999999 -> 1E-1000003 Subnormal
1702fmax3902 fma  1   -1E+999999   +9E+999999   ->  8E+999999
1703fmax3903 fma  1   -9E+999999   +1E+999999   -> -8E+999999
1704
1705precision: 3
1706fmax3904 fma  1        0 -9.999E+999999   -> -Infinity Inexact Overflow Rounded
1707fmax3905 fma  1          -9.999E+999999 0 -> -Infinity Inexact Overflow Rounded
1708fmax3906 fma  1        0  9.999E+999999   ->  Infinity Inexact Overflow Rounded
1709fmax3907 fma  1           9.999E+999999 0 ->  Infinity Inexact Overflow Rounded
1710
1711precision: 3
1712maxexponent: 999
1713minexponent: -999
1714fmax3910 fma  1    1.00E-999   0    ->   1.00E-999
1715fmax3911 fma  1    0.1E-999    0    ->   1E-1000   Subnormal
1716fmax3912 fma  1    0.10E-999   0    ->   1.0E-1000 Subnormal
1717fmax3913 fma  1    0.100E-999  0    ->   1.0E-1000 Subnormal Rounded
1718fmax3914 fma  1    0.01E-999   0    ->   1E-1001   Subnormal
1719-- next is rounded to Nmin
1720fmax3915 fma  1    0.999E-999  0    ->   1.00E-999 Inexact Rounded Subnormal Underflow
1721fmax3916 fma  1    0.099E-999  0    ->   1.0E-1000 Inexact Rounded Subnormal Underflow
1722fmax3917 fma  1    0.009E-999  0    ->   1E-1001   Inexact Rounded Subnormal Underflow
1723fmax3918 fma  1    0.001E-999  0    ->   0E-1001   Inexact Rounded Subnormal Underflow Clamped
1724fmax3919 fma  1    0.0009E-999 0    ->   0E-1001   Inexact Rounded Subnormal Underflow Clamped
1725fmax3920 fma  1    0.0001E-999 0    ->   0E-1001   Inexact Rounded Subnormal Underflow Clamped
1726
1727fmax3930 fma  1   -1.00E-999   0    ->  -1.00E-999
1728fmax3931 fma  1   -0.1E-999    0    ->  -1E-1000   Subnormal
1729fmax3932 fma  1   -0.10E-999   0    ->  -1.0E-1000 Subnormal
1730fmax3933 fma  1   -0.100E-999  0    ->  -1.0E-1000 Subnormal Rounded
1731fmax3934 fma  1   -0.01E-999   0    ->  -1E-1001   Subnormal
1732-- next is rounded to Nmin
1733fmax3935 fma  1   -0.999E-999  0    ->  -1.00E-999 Inexact Rounded Subnormal Underflow
1734fmax3936 fma  1   -0.099E-999  0    ->  -1.0E-1000 Inexact Rounded Subnormal Underflow
1735fmax3937 fma  1   -0.009E-999  0    ->  -1E-1001   Inexact Rounded Subnormal Underflow
1736fmax3938 fma  1   -0.001E-999  0    ->  -0E-1001   Inexact Rounded Subnormal Underflow Clamped
1737fmax3939 fma  1   -0.0009E-999 0    ->  -0E-1001   Inexact Rounded Subnormal Underflow Clamped
1738fmax3940 fma  1   -0.0001E-999 0    ->  -0E-1001   Inexact Rounded Subnormal Underflow Clamped
1739
1740-- some non-zero subnormal fma  1  s
1741fmax3950 fma  1    1.00E-999    0.1E-999  ->   1.10E-999
1742fmax3951 fma  1    0.1E-999     0.1E-999  ->   2E-1000    Subnormal
1743fmax3952 fma  1    0.10E-999    0.1E-999  ->   2.0E-1000  Subnormal
1744fmax3953 fma  1    0.100E-999   0.1E-999  ->   2.0E-1000  Subnormal Rounded
1745fmax3954 fma  1    0.01E-999    0.1E-999  ->   1.1E-1000  Subnormal
1746fmax3955 fma  1    0.999E-999   0.1E-999  ->   1.10E-999  Inexact Rounded
1747fmax3956 fma  1    0.099E-999   0.1E-999  ->   2.0E-1000  Inexact Rounded Subnormal Underflow
1748fmax3957 fma  1    0.009E-999   0.1E-999  ->   1.1E-1000  Inexact Rounded Subnormal Underflow
1749fmax3958 fma  1    0.001E-999   0.1E-999  ->   1.0E-1000  Inexact Rounded Subnormal Underflow
1750fmax3959 fma  1    0.0009E-999  0.1E-999  ->   1.0E-1000  Inexact Rounded Subnormal Underflow
1751fmax3960 fma  1    0.0001E-999  0.1E-999  ->   1.0E-1000  Inexact Rounded Subnormal Underflow
1752-- negatives...
1753fmax3961 fma  1    1.00E-999   -0.1E-999  ->   9.0E-1000  Subnormal
1754fmax3962 fma  1    0.1E-999    -0.1E-999  ->   0E-1000
1755fmax3963 fma  1    0.10E-999   -0.1E-999  ->   0E-1001
1756fmax3964 fma  1    0.100E-999  -0.1E-999  ->   0E-1001    Clamped
1757fmax3965 fma  1    0.01E-999   -0.1E-999  ->   -9E-1001   Subnormal
1758fmax3966 fma  1    0.999E-999  -0.1E-999  ->   9.0E-1000  Inexact Rounded Subnormal Underflow
1759fmax3967 fma  1    0.099E-999  -0.1E-999  ->   -0E-1001   Inexact Rounded Subnormal Underflow Clamped
1760fmax3968 fma  1    0.009E-999  -0.1E-999  ->   -9E-1001   Inexact Rounded Subnormal Underflow
1761fmax3969 fma  1    0.001E-999  -0.1E-999  ->   -1.0E-1000 Inexact Rounded Subnormal Underflow
1762fmax3970 fma  1    0.0009E-999 -0.1E-999  ->   -1.0E-1000 Inexact Rounded Subnormal Underflow
1763fmax3971 fma  1    0.0001E-999 -0.1E-999  ->   -1.0E-1000 Inexact Rounded Subnormal Underflow
1764
1765-- some 'real' numbers
1766maxExponent: 384
1767minExponent: -383
1768precision: 8
1769fmax3566 fma  1   99999061735E-394  0E-394 -> 9.999906E-384 Inexact Rounded Underflow Subnormal
1770precision: 7
1771fmax3567 fma  1   99999061735E-394  0E-394 -> 9.99991E-384 Inexact Rounded Underflow Subnormal
1772precision: 6
1773fmax3568 fma  1   99999061735E-394  0E-394 -> 9.9999E-384 Inexact Rounded Underflow Subnormal
1774
1775-- now the case where we can get underflow but the result is normal
1776-- [note this can't happen if the operands are also bounded, as we
1777-- cannot represent 1E-399, for example]
1778precision:   16
1779rounding:    half_up
1780maxExponent: 384
1781minExponent: -383
1782
1783fmax3571 fma  1         1E-383       0  -> 1E-383
1784fmax3572 fma  1         1E-384       0  -> 1E-384   Subnormal
1785fmax3573 fma  1         1E-383  1E-384  -> 1.1E-383
1786fmax3574 subtract  1E-383  1E-384  ->   9E-384 Subnormal
1787
1788-- Here we explore the boundary of rounding a subnormal to Nmin
1789fmax3575 subtract  1E-383  1E-398  ->   9.99999999999999E-384  Subnormal
1790fmax3576 subtract  1E-383  1E-398  ->   9.99999999999999E-384  Subnormal
1791fmax3577 subtract  1E-383  1E-399  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
1792fmax3578 subtract  1E-383  1E-400  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
1793fmax3579 subtract  1E-383  1E-401  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
1794fmax3580 subtract  1E-383  1E-402  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
1795
1796-- check for double-rounded subnormals
1797precision:   5
1798maxexponent: 79
1799minexponent: -79
1800-- Add: lhs and rhs 0
1801fmax31001 fma  1         1.52444E-80 0 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1802fmax31002 fma  1         1.52445E-80 0 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1803fmax31003 fma  1         1.52446E-80 0 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1804fmax31004 fma  1         0 1.52444E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1805fmax31005 fma  1         0 1.52445E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1806fmax31006 fma  1         0 1.52446E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1807
1808-- Add: lhs >> rhs and vice versa
1809fmax31011 fma  1         1.52444E-80 1E-100 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1810fmax31012 fma  1         1.52445E-80 1E-100 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1811fmax31013 fma  1         1.52446E-80 1E-100 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1812fmax31014 fma  1         1E-100 1.52444E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1813fmax31015 fma  1         1E-100 1.52445E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1814fmax31016 fma  1         1E-100 1.52446E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
1815
1816-- Add: lhs + rhs fma  1  ition carried out
1817fmax31021 fma  1         1.52443E-80 1.00001E-80  -> 2.524E-80 Inexact Rounded Subnormal Underflow
1818fmax31022 fma  1         1.52444E-80 1.00001E-80  -> 2.524E-80 Inexact Rounded Subnormal Underflow
1819fmax31023 fma  1         1.52445E-80 1.00001E-80  -> 2.524E-80 Inexact Rounded Subnormal Underflow
1820fmax31024 fma  1         1.00001E-80  1.52443E-80 -> 2.524E-80 Inexact Rounded Subnormal Underflow
1821fmax31025 fma  1         1.00001E-80  1.52444E-80 -> 2.524E-80 Inexact Rounded Subnormal Underflow
1822fmax31026 fma  1         1.00001E-80  1.52445E-80 -> 2.524E-80 Inexact Rounded Subnormal Underflow
1823
1824-- And for round down full and subnormal results
1825precision:    16
1826maxExponent: +384
1827minExponent: -383
1828rounding:     down
1829
1830fmax31100 fma  1   1e+2 -1e-383    -> 99.99999999999999 Rounded Inexact
1831fmax31101 fma  1   1e+1 -1e-383    -> 9.999999999999999  Rounded Inexact
1832fmax31103 fma  1     +1 -1e-383    -> 0.9999999999999999  Rounded Inexact
1833fmax31104 fma  1   1e-1 -1e-383    -> 0.09999999999999999  Rounded Inexact
1834fmax31105 fma  1   1e-2 -1e-383    -> 0.009999999999999999  Rounded Inexact
1835fmax31106 fma  1   1e-3 -1e-383    -> 0.0009999999999999999  Rounded Inexact
1836fmax31107 fma  1   1e-4 -1e-383    -> 0.00009999999999999999  Rounded Inexact
1837fmax31108 fma  1   1e-5 -1e-383    -> 0.000009999999999999999  Rounded Inexact
1838fmax31109 fma  1   1e-6 -1e-383    -> 9.999999999999999E-7  Rounded Inexact
1839
1840rounding:     ceiling
1841fmax31110 fma  1   -1e+2 +1e-383   -> -99.99999999999999 Rounded Inexact
1842fmax31111 fma  1   -1e+1 +1e-383   -> -9.999999999999999  Rounded Inexact
1843fmax31113 fma  1      -1 +1e-383   -> -0.9999999999999999  Rounded Inexact
1844fmax31114 fma  1   -1e-1 +1e-383   -> -0.09999999999999999  Rounded Inexact
1845fmax31115 fma  1   -1e-2 +1e-383   -> -0.009999999999999999  Rounded Inexact
1846fmax31116 fma  1   -1e-3 +1e-383   -> -0.0009999999999999999  Rounded Inexact
1847fmax31117 fma  1   -1e-4 +1e-383   -> -0.00009999999999999999  Rounded Inexact
1848fmax31118 fma  1   -1e-5 +1e-383   -> -0.000009999999999999999  Rounded Inexact
1849fmax31119 fma  1   -1e-6 +1e-383   -> -9.999999999999999E-7  Rounded Inexact
1850
1851rounding:     down
1852precision:    7
1853maxExponent: +96
1854minExponent: -95
1855fmax31130 fma  1     1            -1e-200  -> 0.9999999  Rounded Inexact
1856-- subnormal boundary
1857fmax31131 fma  1     1.000000E-94  -1e-200  ->  9.999999E-95  Rounded Inexact
1858fmax31132 fma  1     1.000001E-95  -1e-200  ->  1.000000E-95  Rounded Inexact
1859fmax31133 fma  1     1.000000E-95  -1e-200  ->  9.99999E-96  Rounded Inexact Subnormal Underflow
1860fmax31134 fma  1     0.999999E-95  -1e-200  ->  9.99998E-96  Rounded Inexact Subnormal Underflow
1861fmax31135 fma  1     0.001000E-95  -1e-200  ->  9.99E-99  Rounded Inexact Subnormal Underflow
1862fmax31136 fma  1     0.000999E-95  -1e-200  ->  9.98E-99  Rounded Inexact Subnormal Underflow
1863fmax31137 fma  1     1.000000E-95  -1e-101  ->  9.99999E-96  Subnormal
1864fmax31138 fma  1        10000E-101 -1e-200  ->  9.999E-98  Subnormal Inexact Rounded Underflow
1865fmax31139 fma  1         1000E-101 -1e-200  ->  9.99E-99   Subnormal Inexact Rounded Underflow
1866fmax31140 fma  1          100E-101 -1e-200  ->  9.9E-100   Subnormal Inexact Rounded Underflow
1867fmax31141 fma  1           10E-101 -1e-200  ->  9E-101     Subnormal Inexact Rounded Underflow
1868fmax31142 fma  1            1E-101 -1e-200  ->  0E-101     Subnormal Inexact Rounded Underflow Clamped
1869fmax31143 fma  1            0E-101 -1e-200  -> -0E-101     Subnormal Inexact Rounded Underflow Clamped
1870fmax31144 fma  1            1E-102 -1e-200  ->  0E-101     Subnormal Inexact Rounded Underflow Clamped
1871
1872fmax31151 fma  1        10000E-102 -1e-200  ->  9.99E-99  Subnormal Inexact Rounded Underflow
1873fmax31152 fma  1         1000E-102 -1e-200  ->  9.9E-100  Subnormal Inexact Rounded Underflow
1874fmax31153 fma  1          100E-102 -1e-200  ->  9E-101   Subnormal Inexact Rounded Underflow
1875fmax31154 fma  1           10E-102 -1e-200  ->  0E-101     Subnormal Inexact Rounded Underflow Clamped
1876fmax31155 fma  1            1E-102 -1e-200  ->  0E-101     Subnormal Inexact Rounded Underflow Clamped
1877fmax31156 fma  1            0E-102 -1e-200  -> -0E-101     Subnormal Inexact Rounded Underflow Clamped
1878fmax31157 fma  1            1E-103 -1e-200  ->  0E-101     Subnormal Inexact Rounded Underflow Clamped
1879
1880fmax31160 fma  1          100E-105 -1e-101  -> -0E-101 Subnormal Inexact Rounded Underflow Clamped
1881fmax31161 fma  1          100E-105 -1e-201  ->  0E-101 Subnormal Inexact Rounded Underflow Clamped
1882
1883-- tests based on Gunnar Degnbol's edge case
1884precision:   15
1885rounding:    half_up
1886maxExponent: 384
1887minexponent: -383
1888
1889fmax31200 fma  1   1E15  -0.5                 ->  1.00000000000000E+15 Inexact Rounded
1890fmax31201 fma  1   1E15  -0.50                ->  1.00000000000000E+15 Inexact Rounded
1891fmax31210 fma  1   1E15  -0.51                ->  999999999999999      Inexact Rounded
1892fmax31211 fma  1   1E15  -0.501               ->  999999999999999      Inexact Rounded
1893fmax31212 fma  1   1E15  -0.5001              ->  999999999999999      Inexact Rounded
1894fmax31213 fma  1   1E15  -0.50001             ->  999999999999999      Inexact Rounded
1895fmax31214 fma  1   1E15  -0.500001            ->  999999999999999      Inexact Rounded
1896fmax31215 fma  1   1E15  -0.5000001           ->  999999999999999      Inexact Rounded
1897fmax31216 fma  1   1E15  -0.50000001          ->  999999999999999      Inexact Rounded
1898fmax31217 fma  1   1E15  -0.500000001         ->  999999999999999      Inexact Rounded
1899fmax31218 fma  1   1E15  -0.5000000001        ->  999999999999999      Inexact Rounded
1900fmax31219 fma  1   1E15  -0.50000000001       ->  999999999999999      Inexact Rounded
1901fmax31220 fma  1   1E15  -0.500000000001      ->  999999999999999      Inexact Rounded
1902fmax31221 fma  1   1E15  -0.5000000000001     ->  999999999999999      Inexact Rounded
1903fmax31222 fma  1   1E15  -0.50000000000001    ->  999999999999999      Inexact Rounded
1904fmax31223 fma  1   1E15  -0.500000000000001   ->  999999999999999      Inexact Rounded
1905fmax31224 fma  1   1E15  -0.5000000000000001  ->  999999999999999      Inexact Rounded
1906fmax31225 fma  1   1E15  -0.5000000000000000  ->  1.00000000000000E+15 Inexact Rounded
1907fmax31230 fma  1   1E15  -5000000.000000001   ->  999999995000000      Inexact Rounded
1908
1909precision:   16
1910
1911fmax31300 fma  1   1E16  -0.5                 ->  1.000000000000000E+16 Inexact Rounded
1912fmax31310 fma  1   1E16  -0.51                ->  9999999999999999      Inexact Rounded
1913fmax31311 fma  1   1E16  -0.501               ->  9999999999999999      Inexact Rounded
1914fmax31312 fma  1   1E16  -0.5001              ->  9999999999999999      Inexact Rounded
1915fmax31313 fma  1   1E16  -0.50001             ->  9999999999999999      Inexact Rounded
1916fmax31314 fma  1   1E16  -0.500001            ->  9999999999999999      Inexact Rounded
1917fmax31315 fma  1   1E16  -0.5000001           ->  9999999999999999      Inexact Rounded
1918fmax31316 fma  1   1E16  -0.50000001          ->  9999999999999999      Inexact Rounded
1919fmax31317 fma  1   1E16  -0.500000001         ->  9999999999999999      Inexact Rounded
1920fmax31318 fma  1   1E16  -0.5000000001        ->  9999999999999999      Inexact Rounded
1921fmax31319 fma  1   1E16  -0.50000000001       ->  9999999999999999      Inexact Rounded
1922fmax31320 fma  1   1E16  -0.500000000001      ->  9999999999999999      Inexact Rounded
1923fmax31321 fma  1   1E16  -0.5000000000001     ->  9999999999999999      Inexact Rounded
1924fmax31322 fma  1   1E16  -0.50000000000001    ->  9999999999999999      Inexact Rounded
1925fmax31323 fma  1   1E16  -0.500000000000001   ->  9999999999999999      Inexact Rounded
1926fmax31324 fma  1   1E16  -0.5000000000000001  ->  9999999999999999      Inexact Rounded
1927fmax31325 fma  1   1E16  -0.5000000000000000  ->  1.000000000000000E+16 Inexact Rounded
1928fmax31326 fma  1   1E16  -0.500000000000000   ->  1.000000000000000E+16 Inexact Rounded
1929fmax31327 fma  1   1E16  -0.50000000000000    ->  1.000000000000000E+16 Inexact Rounded
1930fmax31328 fma  1   1E16  -0.5000000000000     ->  1.000000000000000E+16 Inexact Rounded
1931fmax31329 fma  1   1E16  -0.500000000000      ->  1.000000000000000E+16 Inexact Rounded
1932fmax31330 fma  1   1E16  -0.50000000000       ->  1.000000000000000E+16 Inexact Rounded
1933fmax31331 fma  1   1E16  -0.5000000000        ->  1.000000000000000E+16 Inexact Rounded
1934fmax31332 fma  1   1E16  -0.500000000         ->  1.000000000000000E+16 Inexact Rounded
1935fmax31333 fma  1   1E16  -0.50000000          ->  1.000000000000000E+16 Inexact Rounded
1936fmax31334 fma  1   1E16  -0.5000000           ->  1.000000000000000E+16 Inexact Rounded
1937fmax31335 fma  1   1E16  -0.500000            ->  1.000000000000000E+16 Inexact Rounded
1938fmax31336 fma  1   1E16  -0.50000             ->  1.000000000000000E+16 Inexact Rounded
1939fmax31337 fma  1   1E16  -0.5000              ->  1.000000000000000E+16 Inexact Rounded
1940fmax31338 fma  1   1E16  -0.500               ->  1.000000000000000E+16 Inexact Rounded
1941fmax31339 fma  1   1E16  -0.50                ->  1.000000000000000E+16 Inexact Rounded
1942
1943fmax31340 fma  1   1E16  -5000000.000010001   ->  9999999995000000      Inexact Rounded
1944fmax31341 fma  1   1E16  -5000000.000000001   ->  9999999995000000      Inexact Rounded
1945
1946fmax31349 fma  1   9999999999999999 0.4                 ->  9999999999999999      Inexact Rounded
1947fmax31350 fma  1   9999999999999999 0.49                ->  9999999999999999      Inexact Rounded
1948fmax31351 fma  1   9999999999999999 0.499               ->  9999999999999999      Inexact Rounded
1949fmax31352 fma  1   9999999999999999 0.4999              ->  9999999999999999      Inexact Rounded
1950fmax31353 fma  1   9999999999999999 0.49999             ->  9999999999999999      Inexact Rounded
1951fmax31354 fma  1   9999999999999999 0.499999            ->  9999999999999999      Inexact Rounded
1952fmax31355 fma  1   9999999999999999 0.4999999           ->  9999999999999999      Inexact Rounded
1953fmax31356 fma  1   9999999999999999 0.49999999          ->  9999999999999999      Inexact Rounded
1954fmax31357 fma  1   9999999999999999 0.499999999         ->  9999999999999999      Inexact Rounded
1955fmax31358 fma  1   9999999999999999 0.4999999999        ->  9999999999999999      Inexact Rounded
1956fmax31359 fma  1   9999999999999999 0.49999999999       ->  9999999999999999      Inexact Rounded
1957fmax31360 fma  1   9999999999999999 0.499999999999      ->  9999999999999999      Inexact Rounded
1958fmax31361 fma  1   9999999999999999 0.4999999999999     ->  9999999999999999      Inexact Rounded
1959fmax31362 fma  1   9999999999999999 0.49999999999999    ->  9999999999999999      Inexact Rounded
1960fmax31363 fma  1   9999999999999999 0.499999999999999   ->  9999999999999999      Inexact Rounded
1961fmax31364 fma  1   9999999999999999 0.4999999999999999  ->  9999999999999999      Inexact Rounded
1962fmax31365 fma  1   9999999999999999 0.5000000000000000  ->  1.000000000000000E+16 Inexact Rounded
1963fmax31367 fma  1   9999999999999999 0.500000000000000   ->  1.000000000000000E+16 Inexact Rounded
1964fmax31368 fma  1   9999999999999999 0.50000000000000    ->  1.000000000000000E+16 Inexact Rounded
1965fmax31369 fma  1   9999999999999999 0.5000000000000     ->  1.000000000000000E+16 Inexact Rounded
1966fmax31370 fma  1   9999999999999999 0.500000000000      ->  1.000000000000000E+16 Inexact Rounded
1967fmax31371 fma  1   9999999999999999 0.50000000000       ->  1.000000000000000E+16 Inexact Rounded
1968fmax31372 fma  1   9999999999999999 0.5000000000        ->  1.000000000000000E+16 Inexact Rounded
1969fmax31373 fma  1   9999999999999999 0.500000000         ->  1.000000000000000E+16 Inexact Rounded
1970fmax31374 fma  1   9999999999999999 0.50000000          ->  1.000000000000000E+16 Inexact Rounded
1971fmax31375 fma  1   9999999999999999 0.5000000           ->  1.000000000000000E+16 Inexact Rounded
1972fmax31376 fma  1   9999999999999999 0.500000            ->  1.000000000000000E+16 Inexact Rounded
1973fmax31377 fma  1   9999999999999999 0.50000             ->  1.000000000000000E+16 Inexact Rounded
1974fmax31378 fma  1   9999999999999999 0.5000              ->  1.000000000000000E+16 Inexact Rounded
1975fmax31379 fma  1   9999999999999999 0.500               ->  1.000000000000000E+16 Inexact Rounded
1976fmax31380 fma  1   9999999999999999 0.50                ->  1.000000000000000E+16 Inexact Rounded
1977fmax31381 fma  1   9999999999999999 0.5                 ->  1.000000000000000E+16 Inexact Rounded
1978fmax31382 fma  1   9999999999999999 0.5000000000000001  ->  1.000000000000000E+16 Inexact Rounded
1979fmax31383 fma  1   9999999999999999 0.500000000000001   ->  1.000000000000000E+16 Inexact Rounded
1980fmax31384 fma  1   9999999999999999 0.50000000000001    ->  1.000000000000000E+16 Inexact Rounded
1981fmax31385 fma  1   9999999999999999 0.5000000000001     ->  1.000000000000000E+16 Inexact Rounded
1982fmax31386 fma  1   9999999999999999 0.500000000001      ->  1.000000000000000E+16 Inexact Rounded
1983fmax31387 fma  1   9999999999999999 0.50000000001       ->  1.000000000000000E+16 Inexact Rounded
1984fmax31388 fma  1   9999999999999999 0.5000000001        ->  1.000000000000000E+16 Inexact Rounded
1985fmax31389 fma  1   9999999999999999 0.500000001         ->  1.000000000000000E+16 Inexact Rounded
1986fmax31390 fma  1   9999999999999999 0.50000001          ->  1.000000000000000E+16 Inexact Rounded
1987fmax31391 fma  1   9999999999999999 0.5000001           ->  1.000000000000000E+16 Inexact Rounded
1988fmax31392 fma  1   9999999999999999 0.500001            ->  1.000000000000000E+16 Inexact Rounded
1989fmax31393 fma  1   9999999999999999 0.50001             ->  1.000000000000000E+16 Inexact Rounded
1990fmax31394 fma  1   9999999999999999 0.5001              ->  1.000000000000000E+16 Inexact Rounded
1991fmax31395 fma  1   9999999999999999 0.501               ->  1.000000000000000E+16 Inexact Rounded
1992fmax31396 fma  1   9999999999999999 0.51                ->  1.000000000000000E+16 Inexact Rounded
1993
1994-- More GD edge cases, where difference between the unadjusted
1995-- exponents is larger than the maximum precision and one side is 0
1996precision:   15
1997rounding:    half_up
1998maxExponent: 384
1999minexponent: -383
2000
2001fmax31400 fma  1    0 1.23456789012345     -> 1.23456789012345
2002fmax31401 fma  1    0 1.23456789012345E-1  -> 0.123456789012345
2003fmax31402 fma  1    0 1.23456789012345E-2  -> 0.0123456789012345
2004fmax31403 fma  1    0 1.23456789012345E-3  -> 0.00123456789012345
2005fmax31404 fma  1    0 1.23456789012345E-4  -> 0.000123456789012345
2006fmax31405 fma  1    0 1.23456789012345E-5  -> 0.0000123456789012345
2007fmax31406 fma  1    0 1.23456789012345E-6  -> 0.00000123456789012345
2008fmax31407 fma  1    0 1.23456789012345E-7  -> 1.23456789012345E-7
2009fmax31408 fma  1    0 1.23456789012345E-8  -> 1.23456789012345E-8
2010fmax31409 fma  1    0 1.23456789012345E-9  -> 1.23456789012345E-9
2011fmax31410 fma  1    0 1.23456789012345E-10 -> 1.23456789012345E-10
2012fmax31411 fma  1    0 1.23456789012345E-11 -> 1.23456789012345E-11
2013fmax31412 fma  1    0 1.23456789012345E-12 -> 1.23456789012345E-12
2014fmax31413 fma  1    0 1.23456789012345E-13 -> 1.23456789012345E-13
2015fmax31414 fma  1    0 1.23456789012345E-14 -> 1.23456789012345E-14
2016fmax31415 fma  1    0 1.23456789012345E-15 -> 1.23456789012345E-15
2017fmax31416 fma  1    0 1.23456789012345E-16 -> 1.23456789012345E-16
2018fmax31417 fma  1    0 1.23456789012345E-17 -> 1.23456789012345E-17
2019fmax31418 fma  1    0 1.23456789012345E-18 -> 1.23456789012345E-18
2020fmax31419 fma  1    0 1.23456789012345E-19 -> 1.23456789012345E-19
2021
2022-- same, precision 16..
2023precision:   16
2024fmax31420 fma  1    0 1.123456789012345     -> 1.123456789012345
2025fmax31421 fma  1    0 1.123456789012345E-1  -> 0.1123456789012345
2026fmax31422 fma  1    0 1.123456789012345E-2  -> 0.01123456789012345
2027fmax31423 fma  1    0 1.123456789012345E-3  -> 0.001123456789012345
2028fmax31424 fma  1    0 1.123456789012345E-4  -> 0.0001123456789012345
2029fmax31425 fma  1    0 1.123456789012345E-5  -> 0.00001123456789012345
2030fmax31426 fma  1    0 1.123456789012345E-6  -> 0.000001123456789012345
2031fmax31427 fma  1    0 1.123456789012345E-7  -> 1.123456789012345E-7
2032fmax31428 fma  1    0 1.123456789012345E-8  -> 1.123456789012345E-8
2033fmax31429 fma  1    0 1.123456789012345E-9  -> 1.123456789012345E-9
2034fmax31430 fma  1    0 1.123456789012345E-10 -> 1.123456789012345E-10
2035fmax31431 fma  1    0 1.123456789012345E-11 -> 1.123456789012345E-11
2036fmax31432 fma  1    0 1.123456789012345E-12 -> 1.123456789012345E-12
2037fmax31433 fma  1    0 1.123456789012345E-13 -> 1.123456789012345E-13
2038fmax31434 fma  1    0 1.123456789012345E-14 -> 1.123456789012345E-14
2039fmax31435 fma  1    0 1.123456789012345E-15 -> 1.123456789012345E-15
2040fmax31436 fma  1    0 1.123456789012345E-16 -> 1.123456789012345E-16
2041fmax31437 fma  1    0 1.123456789012345E-17 -> 1.123456789012345E-17
2042fmax31438 fma  1    0 1.123456789012345E-18 -> 1.123456789012345E-18
2043fmax31439 fma  1    0 1.123456789012345E-19 -> 1.123456789012345E-19
2044
2045-- same, reversed 0
2046fmax31440 fma  1   1.123456789012345     0 -> 1.123456789012345
2047fmax31441 fma  1   1.123456789012345E-1  0 -> 0.1123456789012345
2048fmax31442 fma  1   1.123456789012345E-2  0 -> 0.01123456789012345
2049fmax31443 fma  1   1.123456789012345E-3  0 -> 0.001123456789012345
2050fmax31444 fma  1   1.123456789012345E-4  0 -> 0.0001123456789012345
2051fmax31445 fma  1   1.123456789012345E-5  0 -> 0.00001123456789012345
2052fmax31446 fma  1   1.123456789012345E-6  0 -> 0.000001123456789012345
2053fmax31447 fma  1   1.123456789012345E-7  0 -> 1.123456789012345E-7
2054fmax31448 fma  1   1.123456789012345E-8  0 -> 1.123456789012345E-8
2055fmax31449 fma  1   1.123456789012345E-9  0 -> 1.123456789012345E-9
2056fmax31450 fma  1   1.123456789012345E-10 0 -> 1.123456789012345E-10
2057fmax31451 fma  1   1.123456789012345E-11 0 -> 1.123456789012345E-11
2058fmax31452 fma  1   1.123456789012345E-12 0 -> 1.123456789012345E-12
2059fmax31453 fma  1   1.123456789012345E-13 0 -> 1.123456789012345E-13
2060fmax31454 fma  1   1.123456789012345E-14 0 -> 1.123456789012345E-14
2061fmax31455 fma  1   1.123456789012345E-15 0 -> 1.123456789012345E-15
2062fmax31456 fma  1   1.123456789012345E-16 0 -> 1.123456789012345E-16
2063fmax31457 fma  1   1.123456789012345E-17 0 -> 1.123456789012345E-17
2064fmax31458 fma  1   1.123456789012345E-18 0 -> 1.123456789012345E-18
2065fmax31459 fma  1   1.123456789012345E-19 0 -> 1.123456789012345E-19
2066
2067-- same, Es on the 0
2068fmax31460 fma  1   1.123456789012345  0E-0   -> 1.123456789012345
2069fmax31461 fma  1   1.123456789012345  0E-1   -> 1.123456789012345
2070fmax31462 fma  1   1.123456789012345  0E-2   -> 1.123456789012345
2071fmax31463 fma  1   1.123456789012345  0E-3   -> 1.123456789012345
2072fmax31464 fma  1   1.123456789012345  0E-4   -> 1.123456789012345
2073fmax31465 fma  1   1.123456789012345  0E-5   -> 1.123456789012345
2074fmax31466 fma  1   1.123456789012345  0E-6   -> 1.123456789012345
2075fmax31467 fma  1   1.123456789012345  0E-7   -> 1.123456789012345
2076fmax31468 fma  1   1.123456789012345  0E-8   -> 1.123456789012345
2077fmax31469 fma  1   1.123456789012345  0E-9   -> 1.123456789012345
2078fmax31470 fma  1   1.123456789012345  0E-10  -> 1.123456789012345
2079fmax31471 fma  1   1.123456789012345  0E-11  -> 1.123456789012345
2080fmax31472 fma  1   1.123456789012345  0E-12  -> 1.123456789012345
2081fmax31473 fma  1   1.123456789012345  0E-13  -> 1.123456789012345
2082fmax31474 fma  1   1.123456789012345  0E-14  -> 1.123456789012345
2083fmax31475 fma  1   1.123456789012345  0E-15  -> 1.123456789012345
2084-- next four flag Rounded because the 0 extends the result
2085fmax31476 fma  1   1.123456789012345  0E-16  -> 1.123456789012345 Rounded
2086fmax31477 fma  1   1.123456789012345  0E-17  -> 1.123456789012345 Rounded
2087fmax31478 fma  1   1.123456789012345  0E-18  -> 1.123456789012345 Rounded
2088fmax31479 fma  1   1.123456789012345  0E-19  -> 1.123456789012345 Rounded
2089
2090-- sum of two opposite-sign operands is exactly 0 and floor => -0
2091precision:   16
2092maxExponent: 384
2093minexponent: -383
2094
2095rounding:    half_up
2096-- exact zeros from zeros
2097fmax31500 fma  1    0        0E-19  ->  0E-19
2098fmax31501 fma  1   -0        0E-19  ->  0E-19
2099fmax31502 fma  1    0       -0E-19  ->  0E-19
2100fmax31503 fma  1   -0       -0E-19  -> -0E-19
2101fmax31504 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2102fmax31505 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
2103fmax31506 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
2104fmax31507 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2105-- inexact zeros
2106fmax31511 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2107fmax31512 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2108fmax31513 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2109fmax31514 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2110-- some exact zeros from non-zeros
2111fmax31515 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2112fmax31516 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
2113fmax31517 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
2114fmax31518 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2115
2116rounding:    half_down
2117-- exact zeros from zeros
2118fmax31520 fma  1    0        0E-19  ->  0E-19
2119fmax31521 fma  1   -0        0E-19  ->  0E-19
2120fmax31522 fma  1    0       -0E-19  ->  0E-19
2121fmax31523 fma  1   -0       -0E-19  -> -0E-19
2122fmax31524 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2123fmax31525 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
2124fmax31526 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
2125fmax31527 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2126-- inexact zeros
2127fmax31531 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2128fmax31532 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2129fmax31533 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2130fmax31534 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2131-- some exact zeros from non-zeros
2132fmax31535 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2133fmax31536 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
2134fmax31537 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
2135fmax31538 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2136
2137rounding:    half_even
2138-- exact zeros from zeros
2139fmax31540 fma  1    0        0E-19  ->  0E-19
2140fmax31541 fma  1   -0        0E-19  ->  0E-19
2141fmax31542 fma  1    0       -0E-19  ->  0E-19
2142fmax31543 fma  1   -0       -0E-19  -> -0E-19
2143fmax31544 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2144fmax31545 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
2145fmax31546 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
2146fmax31547 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2147-- inexact zeros
2148fmax31551 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2149fmax31552 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2150fmax31553 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2151fmax31554 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2152-- some exact zeros from non-zeros
2153fmax31555 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2154fmax31556 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
2155fmax31557 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
2156fmax31558 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2157
2158rounding:    up
2159-- exact zeros from zeros
2160fmax31560 fma  1    0        0E-19  ->  0E-19
2161fmax31561 fma  1   -0        0E-19  ->  0E-19
2162fmax31562 fma  1    0       -0E-19  ->  0E-19
2163fmax31563 fma  1   -0       -0E-19  -> -0E-19
2164fmax31564 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2165fmax31565 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
2166fmax31566 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
2167fmax31567 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2168-- inexact zeros
2169fmax31571 fma  1    1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
2170fmax31572 fma  1   -1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
2171fmax31573 fma  1    1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
2172fmax31574 fma  1   -1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
2173-- some exact zeros from non-zeros
2174fmax31575 fma  1    1E-401   1E-401 ->  1E-398 Subnormal Inexact Rounded Underflow
2175fmax31576 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
2176fmax31577 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
2177fmax31578 fma  1   -1E-401  -1E-401 -> -1E-398 Subnormal Inexact Rounded Underflow
2178
2179rounding:    down
2180-- exact zeros from zeros
2181fmax31580 fma  1    0        0E-19  ->  0E-19
2182fmax31581 fma  1   -0        0E-19  ->  0E-19
2183fmax31582 fma  1    0       -0E-19  ->  0E-19
2184fmax31583 fma  1   -0       -0E-19  -> -0E-19
2185fmax31584 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2186fmax31585 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
2187fmax31586 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
2188fmax31587 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2189-- inexact zeros
2190fmax31591 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2191fmax31592 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2192fmax31593 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2193fmax31594 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2194-- some exact zeros from non-zeros
2195fmax31595 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2196fmax31596 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
2197fmax31597 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
2198fmax31598 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2199
2200rounding:    ceiling
2201-- exact zeros from zeros
2202fmax31600 fma  1    0        0E-19  ->  0E-19
2203fmax31601 fma  1   -0        0E-19  ->  0E-19
2204fmax31602 fma  1    0       -0E-19  ->  0E-19
2205fmax31603 fma  1   -0       -0E-19  -> -0E-19
2206fmax31604 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2207fmax31605 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
2208fmax31606 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
2209fmax31607 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2210-- inexact zeros
2211fmax31611 fma  1    1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
2212fmax31612 fma  1   -1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
2213fmax31613 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2214fmax31614 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2215-- some exact zeros from non-zeros
2216fmax31615 fma  1    1E-401   1E-401 ->  1E-398 Subnormal Inexact Rounded Underflow
2217fmax31616 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
2218fmax31617 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
2219fmax31618 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
2220
2221-- and the extra-special ugly case; unusual minuses marked by -- *
2222rounding:    floor
2223-- exact zeros from zeros
2224fmax31620 fma  1    0        0E-19  ->  0E-19
2225fmax31621 fma  1   -0        0E-19  -> -0E-19           -- *
2226fmax31622 fma  1    0       -0E-19  -> -0E-19           -- *
2227fmax31623 fma  1   -0       -0E-19  -> -0E-19
2228fmax31624 fma  1    0E-400   0E-19  ->  0E-398 Clamped
2229fmax31625 fma  1   -0E-400   0E-19  -> -0E-398 Clamped  -- *
2230fmax31626 fma  1    0E-400  -0E-19  -> -0E-398 Clamped  -- *
2231fmax31627 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
2232-- inexact zeros
2233fmax31631 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2234fmax31632 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2235fmax31633 fma  1    1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
2236fmax31634 fma  1   -1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
2237-- some exact zeros from non-zeros
2238fmax31635 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
2239fmax31636 fma  1   -1E-401   1E-401 -> -0E-398 Clamped  -- *
2240fmax31637 fma  1    1E-401  -1E-401 -> -0E-398 Clamped  -- *
2241fmax31638 fma  1   -1E-401  -1E-401 -> -1E-398 Subnormal Inexact Rounded Underflow
2242
2243-- BigDecimal problem testcases 2006.01.23
2244precision:   16
2245maxExponent: 384
2246minexponent: -383
2247
2248rounding:  down
2249precision: 7
2250fmax31651 fma  1    10001E+2  -2E+1 -> 1.00008E+6
2251precision: 6
2252fmax31652 fma  1    10001E+2  -2E+1 -> 1.00008E+6
2253precision: 5
2254fmax31653 fma  1    10001E+2  -2E+1 -> 1.0000E+6   Inexact Rounded
2255precision: 4
2256fmax31654 fma  1    10001E+2  -2E+1 -> 1.000E+6    Inexact Rounded
2257precision: 3
2258fmax31655 fma  1    10001E+2  -2E+1 -> 1.00E+6     Inexact Rounded
2259precision: 2
2260fmax31656 fma  1    10001E+2  -2E+1 -> 1.0E+6      Inexact Rounded
2261precision: 1
2262fmax31657 fma  1    10001E+2  -2E+1 -> 1E+6        Inexact Rounded
2263
2264rounding:  half_even
2265precision: 7
2266fmax31661 fma  1    10001E+2  -2E+1 -> 1.00008E+6
2267precision: 6
2268fmax31662 fma  1    10001E+2  -2E+1 -> 1.00008E+6
2269precision: 5
2270fmax31663 fma  1    10001E+2  -2E+1 -> 1.0001E+6   Inexact Rounded
2271precision: 4
2272fmax31664 fma  1    10001E+2  -2E+1 -> 1.000E+6    Inexact Rounded
2273precision: 3
2274fmax31665 fma  1    10001E+2  -2E+1 -> 1.00E+6     Inexact Rounded
2275precision: 2
2276fmax31666 fma  1    10001E+2  -2E+1 -> 1.0E+6      Inexact Rounded
2277precision: 1
2278fmax31667 fma  1    10001E+2  -2E+1 -> 1E+6        Inexact Rounded
2279
2280rounding:  up
2281precision: 7
2282fmax31671 fma  1    10001E+2  -2E+1 -> 1.00008E+6
2283precision: 6
2284fmax31672 fma  1    10001E+2  -2E+1 -> 1.00008E+6
2285precision: 5
2286fmax31673 fma  1    10001E+2  -2E+1 -> 1.0001E+6   Inexact Rounded
2287precision: 4
2288fmax31674 fma  1    10001E+2  -2E+1 -> 1.001E+6    Inexact Rounded
2289precision: 3
2290fmax31675 fma  1    10001E+2  -2E+1 -> 1.01E+6     Inexact Rounded
2291precision: 2
2292fmax31676 fma  1    10001E+2  -2E+1 -> 1.1E+6      Inexact Rounded
2293precision: 1
2294fmax31677 fma  1    10001E+2  -2E+1 -> 2E+6        Inexact Rounded
2295
2296precision:   34
2297rounding:    half_up
2298maxExponent: 6144
2299minExponent: -6143
2300-- Examples from SQL proposal (Krishna Kulkarni)
2301fmax31701  fma  1   130E-2    120E-2    -> 2.50
2302fmax31702  fma  1   130E-2    12E-1     -> 2.50
2303fmax31703  fma  1   130E-2    1E0       -> 2.30
2304fmax31704  fma  1   1E2       1E4       -> 1.01E+4
2305fmax31705  subtract 130E-2  120E-2 -> 0.10
2306fmax31706  subtract 130E-2  12E-1  -> 0.10
2307fmax31707  subtract 130E-2  1E0    -> 0.30
2308fmax31708  subtract 1E2     1E4    -> -9.9E+3
2309
2310------------------------------------------------------------------------
2311-- Same as above, using decimal64 default parameters                  --
2312------------------------------------------------------------------------
2313precision:   16
2314rounding:    half_even
2315maxExponent: 384
2316minexponent: -383
2317
2318-- [first group are 'quick confidence check']
2319fmax36001 fma  1   1       1       ->  2
2320fmax36002 fma  1   2       3       ->  5
2321fmax36003 fma  1   '5.75'  '3.3'   ->  9.05
2322fmax36004 fma  1   '5'     '-3'    ->  2
2323fmax36005 fma  1   '-5'    '-3'    ->  -8
2324fmax36006 fma  1   '-7'    '2.5'   ->  -4.5
2325fmax36007 fma  1   '0.7'   '0.3'   ->  1.0
2326fmax36008 fma  1   '1.25'  '1.25'  ->  2.50
2327fmax36009 fma  1   '1.23456789'  '1.00000000' -> '2.23456789'
2328fmax36010 fma  1   '1.23456789'  '1.00000011' -> '2.23456800'
2329
2330fmax36011 fma  1   '0.44444444444444444'  '0.55555555555555555' -> '1.000000000000000' Inexact Rounded
2331fmax36012 fma  1   '0.44444444444444440'  '0.55555555555555555' -> '1.000000000000000' Inexact Rounded
2332fmax36013 fma  1   '0.44444444444444444'  '0.55555555555555550' -> '0.9999999999999999' Inexact Rounded
2333fmax36014 fma  1   '0.444444444444444449'    '0' -> '0.4444444444444444' Inexact Rounded
2334fmax36015 fma  1   '0.4444444444444444499'   '0' -> '0.4444444444444444' Inexact Rounded
2335fmax36016 fma  1   '0.44444444444444444999'  '0' -> '0.4444444444444444' Inexact Rounded
2336fmax36017 fma  1   '0.44444444444444445000'  '0' -> '0.4444444444444444' Inexact Rounded
2337fmax36018 fma  1   '0.44444444444444445001'  '0' -> '0.4444444444444445' Inexact Rounded
2338fmax36019 fma  1   '0.4444444444444444501'   '0' -> '0.4444444444444445' Inexact Rounded
2339fmax36020 fma  1   '0.444444444444444451'    '0' -> '0.4444444444444445' Inexact Rounded
2340
2341fmax36021 fma  1   0 1 -> 1
2342fmax36022 fma  1   1 1 -> 2
2343fmax36023 fma  1   2 1 -> 3
2344fmax36024 fma  1   3 1 -> 4
2345fmax36025 fma  1   4 1 -> 5
2346fmax36026 fma  1   5 1 -> 6
2347fmax36027 fma  1   6 1 -> 7
2348fmax36028 fma  1   7 1 -> 8
2349fmax36029 fma  1   8 1 -> 9
2350fmax36030 fma  1   9 1 -> 10
2351
2352-- some carrying effects
2353fmax36031 fma  1   '0.9998'  '0.0000' -> '0.9998'
2354fmax36032 fma  1   '0.9998'  '0.0001' -> '0.9999'
2355fmax36033 fma  1   '0.9998'  '0.0002' -> '1.0000'
2356fmax36034 fma  1   '0.9998'  '0.0003' -> '1.0001'
2357
2358fmax36035 fma  1   '70'      '10000e+16' -> '1.000000000000000E+20' Inexact Rounded
2359fmax36036 fma  1   '700'     '10000e+16' -> '1.000000000000000E+20' Inexact Rounded
2360fmax36037 fma  1   '7000'    '10000e+16' -> '1.000000000000000E+20' Inexact Rounded
2361fmax36038 fma  1   '70000'   '10000e+16' -> '1.000000000000001E+20' Inexact Rounded
2362fmax36039 fma  1   '700000'  '10000e+16' -> '1.000000000000007E+20' Rounded
2363
2364-- symmetry:
2365fmax36040 fma  1   '10000e+16'  '70' -> '1.000000000000000E+20' Inexact Rounded
2366fmax36041 fma  1   '10000e+16'  '700' -> '1.000000000000000E+20' Inexact Rounded
2367fmax36042 fma  1   '10000e+16'  '7000' -> '1.000000000000000E+20' Inexact Rounded
2368fmax36044 fma  1   '10000e+16'  '70000' -> '1.000000000000001E+20' Inexact Rounded
2369fmax36045 fma  1   '10000e+16'  '700000' -> '1.000000000000007E+20' Rounded
2370
2371fmax36046 fma  1   '10000e+9'  '7' -> '10000000000007'
2372fmax36047 fma  1   '10000e+9'  '70' -> '10000000000070'
2373fmax36048 fma  1   '10000e+9'  '700' -> '10000000000700'
2374fmax36049 fma  1   '10000e+9'  '7000' -> '10000000007000'
2375fmax36050 fma  1   '10000e+9'  '70000' -> '10000000070000'
2376fmax36051 fma  1   '10000e+9'  '700000' -> '10000000700000'
2377
2378-- examples from decarith
2379fmax36053 fma  1   '12' '7.00' -> '19.00'
2380fmax36054 fma  1   '1.3' '-1.07' -> '0.23'
2381fmax36055 fma  1   '1.3' '-1.30' -> '0.00'
2382fmax36056 fma  1   '1.3' '-2.07' -> '-0.77'
2383fmax36057 fma  1   '1E+2' '1E+4' -> '1.01E+4'
2384
2385-- from above
2386fmax36061 fma  1   1 '0.1' -> '1.1'
2387fmax36062 fma  1   1 '0.01' -> '1.01'
2388fmax36063 fma  1   1 '0.001' -> '1.001'
2389fmax36064 fma  1   1 '0.0001' -> '1.0001'
2390fmax36065 fma  1   1 '0.00001' -> '1.00001'
2391fmax36066 fma  1   1 '0.000001' -> '1.000001'
2392fmax36067 fma  1   1 '0.0000001' -> '1.0000001'
2393fmax36068 fma  1   1 '0.00000001' -> '1.00000001'
2394
2395-- some funny zeros [in case of bad signum]
2396fmax36070 fma  1   1  0    -> 1
2397fmax36071 fma  1   1 0.    -> 1
2398fmax36072 fma  1   1  .0   -> 1.0
2399fmax36073 fma  1   1 0.0   -> 1.0
2400fmax36074 fma  1   1 0.00  -> 1.00
2401fmax36075 fma  1    0  1   -> 1
2402fmax36076 fma  1   0.  1   -> 1
2403fmax36077 fma  1    .0 1   -> 1.0
2404fmax36078 fma  1   0.0 1   -> 1.0
2405fmax36079 fma  1   0.00 1  -> 1.00
2406
2407-- some carries
2408fmax36080 fma  1   9999999999999998 1  -> 9999999999999999
2409fmax36081 fma  1   9999999999999999 1  -> 1.000000000000000E+16 Rounded
2410fmax36082 fma  1    999999999999999 1  -> 1000000000000000
2411fmax36083 fma  1      9999999999999 1  -> 10000000000000
2412fmax36084 fma  1        99999999999 1  -> 100000000000
2413fmax36085 fma  1          999999999 1  -> 1000000000
2414fmax36086 fma  1            9999999 1  -> 10000000
2415fmax36087 fma  1              99999 1  -> 100000
2416fmax36088 fma  1                999 1  -> 1000
2417fmax36089 fma  1                  9 1  -> 10
2418
2419
2420-- more LHS swaps
2421fmax36090 fma  1   '-56267E-10'   0 ->  '-0.0000056267'
2422fmax36091 fma  1   '-56267E-6'    0 ->  '-0.056267'
2423fmax36092 fma  1   '-56267E-5'    0 ->  '-0.56267'
2424fmax36093 fma  1   '-56267E-4'    0 ->  '-5.6267'
2425fmax36094 fma  1   '-56267E-3'    0 ->  '-56.267'
2426fmax36095 fma  1   '-56267E-2'    0 ->  '-562.67'
2427fmax36096 fma  1   '-56267E-1'    0 ->  '-5626.7'
2428fmax36097 fma  1   '-56267E-0'    0 ->  '-56267'
2429fmax36098 fma  1   '-5E-10'       0 ->  '-5E-10'
2430fmax36099 fma  1   '-5E-7'        0 ->  '-5E-7'
2431fmax36100 fma  1   '-5E-6'        0 ->  '-0.000005'
2432fmax36101 fma  1   '-5E-5'        0 ->  '-0.00005'
2433fmax36102 fma  1   '-5E-4'        0 ->  '-0.0005'
2434fmax36103 fma  1   '-5E-1'        0 ->  '-0.5'
2435fmax36104 fma  1   '-5E0'         0 ->  '-5'
2436fmax36105 fma  1   '-5E1'         0 ->  '-50'
2437fmax36106 fma  1   '-5E5'         0 ->  '-500000'
2438fmax36107 fma  1   '-5E15'        0 ->  '-5000000000000000'
2439fmax36108 fma  1   '-5E16'        0 ->  '-5.000000000000000E+16'   Rounded
2440fmax36109 fma  1   '-5E17'        0 ->  '-5.000000000000000E+17'  Rounded
2441fmax36110 fma  1   '-5E18'        0 ->  '-5.000000000000000E+18'  Rounded
2442fmax36111 fma  1   '-5E100'       0 ->  '-5.000000000000000E+100' Rounded
2443
2444-- more RHS swaps
2445fmax36113 fma  1   0  '-56267E-10' ->  '-0.0000056267'
2446fmax36114 fma  1   0  '-56267E-6'  ->  '-0.056267'
2447fmax36116 fma  1   0  '-56267E-5'  ->  '-0.56267'
2448fmax36117 fma  1   0  '-56267E-4'  ->  '-5.6267'
2449fmax36119 fma  1   0  '-56267E-3'  ->  '-56.267'
2450fmax36120 fma  1   0  '-56267E-2'  ->  '-562.67'
2451fmax36121 fma  1   0  '-56267E-1'  ->  '-5626.7'
2452fmax36122 fma  1   0  '-56267E-0'  ->  '-56267'
2453fmax36123 fma  1   0  '-5E-10'     ->  '-5E-10'
2454fmax36124 fma  1   0  '-5E-7'      ->  '-5E-7'
2455fmax36125 fma  1   0  '-5E-6'      ->  '-0.000005'
2456fmax36126 fma  1   0  '-5E-5'      ->  '-0.00005'
2457fmax36127 fma  1   0  '-5E-4'      ->  '-0.0005'
2458fmax36128 fma  1   0  '-5E-1'      ->  '-0.5'
2459fmax36129 fma  1   0  '-5E0'       ->  '-5'
2460fmax36130 fma  1   0  '-5E1'       ->  '-50'
2461fmax36131 fma  1   0  '-5E5'       ->  '-500000'
2462fmax36132 fma  1   0  '-5E15'      ->  '-5000000000000000'
2463fmax36133 fma  1   0  '-5E16'      ->  '-5.000000000000000E+16'   Rounded
2464fmax36134 fma  1   0  '-5E17'      ->  '-5.000000000000000E+17'   Rounded
2465fmax36135 fma  1   0  '-5E18'      ->  '-5.000000000000000E+18'   Rounded
2466fmax36136 fma  1   0  '-5E100'     ->  '-5.000000000000000E+100'  Rounded
2467
2468-- related
2469fmax36137 fma  1    1  '0E-19'      ->  '1.000000000000000'  Rounded
2470fmax36138 fma  1   -1  '0E-19'      ->  '-1.000000000000000' Rounded
2471fmax36139 fma  1   '0E-19' 1        ->  '1.000000000000000'  Rounded
2472fmax36140 fma  1   '0E-19' -1       ->  '-1.000000000000000' Rounded
2473fmax36141 fma  1   1E+11   0.0000   ->  '100000000000.0000'
2474fmax36142 fma  1   1E+11   0.00000  ->  '100000000000.0000'  Rounded
2475fmax36143 fma  1   0.000   1E+12    ->  '1000000000000.000'
2476fmax36144 fma  1   0.0000  1E+12    ->  '1000000000000.000'  Rounded
2477
2478-- [some of the next group are really constructor tests]
2479fmax36146 fma  1   '00.0'  0       ->  '0.0'
2480fmax36147 fma  1   '0.00'  0       ->  '0.00'
2481fmax36148 fma  1    0      '0.00'  ->  '0.00'
2482fmax36149 fma  1    0      '00.0'  ->  '0.0'
2483fmax36150 fma  1   '00.0'  '0.00'  ->  '0.00'
2484fmax36151 fma  1   '0.00'  '00.0'  ->  '0.00'
2485fmax36152 fma  1   '3'     '.3'    ->  '3.3'
2486fmax36153 fma  1   '3.'    '.3'    ->  '3.3'
2487fmax36154 fma  1   '3.0'   '.3'    ->  '3.3'
2488fmax36155 fma  1   '3.00'  '.3'    ->  '3.30'
2489fmax36156 fma  1   '3'     '3'     ->  '6'
2490fmax36157 fma  1   '3'     '+3'    ->  '6'
2491fmax36158 fma  1   '3'     '-3'    ->  '0'
2492fmax36159 fma  1   '0.3'   '-0.3'  ->  '0.0'
2493fmax36160 fma  1   '0.03'  '-0.03' ->  '0.00'
2494
2495-- try borderline precision, with carries, etc.
2496fmax36161 fma  1   '1E+13' '-1'    -> '9999999999999'
2497fmax36162 fma  1   '1E+13'  '1.11' -> '10000000000001.11'
2498fmax36163 fma  1   '1.11'  '1E+13' -> '10000000000001.11'
2499fmax36164 fma  1   '-1'    '1E+13' -> '9999999999999'
2500fmax36165 fma  1   '7E+13' '-1'    -> '69999999999999'
2501fmax36166 fma  1   '7E+13'  '1.11' -> '70000000000001.11'
2502fmax36167 fma  1   '1.11'  '7E+13' -> '70000000000001.11'
2503fmax36168 fma  1   '-1'    '7E+13' -> '69999999999999'
2504
2505--                    1234567890123456      1234567890123456      1 234567890123456
2506fmax36170 fma  1   '0.4444444444444444'  '0.5555555555555563' -> '1.000000000000001' Inexact Rounded
2507fmax36171 fma  1   '0.4444444444444444'  '0.5555555555555562' -> '1.000000000000001' Inexact Rounded
2508fmax36172 fma  1   '0.4444444444444444'  '0.5555555555555561' -> '1.000000000000000' Inexact Rounded
2509fmax36173 fma  1   '0.4444444444444444'  '0.5555555555555560' -> '1.000000000000000' Inexact Rounded
2510fmax36174 fma  1   '0.4444444444444444'  '0.5555555555555559' -> '1.000000000000000' Inexact Rounded
2511fmax36175 fma  1   '0.4444444444444444'  '0.5555555555555558' -> '1.000000000000000' Inexact Rounded
2512fmax36176 fma  1   '0.4444444444444444'  '0.5555555555555557' -> '1.000000000000000' Inexact Rounded
2513fmax36177 fma  1   '0.4444444444444444'  '0.5555555555555556' -> '1.000000000000000' Rounded
2514fmax36178 fma  1   '0.4444444444444444'  '0.5555555555555555' -> '0.9999999999999999'
2515fmax36179 fma  1   '0.4444444444444444'  '0.5555555555555554' -> '0.9999999999999998'
2516fmax36180 fma  1   '0.4444444444444444'  '0.5555555555555553' -> '0.9999999999999997'
2517fmax36181 fma  1   '0.4444444444444444'  '0.5555555555555552' -> '0.9999999999999996'
2518fmax36182 fma  1   '0.4444444444444444'  '0.5555555555555551' -> '0.9999999999999995'
2519fmax36183 fma  1   '0.4444444444444444'  '0.5555555555555550' -> '0.9999999999999994'
2520
2521-- and some more, including residue effects and different roundings
2522rounding: half_up
2523fmax36200 fma  1   '6543210123456789' 0             -> '6543210123456789'
2524fmax36201 fma  1   '6543210123456789' 0.000000001   -> '6543210123456789' Inexact Rounded
2525fmax36202 fma  1   '6543210123456789' 0.000001      -> '6543210123456789' Inexact Rounded
2526fmax36203 fma  1   '6543210123456789' 0.1           -> '6543210123456789' Inexact Rounded
2527fmax36204 fma  1   '6543210123456789' 0.4           -> '6543210123456789' Inexact Rounded
2528fmax36205 fma  1   '6543210123456789' 0.49          -> '6543210123456789' Inexact Rounded
2529fmax36206 fma  1   '6543210123456789' 0.499999      -> '6543210123456789' Inexact Rounded
2530fmax36207 fma  1   '6543210123456789' 0.499999   -> '6543210123456789' Inexact Rounded
2531fmax36208 fma  1   '6543210123456789' 0.5           -> '6543210123456790' Inexact Rounded
2532fmax36209 fma  1   '6543210123456789' 0.500000001   -> '6543210123456790' Inexact Rounded
2533fmax36210 fma  1   '6543210123456789' 0.500001      -> '6543210123456790' Inexact Rounded
2534fmax36211 fma  1   '6543210123456789' 0.51          -> '6543210123456790' Inexact Rounded
2535fmax36212 fma  1   '6543210123456789' 0.6           -> '6543210123456790' Inexact Rounded
2536fmax36213 fma  1   '6543210123456789' 0.9           -> '6543210123456790' Inexact Rounded
2537fmax36214 fma  1   '6543210123456789' 0.99999       -> '6543210123456790' Inexact Rounded
2538fmax36215 fma  1   '6543210123456789' 0.999999   -> '6543210123456790' Inexact Rounded
2539fmax36216 fma  1   '6543210123456789' 1             -> '6543210123456790'
2540fmax36217 fma  1   '6543210123456789' 1.000000001   -> '6543210123456790' Inexact Rounded
2541fmax36218 fma  1   '6543210123456789' 1.00001       -> '6543210123456790' Inexact Rounded
2542fmax36219 fma  1   '6543210123456789' 1.1           -> '6543210123456790' Inexact Rounded
2543
2544rounding: half_even
2545fmax36220 fma  1   '6543210123456789' 0             -> '6543210123456789'
2546fmax36221 fma  1   '6543210123456789' 0.000000001   -> '6543210123456789' Inexact Rounded
2547fmax36222 fma  1   '6543210123456789' 0.000001      -> '6543210123456789' Inexact Rounded
2548fmax36223 fma  1   '6543210123456789' 0.1           -> '6543210123456789' Inexact Rounded
2549fmax36224 fma  1   '6543210123456789' 0.4           -> '6543210123456789' Inexact Rounded
2550fmax36225 fma  1   '6543210123456789' 0.49          -> '6543210123456789' Inexact Rounded
2551fmax36226 fma  1   '6543210123456789' 0.499999      -> '6543210123456789' Inexact Rounded
2552fmax36227 fma  1   '6543210123456789' 0.499999   -> '6543210123456789' Inexact Rounded
2553fmax36228 fma  1   '6543210123456789' 0.5           -> '6543210123456790' Inexact Rounded
2554fmax36229 fma  1   '6543210123456789' 0.500000001   -> '6543210123456790' Inexact Rounded
2555fmax36230 fma  1   '6543210123456789' 0.500001      -> '6543210123456790' Inexact Rounded
2556fmax36231 fma  1   '6543210123456789' 0.51          -> '6543210123456790' Inexact Rounded
2557fmax36232 fma  1   '6543210123456789' 0.6           -> '6543210123456790' Inexact Rounded
2558fmax36233 fma  1   '6543210123456789' 0.9           -> '6543210123456790' Inexact Rounded
2559fmax36234 fma  1   '6543210123456789' 0.99999       -> '6543210123456790' Inexact Rounded
2560fmax36235 fma  1   '6543210123456789' 0.999999   -> '6543210123456790' Inexact Rounded
2561fmax36236 fma  1   '6543210123456789' 1             -> '6543210123456790'
2562fmax36237 fma  1   '6543210123456789' 1.00000001    -> '6543210123456790' Inexact Rounded
2563fmax36238 fma  1   '6543210123456789' 1.00001       -> '6543210123456790' Inexact Rounded
2564fmax36239 fma  1   '6543210123456789' 1.1           -> '6543210123456790' Inexact Rounded
2565-- critical few with even bottom digit...
2566fmax36240 fma  1   '6543210123456788' 0.499999   -> '6543210123456788' Inexact Rounded
2567fmax36241 fma  1   '6543210123456788' 0.5           -> '6543210123456788' Inexact Rounded
2568fmax36242 fma  1   '6543210123456788' 0.500000001   -> '6543210123456789' Inexact Rounded
2569
2570rounding: down
2571fmax36250 fma  1   '6543210123456789' 0             -> '6543210123456789'
2572fmax36251 fma  1   '6543210123456789' 0.000000001   -> '6543210123456789' Inexact Rounded
2573fmax36252 fma  1   '6543210123456789' 0.000001      -> '6543210123456789' Inexact Rounded
2574fmax36253 fma  1   '6543210123456789' 0.1           -> '6543210123456789' Inexact Rounded
2575fmax36254 fma  1   '6543210123456789' 0.4           -> '6543210123456789' Inexact Rounded
2576fmax36255 fma  1   '6543210123456789' 0.49          -> '6543210123456789' Inexact Rounded
2577fmax36256 fma  1   '6543210123456789' 0.499999      -> '6543210123456789' Inexact Rounded
2578fmax36257 fma  1   '6543210123456789' 0.499999   -> '6543210123456789' Inexact Rounded
2579fmax36258 fma  1   '6543210123456789' 0.5           -> '6543210123456789' Inexact Rounded
2580fmax36259 fma  1   '6543210123456789' 0.500000001   -> '6543210123456789' Inexact Rounded
2581fmax36260 fma  1   '6543210123456789' 0.500001      -> '6543210123456789' Inexact Rounded
2582fmax36261 fma  1   '6543210123456789' 0.51          -> '6543210123456789' Inexact Rounded
2583fmax36262 fma  1   '6543210123456789' 0.6           -> '6543210123456789' Inexact Rounded
2584fmax36263 fma  1   '6543210123456789' 0.9           -> '6543210123456789' Inexact Rounded
2585fmax36264 fma  1   '6543210123456789' 0.99999       -> '6543210123456789' Inexact Rounded
2586fmax36265 fma  1   '6543210123456789' 0.999999   -> '6543210123456789' Inexact Rounded
2587fmax36266 fma  1   '6543210123456789' 1             -> '6543210123456790'
2588fmax36267 fma  1   '6543210123456789' 1.00000001    -> '6543210123456790' Inexact Rounded
2589fmax36268 fma  1   '6543210123456789' 1.00001       -> '6543210123456790' Inexact Rounded
2590fmax36269 fma  1   '6543210123456789' 1.1           -> '6543210123456790' Inexact Rounded
2591
2592-- 1 in last place tests
2593rounding: half_even
2594fmax36301 fma  1    -1   1      ->   0
2595fmax36302 fma  1     0   1      ->   1
2596fmax36303 fma  1     1   1      ->   2
2597fmax36304 fma  1    12   1      ->  13
2598fmax36305 fma  1    98   1      ->  99
2599fmax36306 fma  1    99   1      -> 100
2600fmax36307 fma  1   100   1      -> 101
2601fmax36308 fma  1   101   1      -> 102
2602fmax36309 fma  1    -1  -1      ->  -2
2603fmax36310 fma  1     0  -1      ->  -1
2604fmax36311 fma  1     1  -1      ->   0
2605fmax36312 fma  1    12  -1      ->  11
2606fmax36313 fma  1    98  -1      ->  97
2607fmax36314 fma  1    99  -1      ->  98
2608fmax36315 fma  1   100  -1      ->  99
2609fmax36316 fma  1   101  -1      -> 100
2610
2611fmax36321 fma  1   -0.01  0.01    ->  0.00
2612fmax36322 fma  1    0.00  0.01    ->  0.01
2613fmax36323 fma  1    0.01  0.01    ->  0.02
2614fmax36324 fma  1    0.12  0.01    ->  0.13
2615fmax36325 fma  1    0.98  0.01    ->  0.99
2616fmax36326 fma  1    0.99  0.01    ->  1.00
2617fmax36327 fma  1    1.00  0.01    ->  1.01
2618fmax36328 fma  1    1.01  0.01    ->  1.02
2619fmax36329 fma  1   -0.01 -0.01    -> -0.02
2620fmax36330 fma  1    0.00 -0.01    -> -0.01
2621fmax36331 fma  1    0.01 -0.01    ->  0.00
2622fmax36332 fma  1    0.12 -0.01    ->  0.11
2623fmax36333 fma  1    0.98 -0.01    ->  0.97
2624fmax36334 fma  1    0.99 -0.01    ->  0.98
2625fmax36335 fma  1    1.00 -0.01    ->  0.99
2626fmax36336 fma  1    1.01 -0.01    ->  1.00
2627
2628-- some more cases where fma  1  ing 0 affects the coefficient
2629fmax36340 fma  1   1E+3    0    ->         1000
2630fmax36341 fma  1   1E+15   0    ->    1000000000000000
2631fmax36342 fma  1   1E+16   0    ->   1.000000000000000E+16  Rounded
2632fmax36343 fma  1   1E+17   0    ->   1.000000000000000E+17  Rounded
2633-- which simply follow from these cases ...
2634fmax36344 fma  1   1E+3    1    ->         1001
2635fmax36345 fma  1   1E+15   1    ->    1000000000000001
2636fmax36346 fma  1   1E+16   1    ->   1.000000000000000E+16  Inexact Rounded
2637fmax36347 fma  1   1E+17   1    ->   1.000000000000000E+17  Inexact Rounded
2638fmax36348 fma  1   1E+3    7    ->         1007
2639fmax36349 fma  1   1E+15   7    ->    1000000000000007
2640fmax36350 fma  1   1E+16   7    ->   1.000000000000001E+16  Inexact Rounded
2641fmax36351 fma  1   1E+17   7    ->   1.000000000000000E+17  Inexact Rounded
2642
2643-- tryzeros cases
2644fmax36361  fma  1   0E+50 10000E+1  -> 1.0000E+5
2645fmax36362  fma  1   10000E+1 0E-50  -> 100000.0000000000  Rounded
2646fmax36363  fma  1   10000E+1 10000E-50  -> 100000.0000000000  Rounded Inexact
2647fmax36364  fma  1   12.34    0e-398  -> 12.34000000000000  Rounded
2648
2649-- ulp replacement tests
2650fmax36400 fma  1     1   77e-14      ->  1.00000000000077
2651fmax36401 fma  1     1   77e-15      ->  1.000000000000077
2652fmax36402 fma  1     1   77e-16      ->  1.000000000000008 Inexact Rounded
2653fmax36403 fma  1     1   77e-17      ->  1.000000000000001 Inexact Rounded
2654fmax36404 fma  1     1   77e-18      ->  1.000000000000000 Inexact Rounded
2655fmax36405 fma  1     1   77e-19      ->  1.000000000000000 Inexact Rounded
2656fmax36406 fma  1     1   77e-99      ->  1.000000000000000 Inexact Rounded
2657
2658fmax36410 fma  1    10   77e-14      ->  10.00000000000077
2659fmax36411 fma  1    10   77e-15      ->  10.00000000000008 Inexact Rounded
2660fmax36412 fma  1    10   77e-16      ->  10.00000000000001 Inexact Rounded
2661fmax36413 fma  1    10   77e-17      ->  10.00000000000000 Inexact Rounded
2662fmax36414 fma  1    10   77e-18      ->  10.00000000000000 Inexact Rounded
2663fmax36415 fma  1    10   77e-19      ->  10.00000000000000 Inexact Rounded
2664fmax36416 fma  1    10   77e-99      ->  10.00000000000000 Inexact Rounded
2665
2666fmax36420 fma  1    77e-14       1   ->  1.00000000000077
2667fmax36421 fma  1    77e-15       1   ->  1.000000000000077
2668fmax36422 fma  1    77e-16       1   ->  1.000000000000008 Inexact Rounded
2669fmax36423 fma  1    77e-17       1   ->  1.000000000000001 Inexact Rounded
2670fmax36424 fma  1    77e-18       1   ->  1.000000000000000 Inexact Rounded
2671fmax36425 fma  1    77e-19       1   ->  1.000000000000000 Inexact Rounded
2672fmax36426 fma  1    77e-99       1   ->  1.000000000000000 Inexact Rounded
2673
2674fmax36430 fma  1    77e-14      10   ->  10.00000000000077
2675fmax36431 fma  1    77e-15      10   ->  10.00000000000008 Inexact Rounded
2676fmax36432 fma  1    77e-16      10   ->  10.00000000000001 Inexact Rounded
2677fmax36433 fma  1    77e-17      10   ->  10.00000000000000 Inexact Rounded
2678fmax36434 fma  1    77e-18      10   ->  10.00000000000000 Inexact Rounded
2679fmax36435 fma  1    77e-19      10   ->  10.00000000000000 Inexact Rounded
2680fmax36436 fma  1    77e-99      10   ->  10.00000000000000 Inexact Rounded
2681
2682-- negative ulps
2683fmax36440 fma  1     1   -77e-14      ->  0.99999999999923
2684fmax36441 fma  1     1   -77e-15      ->  0.999999999999923
2685fmax36442 fma  1     1   -77e-16      ->  0.9999999999999923
2686fmax36443 fma  1     1   -77e-17      ->  0.9999999999999992 Inexact Rounded
2687fmax36444 fma  1     1   -77e-18      ->  0.9999999999999999 Inexact Rounded
2688fmax36445 fma  1     1   -77e-19      ->  1.000000000000000 Inexact Rounded
2689fmax36446 fma  1     1   -77e-99      ->  1.000000000000000 Inexact Rounded
2690
2691fmax36450 fma  1    10   -77e-14      ->   9.99999999999923
2692fmax36451 fma  1    10   -77e-15      ->   9.999999999999923
2693fmax36452 fma  1    10   -77e-16      ->   9.999999999999992 Inexact Rounded
2694fmax36453 fma  1    10   -77e-17      ->   9.999999999999999 Inexact Rounded
2695fmax36454 fma  1    10   -77e-18      ->  10.00000000000000 Inexact Rounded
2696fmax36455 fma  1    10   -77e-19      ->  10.00000000000000 Inexact Rounded
2697fmax36456 fma  1    10   -77e-99      ->  10.00000000000000 Inexact Rounded
2698
2699fmax36460 fma  1    -77e-14       1   ->  0.99999999999923
2700fmax36461 fma  1    -77e-15       1   ->  0.999999999999923
2701fmax36462 fma  1    -77e-16       1   ->  0.9999999999999923
2702fmax36463 fma  1    -77e-17       1   ->  0.9999999999999992 Inexact Rounded
2703fmax36464 fma  1    -77e-18       1   ->  0.9999999999999999 Inexact Rounded
2704fmax36465 fma  1    -77e-19       1   ->  1.000000000000000 Inexact Rounded
2705fmax36466 fma  1    -77e-99       1   ->  1.000000000000000 Inexact Rounded
2706
2707fmax36470 fma  1    -77e-14      10   ->   9.99999999999923
2708fmax36471 fma  1    -77e-15      10   ->   9.999999999999923
2709fmax36472 fma  1    -77e-16      10   ->   9.999999999999992 Inexact Rounded
2710fmax36473 fma  1    -77e-17      10   ->   9.999999999999999 Inexact Rounded
2711fmax36474 fma  1    -77e-18      10   ->  10.00000000000000 Inexact Rounded
2712fmax36475 fma  1    -77e-19      10   ->  10.00000000000000 Inexact Rounded
2713fmax36476 fma  1    -77e-99      10   ->  10.00000000000000 Inexact Rounded
2714
2715-- negative ulps
2716fmax36480 fma  1    -1    77e-14      ->  -0.99999999999923
2717fmax36481 fma  1    -1    77e-15      ->  -0.999999999999923
2718fmax36482 fma  1    -1    77e-16      ->  -0.9999999999999923
2719fmax36483 fma  1    -1    77e-17      ->  -0.9999999999999992 Inexact Rounded
2720fmax36484 fma  1    -1    77e-18      ->  -0.9999999999999999 Inexact Rounded
2721fmax36485 fma  1    -1    77e-19      ->  -1.000000000000000 Inexact Rounded
2722fmax36486 fma  1    -1    77e-99      ->  -1.000000000000000 Inexact Rounded
2723
2724fmax36490 fma  1   -10    77e-14      ->   -9.99999999999923
2725fmax36491 fma  1   -10    77e-15      ->   -9.999999999999923
2726fmax36492 fma  1   -10    77e-16      ->   -9.999999999999992 Inexact Rounded
2727fmax36493 fma  1   -10    77e-17      ->   -9.999999999999999 Inexact Rounded
2728fmax36494 fma  1   -10    77e-18      ->  -10.00000000000000 Inexact Rounded
2729fmax36495 fma  1   -10    77e-19      ->  -10.00000000000000 Inexact Rounded
2730fmax36496 fma  1   -10    77e-99      ->  -10.00000000000000 Inexact Rounded
2731
2732fmax36500 fma  1     77e-14      -1   ->  -0.99999999999923
2733fmax36501 fma  1     77e-15      -1   ->  -0.999999999999923
2734fmax36502 fma  1     77e-16      -1   ->  -0.9999999999999923
2735fmax36503 fma  1     77e-17      -1   ->  -0.9999999999999992 Inexact Rounded
2736fmax36504 fma  1     77e-18      -1   ->  -0.9999999999999999 Inexact Rounded
2737fmax36505 fma  1     77e-19      -1   ->  -1.000000000000000 Inexact Rounded
2738fmax36506 fma  1     77e-99      -1   ->  -1.000000000000000 Inexact Rounded
2739
2740fmax36510 fma  1     77e-14      -10  ->   -9.99999999999923
2741fmax36511 fma  1     77e-15      -10  ->   -9.999999999999923
2742fmax36512 fma  1     77e-16      -10  ->   -9.999999999999992 Inexact Rounded
2743fmax36513 fma  1     77e-17      -10  ->   -9.999999999999999 Inexact Rounded
2744fmax36514 fma  1     77e-18      -10  ->  -10.00000000000000 Inexact Rounded
2745fmax36515 fma  1     77e-19      -10  ->  -10.00000000000000 Inexact Rounded
2746fmax36516 fma  1     77e-99      -10  ->  -10.00000000000000 Inexact Rounded
2747
2748
2749-- long operands
2750fmax36521 fma  1   101234562345678000 0 -> 1.012345623456780E+17 Rounded
2751fmax36522 fma  1   0 101234562345678000 -> 1.012345623456780E+17 Rounded
2752fmax36523 fma  1   10123456234567800  0 -> 1.012345623456780E+16 Rounded
2753fmax36524 fma  1   0 10123456234567800  -> 1.012345623456780E+16 Rounded
2754fmax36525 fma  1   10123456234567890  0 -> 1.012345623456789E+16 Rounded
2755fmax36526 fma  1   0 10123456234567890  -> 1.012345623456789E+16 Rounded
2756fmax36527 fma  1   10123456234567891  0 -> 1.012345623456789E+16 Inexact Rounded
2757fmax36528 fma  1   0 10123456234567891  -> 1.012345623456789E+16 Inexact Rounded
2758fmax36529 fma  1   101234562345678901 0 -> 1.012345623456789E+17 Inexact Rounded
2759fmax36530 fma  1   0 101234562345678901 -> 1.012345623456789E+17 Inexact Rounded
2760fmax36531 fma  1   10123456234567896  0 -> 1.012345623456790E+16 Inexact Rounded
2761fmax36532 fma  1   0 10123456234567896  -> 1.012345623456790E+16 Inexact Rounded
2762
2763-- verify a query
2764rounding:     down
2765fmax36561 fma  1   1e-398 9.000000000000000E+384 -> 9.000000000000000E+384 Inexact Rounded
2766fmax36562 fma  1        0 9.000000000000000E+384 -> 9.000000000000000E+384 Rounded
2767-- and using decimal64 bounds...
2768rounding:     down
2769fmax36563 fma  1   1e-388 9.000000000000000E+374 -> 9.000000000000000E+374 Inexact Rounded
2770fmax36564 fma  1        0 9.000000000000000E+374 -> 9.000000000000000E+374 Rounded
2771
2772-- more zeros, etc.
2773rounding: half_even
2774
2775fmax36701 fma  1   5.00 1.00E-3 -> 5.00100
2776fmax36702 fma  1   00.00 0.000  -> 0.000
2777fmax36703 fma  1   00.00 0E-3   -> 0.000
2778fmax36704 fma  1   0E-3  00.00  -> 0.000
2779
2780fmax36710 fma  1   0E+3  00.00  -> 0.00
2781fmax36711 fma  1   0E+3  00.0   -> 0.0
2782fmax36712 fma  1   0E+3  00.    -> 0
2783fmax36713 fma  1   0E+3  00.E+1 -> 0E+1
2784fmax36714 fma  1   0E+3  00.E+2 -> 0E+2
2785fmax36715 fma  1   0E+3  00.E+3 -> 0E+3
2786fmax36716 fma  1   0E+3  00.E+4 -> 0E+3
2787fmax36717 fma  1   0E+3  00.E+5 -> 0E+3
2788fmax36718 fma  1   0E+3  -00.0   -> 0.0
2789fmax36719 fma  1   0E+3  -00.    -> 0
2790fmax36731 fma  1   0E+3  -00.E+1 -> 0E+1
2791
2792fmax36720 fma  1   00.00  0E+3  -> 0.00
2793fmax36721 fma  1   00.0   0E+3  -> 0.0
2794fmax36722 fma  1   00.    0E+3  -> 0
2795fmax36723 fma  1   00.E+1 0E+3  -> 0E+1
2796fmax36724 fma  1   00.E+2 0E+3  -> 0E+2
2797fmax36725 fma  1   00.E+3 0E+3  -> 0E+3
2798fmax36726 fma  1   00.E+4 0E+3  -> 0E+3
2799fmax36727 fma  1   00.E+5 0E+3  -> 0E+3
2800fmax36728 fma  1   -00.00 0E+3  -> 0.00
2801fmax36729 fma  1   -00.0  0E+3  -> 0.0
2802fmax36730 fma  1   -00.   0E+3  -> 0
2803
2804fmax36732 fma  1    0     0     ->  0
2805fmax36733 fma  1    0    -0     ->  0
2806fmax36734 fma  1   -0     0     ->  0
2807fmax36735 fma  1   -0    -0     -> -0     -- IEEE 854 special case
2808
2809fmax36736 fma  1    1    -1     ->  0
2810fmax36737 fma  1   -1    -1     -> -2
2811fmax36738 fma  1    1     1     ->  2
2812fmax36739 fma  1   -1     1     ->  0
2813
2814fmax36741 fma  1    0    -1     -> -1
2815fmax36742 fma  1   -0    -1     -> -1
2816fmax36743 fma  1    0     1     ->  1
2817fmax36744 fma  1   -0     1     ->  1
2818fmax36745 fma  1   -1     0     -> -1
2819fmax36746 fma  1   -1    -0     -> -1
2820fmax36747 fma  1    1     0     ->  1
2821fmax36748 fma  1    1    -0     ->  1
2822
2823fmax36751 fma  1    0.0  -1     -> -1.0
2824fmax36752 fma  1   -0.0  -1     -> -1.0
2825fmax36753 fma  1    0.0   1     ->  1.0
2826fmax36754 fma  1   -0.0   1     ->  1.0
2827fmax36755 fma  1   -1.0   0     -> -1.0
2828fmax36756 fma  1   -1.0  -0     -> -1.0
2829fmax36757 fma  1    1.0   0     ->  1.0
2830fmax36758 fma  1    1.0  -0     ->  1.0
2831
2832fmax36761 fma  1    0    -1.0   -> -1.0
2833fmax36762 fma  1   -0    -1.0   -> -1.0
2834fmax36763 fma  1    0     1.0   ->  1.0
2835fmax36764 fma  1   -0     1.0   ->  1.0
2836fmax36765 fma  1   -1     0.0   -> -1.0
2837fmax36766 fma  1   -1    -0.0   -> -1.0
2838fmax36767 fma  1    1     0.0   ->  1.0
2839fmax36768 fma  1    1    -0.0   ->  1.0
2840
2841fmax36771 fma  1    0.0  -1.0   -> -1.0
2842fmax36772 fma  1   -0.0  -1.0   -> -1.0
2843fmax36773 fma  1    0.0   1.0   ->  1.0
2844fmax36774 fma  1   -0.0   1.0   ->  1.0
2845fmax36775 fma  1   -1.0   0.0   -> -1.0
2846fmax36776 fma  1   -1.0  -0.0   -> -1.0
2847fmax36777 fma  1    1.0   0.0   ->  1.0
2848fmax36778 fma  1    1.0  -0.0   ->  1.0
2849
2850-- Specials
2851fmax36780 fma  1   -Inf  -Inf   -> -Infinity
2852fmax36781 fma  1   -Inf  -1000  -> -Infinity
2853fmax36782 fma  1   -Inf  -1     -> -Infinity
2854fmax36783 fma  1   -Inf  -0     -> -Infinity
2855fmax36784 fma  1   -Inf   0     -> -Infinity
2856fmax36785 fma  1   -Inf   1     -> -Infinity
2857fmax36786 fma  1   -Inf   1000  -> -Infinity
2858fmax36787 fma  1   -1000 -Inf   -> -Infinity
2859fmax36788 fma  1   -Inf  -Inf   -> -Infinity
2860fmax36789 fma  1   -1    -Inf   -> -Infinity
2861fmax36790 fma  1   -0    -Inf   -> -Infinity
2862fmax36791 fma  1    0    -Inf   -> -Infinity
2863fmax36792 fma  1    1    -Inf   -> -Infinity
2864fmax36793 fma  1    1000 -Inf   -> -Infinity
2865fmax36794 fma  1    Inf  -Inf   ->  NaN  Invalid_operation
2866
2867fmax36800 fma  1    Inf  -Inf   ->  NaN  Invalid_operation
2868fmax36801 fma  1    Inf  -1000  ->  Infinity
2869fmax36802 fma  1    Inf  -1     ->  Infinity
2870fmax36803 fma  1    Inf  -0     ->  Infinity
2871fmax36804 fma  1    Inf   0     ->  Infinity
2872fmax36805 fma  1    Inf   1     ->  Infinity
2873fmax36806 fma  1    Inf   1000  ->  Infinity
2874fmax36807 fma  1    Inf   Inf   ->  Infinity
2875fmax36808 fma  1   -1000  Inf   ->  Infinity
2876fmax36809 fma  1   -Inf   Inf   ->  NaN  Invalid_operation
2877fmax36810 fma  1   -1     Inf   ->  Infinity
2878fmax36811 fma  1   -0     Inf   ->  Infinity
2879fmax36812 fma  1    0     Inf   ->  Infinity
2880fmax36813 fma  1    1     Inf   ->  Infinity
2881fmax36814 fma  1    1000  Inf   ->  Infinity
2882fmax36815 fma  1    Inf   Inf   ->  Infinity
2883
2884fmax36821 fma  1    NaN -Inf    ->  NaN
2885fmax36822 fma  1    NaN -1000   ->  NaN
2886fmax36823 fma  1    NaN -1      ->  NaN
2887fmax36824 fma  1    NaN -0      ->  NaN
2888fmax36825 fma  1    NaN  0      ->  NaN
2889fmax36826 fma  1    NaN  1      ->  NaN
2890fmax36827 fma  1    NaN  1000   ->  NaN
2891fmax36828 fma  1    NaN  Inf    ->  NaN
2892fmax36829 fma  1    NaN  NaN    ->  NaN
2893fmax36830 fma  1   -Inf  NaN    ->  NaN
2894fmax36831 fma  1   -1000 NaN    ->  NaN
2895fmax36832 fma  1   -1    NaN    ->  NaN
2896fmax36833 fma  1   -0    NaN    ->  NaN
2897fmax36834 fma  1    0    NaN    ->  NaN
2898fmax36835 fma  1    1    NaN    ->  NaN
2899fmax36836 fma  1    1000 NaN    ->  NaN
2900fmax36837 fma  1    Inf  NaN    ->  NaN
2901
2902fmax36841 fma  1    sNaN -Inf   ->  NaN  Invalid_operation
2903fmax36842 fma  1    sNaN -1000  ->  NaN  Invalid_operation
2904fmax36843 fma  1    sNaN -1     ->  NaN  Invalid_operation
2905fmax36844 fma  1    sNaN -0     ->  NaN  Invalid_operation
2906fmax36845 fma  1    sNaN  0     ->  NaN  Invalid_operation
2907fmax36846 fma  1    sNaN  1     ->  NaN  Invalid_operation
2908fmax36847 fma  1    sNaN  1000  ->  NaN  Invalid_operation
2909fmax36848 fma  1    sNaN  NaN   ->  NaN  Invalid_operation
2910fmax36849 fma  1    sNaN sNaN   ->  NaN  Invalid_operation
2911fmax36850 fma  1    NaN  sNaN   ->  NaN  Invalid_operation
2912fmax36851 fma  1   -Inf  sNaN   ->  NaN  Invalid_operation
2913fmax36852 fma  1   -1000 sNaN   ->  NaN  Invalid_operation
2914fmax36853 fma  1   -1    sNaN   ->  NaN  Invalid_operation
2915fmax36854 fma  1   -0    sNaN   ->  NaN  Invalid_operation
2916fmax36855 fma  1    0    sNaN   ->  NaN  Invalid_operation
2917fmax36856 fma  1    1    sNaN   ->  NaN  Invalid_operation
2918fmax36857 fma  1    1000 sNaN   ->  NaN  Invalid_operation
2919fmax36858 fma  1    Inf  sNaN   ->  NaN  Invalid_operation
2920fmax36859 fma  1    NaN  sNaN   ->  NaN  Invalid_operation
2921
2922-- propagating NaNs
2923fmax36861 fma  1    NaN1   -Inf    ->  NaN1
2924fmax36862 fma  1   +NaN2   -1000   ->  NaN2
2925fmax36863 fma  1    NaN3    1000   ->  NaN3
2926fmax36864 fma  1    NaN4    Inf    ->  NaN4
2927fmax36865 fma  1    NaN5   +NaN6   ->  NaN5
2928fmax36866 fma  1   -Inf     NaN7   ->  NaN7
2929fmax36867 fma  1   -1000    NaN8   ->  NaN8
2930fmax36868 fma  1    1000    NaN9   ->  NaN9
2931fmax36869 fma  1    Inf    +NaN10  ->  NaN10
2932fmax36871 fma  1    sNaN11  -Inf   ->  NaN11  Invalid_operation
2933fmax36872 fma  1    sNaN12  -1000  ->  NaN12  Invalid_operation
2934fmax36873 fma  1    sNaN13   1000  ->  NaN13  Invalid_operation
2935fmax36874 fma  1    sNaN14   NaN17 ->  NaN14  Invalid_operation
2936fmax36875 fma  1    sNaN15  sNaN18 ->  NaN15  Invalid_operation
2937fmax36876 fma  1    NaN16   sNaN19 ->  NaN19  Invalid_operation
2938fmax36877 fma  1   -Inf    +sNaN20 ->  NaN20  Invalid_operation
2939fmax36878 fma  1   -1000    sNaN21 ->  NaN21  Invalid_operation
2940fmax36879 fma  1    1000    sNaN22 ->  NaN22  Invalid_operation
2941fmax36880 fma  1    Inf     sNaN23 ->  NaN23  Invalid_operation
2942fmax36881 fma  1   +NaN25  +sNaN24 ->  NaN24  Invalid_operation
2943fmax36882 fma  1   -NaN26    NaN28 -> -NaN26
2944fmax36883 fma  1   -sNaN27  sNaN29 -> -NaN27  Invalid_operation
2945fmax36884 fma  1    1000    -NaN30 -> -NaN30
2946fmax36885 fma  1    1000   -sNaN31 -> -NaN31  Invalid_operation
2947
2948-- now the case where we can get underflow but the result is normal
2949-- [note this can't happen if the operands are also bounded, as we
2950-- cannot represent 1E-399, for example]
2951
2952fmax36571 fma  1         1E-383       0  -> 1E-383
2953fmax36572 fma  1         1E-384       0  -> 1E-384   Subnormal
2954fmax36573 fma  1         1E-383  1E-384  -> 1.1E-383
2955fmax36574 subtract  1E-383  1E-384  ->   9E-384 Subnormal
2956
2957-- Here we explore the boundary of rounding a subnormal to Nmin
2958fmax36575 subtract  1E-383  1E-398  ->   9.99999999999999E-384  Subnormal
2959fmax36576 subtract  1E-383  1E-398  ->   9.99999999999999E-384  Subnormal
2960fmax36577 subtract  1E-383  1E-399  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
2961fmax36578 subtract  1E-383  1E-400  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
2962fmax36579 subtract  1E-383  1E-401  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
2963fmax36580 subtract  1E-383  1E-402  ->   1.000000000000000E-383 Underflow Inexact Subnormal Rounded
2964
2965-- check overflow edge case
2966--               1234567890123456
2967fmax36972 apply        9.999999999999999E+384         -> 9.999999999999999E+384
2968fmax36973 fma  1       9.999999999999999E+384  1      -> 9.999999999999999E+384 Inexact Rounded
2969fmax36974 fma  1        9999999999999999E+369  1      -> 9.999999999999999E+384 Inexact Rounded
2970fmax36975 fma  1        9999999999999999E+369  1E+369  -> Infinity Overflow Inexact Rounded
2971fmax36976 fma  1        9999999999999999E+369  9E+368  -> Infinity Overflow Inexact Rounded
2972fmax36977 fma  1        9999999999999999E+369  8E+368  -> Infinity Overflow Inexact Rounded
2973fmax36978 fma  1        9999999999999999E+369  7E+368  -> Infinity Overflow Inexact Rounded
2974fmax36979 fma  1        9999999999999999E+369  6E+368  -> Infinity Overflow Inexact Rounded
2975fmax36980 fma  1        9999999999999999E+369  5E+368  -> Infinity Overflow Inexact Rounded
2976fmax36981 fma  1        9999999999999999E+369  4E+368  -> 9.999999999999999E+384 Inexact Rounded
2977fmax36982 fma  1        9999999999999999E+369  3E+368  -> 9.999999999999999E+384 Inexact Rounded
2978fmax36983 fma  1        9999999999999999E+369  2E+368  -> 9.999999999999999E+384 Inexact Rounded
2979fmax36984 fma  1        9999999999999999E+369  1E+368  -> 9.999999999999999E+384 Inexact Rounded
2980
2981fmax36985 apply       -9.999999999999999E+384         -> -9.999999999999999E+384
2982fmax36986 fma  1      -9.999999999999999E+384 -1      -> -9.999999999999999E+384 Inexact Rounded
2983fmax36987 fma  1       -9999999999999999E+369 -1      -> -9.999999999999999E+384 Inexact Rounded
2984fmax36988 fma  1       -9999999999999999E+369 -1E+369  -> -Infinity Overflow Inexact Rounded
2985fmax36989 fma  1       -9999999999999999E+369 -9E+368  -> -Infinity Overflow Inexact Rounded
2986fmax36990 fma  1       -9999999999999999E+369 -8E+368  -> -Infinity Overflow Inexact Rounded
2987fmax36991 fma  1       -9999999999999999E+369 -7E+368  -> -Infinity Overflow Inexact Rounded
2988fmax36992 fma  1       -9999999999999999E+369 -6E+368  -> -Infinity Overflow Inexact Rounded
2989fmax36993 fma  1       -9999999999999999E+369 -5E+368  -> -Infinity Overflow Inexact Rounded
2990fmax36994 fma  1       -9999999999999999E+369 -4E+368  -> -9.999999999999999E+384 Inexact Rounded
2991fmax36995 fma  1       -9999999999999999E+369 -3E+368  -> -9.999999999999999E+384 Inexact Rounded
2992fmax36996 fma  1       -9999999999999999E+369 -2E+368  -> -9.999999999999999E+384 Inexact Rounded
2993fmax36997 fma  1       -9999999999999999E+369 -1E+368  -> -9.999999999999999E+384 Inexact Rounded
2994
2995-- And for round down full and subnormal results
2996rounding:     down
2997fmax361100 fma  1   1e+2 -1e-383    -> 99.99999999999999 Rounded Inexact
2998fmax361101 fma  1   1e+1 -1e-383    -> 9.999999999999999  Rounded Inexact
2999fmax361103 fma  1     +1 -1e-383    -> 0.9999999999999999  Rounded Inexact
3000fmax361104 fma  1   1e-1 -1e-383    -> 0.09999999999999999  Rounded Inexact
3001fmax361105 fma  1   1e-2 -1e-383    -> 0.009999999999999999  Rounded Inexact
3002fmax361106 fma  1   1e-3 -1e-383    -> 0.0009999999999999999  Rounded Inexact
3003fmax361107 fma  1   1e-4 -1e-383    -> 0.00009999999999999999  Rounded Inexact
3004fmax361108 fma  1   1e-5 -1e-383    -> 0.000009999999999999999  Rounded Inexact
3005fmax361109 fma  1   1e-6 -1e-383    -> 9.999999999999999E-7  Rounded Inexact
3006
3007rounding:     ceiling
3008fmax361110 fma  1   -1e+2 +1e-383   -> -99.99999999999999 Rounded Inexact
3009fmax361111 fma  1   -1e+1 +1e-383   -> -9.999999999999999  Rounded Inexact
3010fmax361113 fma  1      -1 +1e-383   -> -0.9999999999999999  Rounded Inexact
3011fmax361114 fma  1   -1e-1 +1e-383   -> -0.09999999999999999  Rounded Inexact
3012fmax361115 fma  1   -1e-2 +1e-383   -> -0.009999999999999999  Rounded Inexact
3013fmax361116 fma  1   -1e-3 +1e-383   -> -0.0009999999999999999  Rounded Inexact
3014fmax361117 fma  1   -1e-4 +1e-383   -> -0.00009999999999999999  Rounded Inexact
3015fmax361118 fma  1   -1e-5 +1e-383   -> -0.000009999999999999999  Rounded Inexact
3016fmax361119 fma  1   -1e-6 +1e-383   -> -9.999999999999999E-7  Rounded Inexact
3017
3018-- tests based on Gunnar Degnbol's edge case
3019rounding:     half_even
3020
3021fmax361300 fma  1   1E16  -0.5                 ->  1.000000000000000E+16 Inexact Rounded
3022fmax361310 fma  1   1E16  -0.51                ->  9999999999999999      Inexact Rounded
3023fmax361311 fma  1   1E16  -0.501               ->  9999999999999999      Inexact Rounded
3024fmax361312 fma  1   1E16  -0.5001              ->  9999999999999999      Inexact Rounded
3025fmax361313 fma  1   1E16  -0.50001             ->  9999999999999999      Inexact Rounded
3026fmax361314 fma  1   1E16  -0.500001            ->  9999999999999999      Inexact Rounded
3027fmax361315 fma  1   1E16  -0.5000001           ->  9999999999999999      Inexact Rounded
3028fmax361316 fma  1   1E16  -0.50000001          ->  9999999999999999      Inexact Rounded
3029fmax361317 fma  1   1E16  -0.500000001         ->  9999999999999999      Inexact Rounded
3030fmax361318 fma  1   1E16  -0.5000000001        ->  9999999999999999      Inexact Rounded
3031fmax361319 fma  1   1E16  -0.50000000001       ->  9999999999999999      Inexact Rounded
3032fmax361320 fma  1   1E16  -0.500000000001      ->  9999999999999999      Inexact Rounded
3033fmax361321 fma  1   1E16  -0.5000000000001     ->  9999999999999999      Inexact Rounded
3034fmax361322 fma  1   1E16  -0.50000000000001    ->  9999999999999999      Inexact Rounded
3035fmax361323 fma  1   1E16  -0.500000000000001   ->  9999999999999999      Inexact Rounded
3036fmax361324 fma  1   1E16  -0.5000000000000001  ->  9999999999999999      Inexact Rounded
3037fmax361325 fma  1   1E16  -0.5000000000000000  ->  1.000000000000000E+16 Inexact Rounded
3038fmax361326 fma  1   1E16  -0.500000000000000   ->  1.000000000000000E+16 Inexact Rounded
3039fmax361327 fma  1   1E16  -0.50000000000000    ->  1.000000000000000E+16 Inexact Rounded
3040fmax361328 fma  1   1E16  -0.5000000000000     ->  1.000000000000000E+16 Inexact Rounded
3041fmax361329 fma  1   1E16  -0.500000000000      ->  1.000000000000000E+16 Inexact Rounded
3042fmax361330 fma  1   1E16  -0.50000000000       ->  1.000000000000000E+16 Inexact Rounded
3043fmax361331 fma  1   1E16  -0.5000000000        ->  1.000000000000000E+16 Inexact Rounded
3044fmax361332 fma  1   1E16  -0.500000000         ->  1.000000000000000E+16 Inexact Rounded
3045fmax361333 fma  1   1E16  -0.50000000          ->  1.000000000000000E+16 Inexact Rounded
3046fmax361334 fma  1   1E16  -0.5000000           ->  1.000000000000000E+16 Inexact Rounded
3047fmax361335 fma  1   1E16  -0.500000            ->  1.000000000000000E+16 Inexact Rounded
3048fmax361336 fma  1   1E16  -0.50000             ->  1.000000000000000E+16 Inexact Rounded
3049fmax361337 fma  1   1E16  -0.5000              ->  1.000000000000000E+16 Inexact Rounded
3050fmax361338 fma  1   1E16  -0.500               ->  1.000000000000000E+16 Inexact Rounded
3051fmax361339 fma  1   1E16  -0.50                ->  1.000000000000000E+16 Inexact Rounded
3052
3053fmax361340 fma  1   1E16  -5000000.000010001   ->  9999999995000000      Inexact Rounded
3054fmax361341 fma  1   1E16  -5000000.000000001   ->  9999999995000000      Inexact Rounded
3055
3056fmax361349 fma  1   9999999999999999 0.4                 ->  9999999999999999      Inexact Rounded
3057fmax361350 fma  1   9999999999999999 0.49                ->  9999999999999999      Inexact Rounded
3058fmax361351 fma  1   9999999999999999 0.499               ->  9999999999999999      Inexact Rounded
3059fmax361352 fma  1   9999999999999999 0.4999              ->  9999999999999999      Inexact Rounded
3060fmax361353 fma  1   9999999999999999 0.49999             ->  9999999999999999      Inexact Rounded
3061fmax361354 fma  1   9999999999999999 0.499999            ->  9999999999999999      Inexact Rounded
3062fmax361355 fma  1   9999999999999999 0.4999999           ->  9999999999999999      Inexact Rounded
3063fmax361356 fma  1   9999999999999999 0.49999999          ->  9999999999999999      Inexact Rounded
3064fmax361357 fma  1   9999999999999999 0.499999999         ->  9999999999999999      Inexact Rounded
3065fmax361358 fma  1   9999999999999999 0.4999999999        ->  9999999999999999      Inexact Rounded
3066fmax361359 fma  1   9999999999999999 0.49999999999       ->  9999999999999999      Inexact Rounded
3067fmax361360 fma  1   9999999999999999 0.499999999999      ->  9999999999999999      Inexact Rounded
3068fmax361361 fma  1   9999999999999999 0.4999999999999     ->  9999999999999999      Inexact Rounded
3069fmax361362 fma  1   9999999999999999 0.49999999999999    ->  9999999999999999      Inexact Rounded
3070fmax361363 fma  1   9999999999999999 0.499999999999999   ->  9999999999999999      Inexact Rounded
3071fmax361364 fma  1   9999999999999999 0.4999999999999999  ->  9999999999999999      Inexact Rounded
3072fmax361365 fma  1   9999999999999999 0.5000000000000000  ->  1.000000000000000E+16 Inexact Rounded
3073fmax361367 fma  1   9999999999999999 0.500000000000000   ->  1.000000000000000E+16 Inexact Rounded
3074fmax361368 fma  1   9999999999999999 0.50000000000000    ->  1.000000000000000E+16 Inexact Rounded
3075fmax361369 fma  1   9999999999999999 0.5000000000000     ->  1.000000000000000E+16 Inexact Rounded
3076fmax361370 fma  1   9999999999999999 0.500000000000      ->  1.000000000000000E+16 Inexact Rounded
3077fmax361371 fma  1   9999999999999999 0.50000000000       ->  1.000000000000000E+16 Inexact Rounded
3078fmax361372 fma  1   9999999999999999 0.5000000000        ->  1.000000000000000E+16 Inexact Rounded
3079fmax361373 fma  1   9999999999999999 0.500000000         ->  1.000000000000000E+16 Inexact Rounded
3080fmax361374 fma  1   9999999999999999 0.50000000          ->  1.000000000000000E+16 Inexact Rounded
3081fmax361375 fma  1   9999999999999999 0.5000000           ->  1.000000000000000E+16 Inexact Rounded
3082fmax361376 fma  1   9999999999999999 0.500000            ->  1.000000000000000E+16 Inexact Rounded
3083fmax361377 fma  1   9999999999999999 0.50000             ->  1.000000000000000E+16 Inexact Rounded
3084fmax361378 fma  1   9999999999999999 0.5000              ->  1.000000000000000E+16 Inexact Rounded
3085fmax361379 fma  1   9999999999999999 0.500               ->  1.000000000000000E+16 Inexact Rounded
3086fmax361380 fma  1   9999999999999999 0.50                ->  1.000000000000000E+16 Inexact Rounded
3087fmax361381 fma  1   9999999999999999 0.5                 ->  1.000000000000000E+16 Inexact Rounded
3088fmax361382 fma  1   9999999999999999 0.5000000000000001  ->  1.000000000000000E+16 Inexact Rounded
3089fmax361383 fma  1   9999999999999999 0.500000000000001   ->  1.000000000000000E+16 Inexact Rounded
3090fmax361384 fma  1   9999999999999999 0.50000000000001    ->  1.000000000000000E+16 Inexact Rounded
3091fmax361385 fma  1   9999999999999999 0.5000000000001     ->  1.000000000000000E+16 Inexact Rounded
3092fmax361386 fma  1   9999999999999999 0.500000000001      ->  1.000000000000000E+16 Inexact Rounded
3093fmax361387 fma  1   9999999999999999 0.50000000001       ->  1.000000000000000E+16 Inexact Rounded
3094fmax361388 fma  1   9999999999999999 0.5000000001        ->  1.000000000000000E+16 Inexact Rounded
3095fmax361389 fma  1   9999999999999999 0.500000001         ->  1.000000000000000E+16 Inexact Rounded
3096fmax361390 fma  1   9999999999999999 0.50000001          ->  1.000000000000000E+16 Inexact Rounded
3097fmax361391 fma  1   9999999999999999 0.5000001           ->  1.000000000000000E+16 Inexact Rounded
3098fmax361392 fma  1   9999999999999999 0.500001            ->  1.000000000000000E+16 Inexact Rounded
3099fmax361393 fma  1   9999999999999999 0.50001             ->  1.000000000000000E+16 Inexact Rounded
3100fmax361394 fma  1   9999999999999999 0.5001              ->  1.000000000000000E+16 Inexact Rounded
3101fmax361395 fma  1   9999999999999999 0.501               ->  1.000000000000000E+16 Inexact Rounded
3102fmax361396 fma  1   9999999999999999 0.51                ->  1.000000000000000E+16 Inexact Rounded
3103
3104-- More GD edge cases, where difference between the unadjusted
3105-- exponents is larger than the maximum precision and one side is 0
3106fmax361420 fma  1    0 1.123456789012345     -> 1.123456789012345
3107fmax361421 fma  1    0 1.123456789012345E-1  -> 0.1123456789012345
3108fmax361422 fma  1    0 1.123456789012345E-2  -> 0.01123456789012345
3109fmax361423 fma  1    0 1.123456789012345E-3  -> 0.001123456789012345
3110fmax361424 fma  1    0 1.123456789012345E-4  -> 0.0001123456789012345
3111fmax361425 fma  1    0 1.123456789012345E-5  -> 0.00001123456789012345
3112fmax361426 fma  1    0 1.123456789012345E-6  -> 0.000001123456789012345
3113fmax361427 fma  1    0 1.123456789012345E-7  -> 1.123456789012345E-7
3114fmax361428 fma  1    0 1.123456789012345E-8  -> 1.123456789012345E-8
3115fmax361429 fma  1    0 1.123456789012345E-9  -> 1.123456789012345E-9
3116fmax361430 fma  1    0 1.123456789012345E-10 -> 1.123456789012345E-10
3117fmax361431 fma  1    0 1.123456789012345E-11 -> 1.123456789012345E-11
3118fmax361432 fma  1    0 1.123456789012345E-12 -> 1.123456789012345E-12
3119fmax361433 fma  1    0 1.123456789012345E-13 -> 1.123456789012345E-13
3120fmax361434 fma  1    0 1.123456789012345E-14 -> 1.123456789012345E-14
3121fmax361435 fma  1    0 1.123456789012345E-15 -> 1.123456789012345E-15
3122fmax361436 fma  1    0 1.123456789012345E-16 -> 1.123456789012345E-16
3123fmax361437 fma  1    0 1.123456789012345E-17 -> 1.123456789012345E-17
3124fmax361438 fma  1    0 1.123456789012345E-18 -> 1.123456789012345E-18
3125fmax361439 fma  1    0 1.123456789012345E-19 -> 1.123456789012345E-19
3126
3127-- same, reversed 0
3128fmax361440 fma  1   1.123456789012345     0 -> 1.123456789012345
3129fmax361441 fma  1   1.123456789012345E-1  0 -> 0.1123456789012345
3130fmax361442 fma  1   1.123456789012345E-2  0 -> 0.01123456789012345
3131fmax361443 fma  1   1.123456789012345E-3  0 -> 0.001123456789012345
3132fmax361444 fma  1   1.123456789012345E-4  0 -> 0.0001123456789012345
3133fmax361445 fma  1   1.123456789012345E-5  0 -> 0.00001123456789012345
3134fmax361446 fma  1   1.123456789012345E-6  0 -> 0.000001123456789012345
3135fmax361447 fma  1   1.123456789012345E-7  0 -> 1.123456789012345E-7
3136fmax361448 fma  1   1.123456789012345E-8  0 -> 1.123456789012345E-8
3137fmax361449 fma  1   1.123456789012345E-9  0 -> 1.123456789012345E-9
3138fmax361450 fma  1   1.123456789012345E-10 0 -> 1.123456789012345E-10
3139fmax361451 fma  1   1.123456789012345E-11 0 -> 1.123456789012345E-11
3140fmax361452 fma  1   1.123456789012345E-12 0 -> 1.123456789012345E-12
3141fmax361453 fma  1   1.123456789012345E-13 0 -> 1.123456789012345E-13
3142fmax361454 fma  1   1.123456789012345E-14 0 -> 1.123456789012345E-14
3143fmax361455 fma  1   1.123456789012345E-15 0 -> 1.123456789012345E-15
3144fmax361456 fma  1   1.123456789012345E-16 0 -> 1.123456789012345E-16
3145fmax361457 fma  1   1.123456789012345E-17 0 -> 1.123456789012345E-17
3146fmax361458 fma  1   1.123456789012345E-18 0 -> 1.123456789012345E-18
3147fmax361459 fma  1   1.123456789012345E-19 0 -> 1.123456789012345E-19
3148
3149-- same, Es on the 0
3150fmax361460 fma  1   1.123456789012345  0E-0   -> 1.123456789012345
3151fmax361461 fma  1   1.123456789012345  0E-1   -> 1.123456789012345
3152fmax361462 fma  1   1.123456789012345  0E-2   -> 1.123456789012345
3153fmax361463 fma  1   1.123456789012345  0E-3   -> 1.123456789012345
3154fmax361464 fma  1   1.123456789012345  0E-4   -> 1.123456789012345
3155fmax361465 fma  1   1.123456789012345  0E-5   -> 1.123456789012345
3156fmax361466 fma  1   1.123456789012345  0E-6   -> 1.123456789012345
3157fmax361467 fma  1   1.123456789012345  0E-7   -> 1.123456789012345
3158fmax361468 fma  1   1.123456789012345  0E-8   -> 1.123456789012345
3159fmax361469 fma  1   1.123456789012345  0E-9   -> 1.123456789012345
3160fmax361470 fma  1   1.123456789012345  0E-10  -> 1.123456789012345
3161fmax361471 fma  1   1.123456789012345  0E-11  -> 1.123456789012345
3162fmax361472 fma  1   1.123456789012345  0E-12  -> 1.123456789012345
3163fmax361473 fma  1   1.123456789012345  0E-13  -> 1.123456789012345
3164fmax361474 fma  1   1.123456789012345  0E-14  -> 1.123456789012345
3165fmax361475 fma  1   1.123456789012345  0E-15  -> 1.123456789012345
3166-- next four flag Rounded because the 0 extends the result
3167fmax361476 fma  1   1.123456789012345  0E-16  -> 1.123456789012345 Rounded
3168fmax361477 fma  1   1.123456789012345  0E-17  -> 1.123456789012345 Rounded
3169fmax361478 fma  1   1.123456789012345  0E-18  -> 1.123456789012345 Rounded
3170fmax361479 fma  1   1.123456789012345  0E-19  -> 1.123456789012345 Rounded
3171
3172-- sum of two opposite-sign operands is exactly 0 and floor => -0
3173rounding:    half_up
3174-- exact zeros from zeros
3175fmax361500 fma  1    0        0E-19  ->  0E-19
3176fmax361501 fma  1   -0        0E-19  ->  0E-19
3177fmax361502 fma  1    0       -0E-19  ->  0E-19
3178fmax361503 fma  1   -0       -0E-19  -> -0E-19
3179fmax361504 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3180fmax361505 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
3181fmax361506 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
3182fmax361507 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3183-- inexact zeros
3184fmax361511 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3185fmax361512 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3186fmax361513 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3187fmax361514 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3188-- some exact zeros from non-zeros
3189fmax361515 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3190fmax361516 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
3191fmax361517 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
3192fmax361518 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3193
3194rounding:    half_down
3195-- exact zeros from zeros
3196fmax361520 fma  1    0        0E-19  ->  0E-19
3197fmax361521 fma  1   -0        0E-19  ->  0E-19
3198fmax361522 fma  1    0       -0E-19  ->  0E-19
3199fmax361523 fma  1   -0       -0E-19  -> -0E-19
3200fmax361524 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3201fmax361525 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
3202fmax361526 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
3203fmax361527 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3204-- inexact zeros
3205fmax361531 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3206fmax361532 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3207fmax361533 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3208fmax361534 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3209-- some exact zeros from non-zeros
3210fmax361535 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3211fmax361536 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
3212fmax361537 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
3213fmax361538 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3214
3215rounding:    half_even
3216-- exact zeros from zeros
3217fmax361540 fma  1    0        0E-19  ->  0E-19
3218fmax361541 fma  1   -0        0E-19  ->  0E-19
3219fmax361542 fma  1    0       -0E-19  ->  0E-19
3220fmax361543 fma  1   -0       -0E-19  -> -0E-19
3221fmax361544 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3222fmax361545 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
3223fmax361546 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
3224fmax361547 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3225-- inexact zeros
3226fmax361551 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3227fmax361552 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3228fmax361553 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3229fmax361554 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3230-- some exact zeros from non-zeros
3231fmax361555 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3232fmax361556 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
3233fmax361557 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
3234fmax361558 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3235
3236rounding:    up
3237-- exact zeros from zeros
3238fmax361560 fma  1    0        0E-19  ->  0E-19
3239fmax361561 fma  1   -0        0E-19  ->  0E-19
3240fmax361562 fma  1    0       -0E-19  ->  0E-19
3241fmax361563 fma  1   -0       -0E-19  -> -0E-19
3242fmax361564 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3243fmax361565 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
3244fmax361566 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
3245fmax361567 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3246-- inexact zeros
3247fmax361571 fma  1    1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
3248fmax361572 fma  1   -1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
3249fmax361573 fma  1    1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
3250fmax361574 fma  1   -1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
3251-- some exact zeros from non-zeros
3252fmax361575 fma  1    1E-401   1E-401 ->  1E-398 Subnormal Inexact Rounded Underflow
3253fmax361576 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
3254fmax361577 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
3255fmax361578 fma  1   -1E-401  -1E-401 -> -1E-398 Subnormal Inexact Rounded Underflow
3256
3257rounding:    down
3258-- exact zeros from zeros
3259fmax361580 fma  1    0        0E-19  ->  0E-19
3260fmax361581 fma  1   -0        0E-19  ->  0E-19
3261fmax361582 fma  1    0       -0E-19  ->  0E-19
3262fmax361583 fma  1   -0       -0E-19  -> -0E-19
3263fmax361584 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3264fmax361585 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
3265fmax361586 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
3266fmax361587 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3267-- inexact zeros
3268fmax361591 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3269fmax361592 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3270fmax361593 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3271fmax361594 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3272-- some exact zeros from non-zeros
3273fmax361595 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3274fmax361596 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
3275fmax361597 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
3276fmax361598 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3277
3278rounding:    ceiling
3279-- exact zeros from zeros
3280fmax361600 fma  1    0        0E-19  ->  0E-19
3281fmax361601 fma  1   -0        0E-19  ->  0E-19
3282fmax361602 fma  1    0       -0E-19  ->  0E-19
3283fmax361603 fma  1   -0       -0E-19  -> -0E-19
3284fmax361604 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3285fmax361605 fma  1   -0E-400   0E-19  ->  0E-398 Clamped
3286fmax361606 fma  1    0E-400  -0E-19  ->  0E-398 Clamped
3287fmax361607 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3288-- inexact zeros
3289fmax361611 fma  1    1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
3290fmax361612 fma  1   -1E-401   1E-400 ->  1E-398 Subnormal Inexact Rounded Underflow
3291fmax361613 fma  1    1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3292fmax361614 fma  1   -1E-401  -1E-400 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3293-- some exact zeros from non-zeros
3294fmax361615 fma  1    1E-401   1E-401 ->  1E-398 Subnormal Inexact Rounded Underflow
3295fmax361616 fma  1   -1E-401   1E-401 ->  0E-398 Clamped
3296fmax361617 fma  1    1E-401  -1E-401 ->  0E-398 Clamped
3297fmax361618 fma  1   -1E-401  -1E-401 -> -0E-398 Subnormal Inexact Rounded Underflow Clamped
3298
3299-- and the extra-special ugly case; unusual minuses marked by -- *
3300rounding:    floor
3301-- exact zeros from zeros
3302fmax361620 fma  1    0        0E-19  ->  0E-19
3303fmax361621 fma  1   -0        0E-19  -> -0E-19           -- *
3304fmax361622 fma  1    0       -0E-19  -> -0E-19           -- *
3305fmax361623 fma  1   -0       -0E-19  -> -0E-19
3306fmax361624 fma  1    0E-400   0E-19  ->  0E-398 Clamped
3307fmax361625 fma  1   -0E-400   0E-19  -> -0E-398 Clamped  -- *
3308fmax361626 fma  1    0E-400  -0E-19  -> -0E-398 Clamped  -- *
3309fmax361627 fma  1   -0E-400  -0E-19  -> -0E-398 Clamped
3310-- inexact zeros
3311fmax361631 fma  1    1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3312fmax361632 fma  1   -1E-401   1E-400 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3313fmax361633 fma  1    1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
3314fmax361634 fma  1   -1E-401  -1E-400 -> -1E-398 Subnormal Inexact Rounded Underflow
3315-- some exact zeros from non-zeros
3316fmax361635 fma  1    1E-401   1E-401 ->  0E-398 Subnormal Inexact Rounded Underflow Clamped
3317fmax361636 fma  1   -1E-401   1E-401 -> -0E-398 Clamped  -- *
3318fmax361637 fma  1    1E-401  -1E-401 -> -0E-398 Clamped  -- *
3319fmax361638 fma  1   -1E-401  -1E-401 -> -1E-398 Subnormal Inexact Rounded Underflow
3320
3321-- Examples from SQL proposal (Krishna Kulkarni)
3322fmax361701 fma  1   130E-2    120E-2    -> 2.50
3323fmax361702 fma  1   130E-2    12E-1     -> 2.50
3324fmax361703 fma  1   130E-2    1E0       -> 2.30
3325fmax361704 fma  1   1E2       1E4       -> 1.01E+4
3326fmax361705 subtract 130E-2  120E-2 -> 0.10
3327fmax361706 subtract 130E-2  12E-1  -> 0.10
3328fmax361707 subtract 130E-2  1E0    -> 0.30
3329fmax361708 subtract 1E2     1E4    -> -9.9E+3
3330
3331-- Gappy coefficients; check residue handling even with full coefficient gap
3332rounding: half_even
3333
3334fmax362001 fma  1   1234567890123456 1      -> 1234567890123457
3335fmax362002 fma  1   1234567890123456 0.6    -> 1234567890123457  Inexact Rounded
3336fmax362003 fma  1   1234567890123456 0.06   -> 1234567890123456  Inexact Rounded
3337fmax362004 fma  1   1234567890123456 6E-3   -> 1234567890123456  Inexact Rounded
3338fmax362005 fma  1   1234567890123456 6E-4   -> 1234567890123456  Inexact Rounded
3339fmax362006 fma  1   1234567890123456 6E-5   -> 1234567890123456  Inexact Rounded
3340fmax362007 fma  1   1234567890123456 6E-6   -> 1234567890123456  Inexact Rounded
3341fmax362008 fma  1   1234567890123456 6E-7   -> 1234567890123456  Inexact Rounded
3342fmax362009 fma  1   1234567890123456 6E-8   -> 1234567890123456  Inexact Rounded
3343fmax362010 fma  1   1234567890123456 6E-9   -> 1234567890123456  Inexact Rounded
3344fmax362011 fma  1   1234567890123456 6E-10  -> 1234567890123456  Inexact Rounded
3345fmax362012 fma  1   1234567890123456 6E-11  -> 1234567890123456  Inexact Rounded
3346fmax362013 fma  1   1234567890123456 6E-12  -> 1234567890123456  Inexact Rounded
3347fmax362014 fma  1   1234567890123456 6E-13  -> 1234567890123456  Inexact Rounded
3348fmax362015 fma  1   1234567890123456 6E-14  -> 1234567890123456  Inexact Rounded
3349fmax362016 fma  1   1234567890123456 6E-15  -> 1234567890123456  Inexact Rounded
3350fmax362017 fma  1   1234567890123456 6E-16  -> 1234567890123456  Inexact Rounded
3351fmax362018 fma  1   1234567890123456 6E-17  -> 1234567890123456  Inexact Rounded
3352fmax362019 fma  1   1234567890123456 6E-18  -> 1234567890123456  Inexact Rounded
3353fmax362020 fma  1   1234567890123456 6E-19  -> 1234567890123456  Inexact Rounded
3354fmax362021 fma  1   1234567890123456 6E-20  -> 1234567890123456  Inexact Rounded
3355
3356-- widening second argument at gap
3357fmax362030 fma  1   12345678 1                       -> 12345679
3358fmax362031 fma  1   12345678 0.1                     -> 12345678.1
3359fmax362032 fma  1   12345678 0.12                    -> 12345678.12
3360fmax362033 fma  1   12345678 0.123                   -> 12345678.123
3361fmax362034 fma  1   12345678 0.1234                  -> 12345678.1234
3362fmax362035 fma  1   12345678 0.12345                 -> 12345678.12345
3363fmax362036 fma  1   12345678 0.123456                -> 12345678.123456
3364fmax362037 fma  1   12345678 0.1234567               -> 12345678.1234567
3365fmax362038 fma  1   12345678 0.12345678              -> 12345678.12345678
3366fmax362039 fma  1   12345678 0.123456789             -> 12345678.12345679 Inexact Rounded
3367fmax362040 fma  1   12345678 0.123456785             -> 12345678.12345678 Inexact Rounded
3368fmax362041 fma  1   12345678 0.1234567850            -> 12345678.12345678 Inexact Rounded
3369fmax362042 fma  1   12345678 0.1234567851            -> 12345678.12345679 Inexact Rounded
3370fmax362043 fma  1   12345678 0.12345678501           -> 12345678.12345679 Inexact Rounded
3371fmax362044 fma  1   12345678 0.123456785001          -> 12345678.12345679 Inexact Rounded
3372fmax362045 fma  1   12345678 0.1234567850001         -> 12345678.12345679 Inexact Rounded
3373fmax362046 fma  1   12345678 0.12345678500001        -> 12345678.12345679 Inexact Rounded
3374fmax362047 fma  1   12345678 0.123456785000001       -> 12345678.12345679 Inexact Rounded
3375fmax362048 fma  1   12345678 0.1234567850000001      -> 12345678.12345679 Inexact Rounded
3376fmax362049 fma  1   12345678 0.1234567850000000      -> 12345678.12345678 Inexact Rounded
3377--                               90123456
3378rounding: half_even
3379fmax362050 fma  1   12345678 0.0234567750000000      -> 12345678.02345678 Inexact Rounded
3380fmax362051 fma  1   12345678 0.0034567750000000      -> 12345678.00345678 Inexact Rounded
3381fmax362052 fma  1   12345678 0.0004567750000000      -> 12345678.00045678 Inexact Rounded
3382fmax362053 fma  1   12345678 0.0000567750000000      -> 12345678.00005678 Inexact Rounded
3383fmax362054 fma  1   12345678 0.0000067750000000      -> 12345678.00000678 Inexact Rounded
3384fmax362055 fma  1   12345678 0.0000007750000000      -> 12345678.00000078 Inexact Rounded
3385fmax362056 fma  1   12345678 0.0000000750000000      -> 12345678.00000008 Inexact Rounded
3386fmax362057 fma  1   12345678 0.0000000050000000      -> 12345678.00000000 Inexact Rounded
3387fmax362060 fma  1   12345678 0.0234567750000001      -> 12345678.02345678 Inexact Rounded
3388fmax362061 fma  1   12345678 0.0034567750000001      -> 12345678.00345678 Inexact Rounded
3389fmax362062 fma  1   12345678 0.0004567750000001      -> 12345678.00045678 Inexact Rounded
3390fmax362063 fma  1   12345678 0.0000567750000001      -> 12345678.00005678 Inexact Rounded
3391fmax362064 fma  1   12345678 0.0000067750000001      -> 12345678.00000678 Inexact Rounded
3392fmax362065 fma  1   12345678 0.0000007750000001      -> 12345678.00000078 Inexact Rounded
3393fmax362066 fma  1   12345678 0.0000000750000001      -> 12345678.00000008 Inexact Rounded
3394fmax362067 fma  1   12345678 0.0000000050000001      -> 12345678.00000001 Inexact Rounded
3395-- far-out residues (full coefficient gap is 16+15 digits)
3396rounding: up
3397fmax362070 fma  1   12345678 1E-8                    -> 12345678.00000001
3398fmax362071 fma  1   12345678 1E-9                    -> 12345678.00000001 Inexact Rounded
3399fmax362072 fma  1   12345678 1E-10                   -> 12345678.00000001 Inexact Rounded
3400fmax362073 fma  1   12345678 1E-11                   -> 12345678.00000001 Inexact Rounded
3401fmax362074 fma  1   12345678 1E-12                   -> 12345678.00000001 Inexact Rounded
3402fmax362075 fma  1   12345678 1E-13                   -> 12345678.00000001 Inexact Rounded
3403fmax362076 fma  1   12345678 1E-14                   -> 12345678.00000001 Inexact Rounded
3404fmax362077 fma  1   12345678 1E-15                   -> 12345678.00000001 Inexact Rounded
3405fmax362078 fma  1   12345678 1E-16                   -> 12345678.00000001 Inexact Rounded
3406fmax362079 fma  1   12345678 1E-17                   -> 12345678.00000001 Inexact Rounded
3407fmax362080 fma  1   12345678 1E-18                   -> 12345678.00000001 Inexact Rounded
3408fmax362081 fma  1   12345678 1E-19                   -> 12345678.00000001 Inexact Rounded
3409fmax362082 fma  1   12345678 1E-20                   -> 12345678.00000001 Inexact Rounded
3410fmax362083 fma  1   12345678 1E-25                   -> 12345678.00000001 Inexact Rounded
3411fmax362084 fma  1   12345678 1E-30                   -> 12345678.00000001 Inexact Rounded
3412fmax362085 fma  1   12345678 1E-31                   -> 12345678.00000001 Inexact Rounded
3413fmax362086 fma  1   12345678 1E-32                   -> 12345678.00000001 Inexact Rounded
3414fmax362087 fma  1   12345678 1E-33                   -> 12345678.00000001 Inexact Rounded
3415fmax362088 fma  1   12345678 1E-34                   -> 12345678.00000001 Inexact Rounded
3416fmax362089 fma  1   12345678 1E-35                   -> 12345678.00000001 Inexact Rounded
3417
3418-- payload decapitate x3
3419precision: 5
3420fmax363000 fma  1 1  sNaN1234567890     ->  NaN67890  Invalid_operation
3421fmax363001 fma    1 -sNaN1234512345 1   -> -NaN12345  Invalid_operation
3422fmax363002 fma       sNaN1234554321 1 1 ->  NaN54321  Invalid_operation
3423
3424-- Null tests
3425fmax39990 fma  1   10  # -> NaN Invalid_operation
3426fmax39991 fma  1    # 10 -> NaN Invalid_operation
3427