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