1------------------------------------------------------------------------ 2-- ddFMA.decTest -- decDouble Fused Multiply Add -- 3-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. -- 4------------------------------------------------------------------------ 5-- Please see the document "General Decimal Arithmetic Testcases" -- 6-- at http://www2.hursley.ibm.com/decimal for the description of -- 7-- these testcases. -- 8-- -- 9-- These testcases are experimental ('beta' versions), and they -- 10-- may contain errors. They are offered on an as-is basis. In -- 11-- particular, achieving the same results as the tests here is not -- 12-- a guarantee that an implementation complies with any Standard -- 13-- or specification. The tests are not exhaustive. -- 14-- -- 15-- Please send comments, suggestions, and corrections to the author: -- 16-- Mike Cowlishaw, IBM Fellow -- 17-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- 18-- mfc@uk.ibm.com -- 19------------------------------------------------------------------------ 20version: 2.59 21 22precision: 16 23maxExponent: 384 24minExponent: -383 25extended: 1 26clamp: 1 27rounding: half_even 28 29-- These tests comprese three parts: 30-- 1. Sanity checks and other three-operand tests (especially those 31-- where the fused operation makes a difference) 32-- 2. Multiply tests (third operand is neutral zero [0E+emax]) 33-- 3. Addition tests (first operand is 1) 34-- The multiply and addition tests are extensive because FMA may have 35-- its own dedicated multiplication or addition routine(s), and they 36-- also inherently check the left-to-right properties. 37 38-- Sanity checks 39ddfma0001 fma 1 1 1 -> 2 40ddfma0002 fma 1 1 2 -> 3 41ddfma0003 fma 2 2 3 -> 7 42ddfma0004 fma 9 9 9 -> 90 43ddfma0005 fma -1 1 1 -> 0 44ddfma0006 fma -1 1 2 -> 1 45ddfma0007 fma -2 2 3 -> -1 46ddfma0008 fma -9 9 9 -> -72 47ddfma0011 fma 1 -1 1 -> 0 48ddfma0012 fma 1 -1 2 -> 1 49ddfma0013 fma 2 -2 3 -> -1 50ddfma0014 fma 9 -9 9 -> -72 51ddfma0015 fma 1 1 -1 -> 0 52ddfma0016 fma 1 1 -2 -> -1 53ddfma0017 fma 2 2 -3 -> 1 54ddfma0018 fma 9 9 -9 -> 72 55 56-- non-integer exacts 57ddfma0100 fma 25.2 63.6 -438 -> 1164.72 58ddfma0101 fma 0.301 0.380 334 -> 334.114380 59ddfma0102 fma 49.2 -4.8 23.3 -> -212.86 60ddfma0103 fma 4.22 0.079 -94.6 -> -94.26662 61ddfma0104 fma 903 0.797 0.887 -> 720.578 62ddfma0105 fma 6.13 -161 65.9 -> -921.03 63ddfma0106 fma 28.2 727 5.45 -> 20506.85 64ddfma0107 fma 4 605 688 -> 3108 65ddfma0108 fma 93.3 0.19 0.226 -> 17.953 66ddfma0109 fma 0.169 -341 5.61 -> -52.019 67ddfma0110 fma -72.2 30 -51.2 -> -2217.2 68ddfma0111 fma -0.409 13 20.4 -> 15.083 69ddfma0112 fma 317 77.0 19.0 -> 24428.0 70ddfma0113 fma 47 6.58 1.62 -> 310.88 71ddfma0114 fma 1.36 0.984 0.493 -> 1.83124 72ddfma0115 fma 72.7 274 1.56 -> 19921.36 73ddfma0116 fma 335 847 83 -> 283828 74ddfma0117 fma 666 0.247 25.4 -> 189.902 75ddfma0118 fma -3.87 3.06 78.0 -> 66.1578 76ddfma0119 fma 0.742 192 35.6 -> 178.064 77ddfma0120 fma -91.6 5.29 0.153 -> -484.411 78 79-- cases where result is different from separate multiply + add; each 80-- is preceded by the result of unfused multiply and add 81-- [this is about 20% of all similar cases in general] 82-- -> 7.123356429257969E+16 83ddfma0201 fma 27583489.6645 2582471078.04 2593183.42371 -> 7.123356429257970E+16 Inexact Rounded 84-- -> 22813275328.80506 85ddfma0208 fma 24280.355566 939577.397653 2032.013252 -> 22813275328.80507 Inexact Rounded 86-- -> -2.030397734278062E+16 87ddfma0209 fma 7848976432 -2586831.2281 137903.517909 -> -2.030397734278061E+16 Inexact Rounded 88-- -> 2040774094814.077 89ddfma0217 fma 56890.388731 35872030.4255 339337.123410 -> 2040774094814.078 Inexact Rounded 90-- -> 2.714469575205049E+18 91ddfma0220 fma 7533543.57445 360317763928 5073392.31638 -> 2.714469575205050E+18 Inexact Rounded 92-- -> 1.011676297716716E+19 93ddfma0223 fma 739945255.563 13672312784.1 -994381.53572 -> 1.011676297716715E+19 Inexact Rounded 94-- -> -2.914135721455315E+23 95ddfma0224 fma -413510957218 704729988550 9234162614.0 -> -2.914135721455314E+23 Inexact Rounded 96-- -> 2.620119863365786E+17 97ddfma0226 fma 437484.00601 598906432790 894450638.442 -> 2.620119863365787E+17 Inexact Rounded 98-- -> 1.272647995808178E+19 99ddfma0253 fma 73287556929 173651305.784 -358312568.389 -> 1.272647995808177E+19 Inexact Rounded 100-- -> -1.753769320861851E+18 101ddfma0257 fma 203258304486 -8628278.8066 153127.446727 -> -1.753769320861850E+18 Inexact Rounded 102-- -> -1.550737835263346E+17 103ddfma0260 fma 42560533.1774 -3643605282.86 178277.96377 -> -1.550737835263347E+17 Inexact Rounded 104-- -> 2.897624620576005E+22 105ddfma0269 fma 142656587375 203118879670 604576103991 -> 2.897624620576004E+22 Inexact Rounded 106 107-- Cases where multiply would overflow or underflow if separate 108fma0300 fma 9e+384 10 0 -> Infinity Overflow Inexact Rounded 109fma0301 fma 1e+384 10 0 -> Infinity Overflow Inexact Rounded 110fma0302 fma 1e+384 10 -1e+384 -> 9.000000000000000E+384 Clamped 111fma0303 fma 1e+384 10 -9e+384 -> 1.000000000000000E+384 Clamped 112-- subnormal etc. 113fma0305 fma 1e-398 0.1 0 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 114fma0306 fma 1e-398 0.1 1 -> 1.000000000000000 Inexact Rounded 115fma0307 fma 1e-398 0.1 1e-398 -> 1E-398 Underflow Subnormal Inexact Rounded 116 117-- Infinite combinations 118ddfma0800 fma Inf Inf Inf -> Infinity 119ddfma0801 fma Inf Inf -Inf -> NaN Invalid_operation 120ddfma0802 fma Inf -Inf Inf -> NaN Invalid_operation 121ddfma0803 fma Inf -Inf -Inf -> -Infinity 122ddfma0804 fma -Inf Inf Inf -> NaN Invalid_operation 123ddfma0805 fma -Inf Inf -Inf -> -Infinity 124ddfma0806 fma -Inf -Inf Inf -> Infinity 125ddfma0807 fma -Inf -Inf -Inf -> NaN Invalid_operation 126 127-- Triple NaN propagation 128ddfma0900 fma NaN2 NaN3 NaN5 -> NaN2 129ddfma0901 fma 0 NaN3 NaN5 -> NaN3 130ddfma0902 fma 0 0 NaN5 -> NaN5 131-- first sNaN wins (consider qNaN from earlier sNaN being 132-- overridden by an sNaN in third operand) 133ddfma0903 fma sNaN1 sNaN2 sNaN3 -> NaN1 Invalid_operation 134ddfma0904 fma 0 sNaN2 sNaN3 -> NaN2 Invalid_operation 135ddfma0905 fma 0 0 sNaN3 -> NaN3 Invalid_operation 136ddfma0906 fma sNaN1 sNaN2 sNaN3 -> NaN1 Invalid_operation 137ddfma0907 fma NaN7 sNaN2 sNaN3 -> NaN2 Invalid_operation 138ddfma0908 fma NaN7 NaN5 sNaN3 -> NaN3 Invalid_operation 139 140-- MULTIPLICATION TESTS ------------------------------------------------ 141 142-- sanity checks 143ddfma2000 fma 2 2 0e+384 -> 4 144ddfma2001 fma 2 3 0e+384 -> 6 145ddfma2002 fma 5 1 0e+384 -> 5 146ddfma2003 fma 5 2 0e+384 -> 10 147ddfma2004 fma 1.20 2 0e+384 -> 2.40 148ddfma2005 fma 1.20 0 0e+384 -> 0.00 149ddfma2006 fma 1.20 -2 0e+384 -> -2.40 150ddfma2007 fma -1.20 2 0e+384 -> -2.40 151ddfma2008 fma -1.20 0 0e+384 -> 0.00 152ddfma2009 fma -1.20 -2 0e+384 -> 2.40 153ddfma2010 fma 5.09 7.1 0e+384 -> 36.139 154ddfma2011 fma 2.5 4 0e+384 -> 10.0 155ddfma2012 fma 2.50 4 0e+384 -> 10.00 156ddfma2013 fma 1.23456789 1.00000000 0e+384 -> 1.234567890000000 Rounded 157ddfma2015 fma 2.50 4 0e+384 -> 10.00 158ddfma2016 fma 9.999999999 9.999999999 0e+384 -> 99.99999998000000 Inexact Rounded 159ddfma2017 fma 9.999999999 -9.999999999 0e+384 -> -99.99999998000000 Inexact Rounded 160ddfma2018 fma -9.999999999 9.999999999 0e+384 -> -99.99999998000000 Inexact Rounded 161ddfma2019 fma -9.999999999 -9.999999999 0e+384 -> 99.99999998000000 Inexact Rounded 162 163-- zeros, etc. 164ddfma2021 fma 0 0 0e+384 -> 0 165ddfma2022 fma 0 -0 0e+384 -> 0 166ddfma2023 fma -0 0 0e+384 -> 0 167ddfma2024 fma -0 -0 0e+384 -> 0 168ddfma2025 fma -0.0 -0.0 0e+384 -> 0.00 169ddfma2026 fma -0.0 -0.0 0e+384 -> 0.00 170ddfma2027 fma -0.0 -0.0 0e+384 -> 0.00 171ddfma2028 fma -0.0 -0.0 0e+384 -> 0.00 172ddfma2030 fma 5.00 1E-3 0e+384 -> 0.00500 173ddfma2031 fma 00.00 0.000 0e+384 -> 0.00000 174ddfma2032 fma 00.00 0E-3 0e+384 -> 0.00000 -- rhs is 0 175ddfma2033 fma 0E-3 00.00 0e+384 -> 0.00000 -- lhs is 0 176ddfma2034 fma -5.00 1E-3 0e+384 -> -0.00500 177ddfma2035 fma -00.00 0.000 0e+384 -> 0.00000 178ddfma2036 fma -00.00 0E-3 0e+384 -> 0.00000 -- rhs is 0 179ddfma2037 fma -0E-3 00.00 0e+384 -> 0.00000 -- lhs is 0 180ddfma2038 fma 5.00 -1E-3 0e+384 -> -0.00500 181ddfma2039 fma 00.00 -0.000 0e+384 -> 0.00000 182ddfma2040 fma 00.00 -0E-3 0e+384 -> 0.00000 -- rhs is 0 183ddfma2041 fma 0E-3 -00.00 0e+384 -> 0.00000 -- lhs is 0 184ddfma2042 fma -5.00 -1E-3 0e+384 -> 0.00500 185ddfma2043 fma -00.00 -0.000 0e+384 -> 0.00000 186ddfma2044 fma -00.00 -0E-3 0e+384 -> 0.00000 -- rhs is 0 187ddfma2045 fma -0E-3 -00.00 -0e+384 -> 0.00000 -- lhs is 0 188ddfma2046 fma -0E-3 00.00 -0e+384 -> -0.00000 189ddfma2047 fma 0E-3 -00.00 -0e+384 -> -0.00000 190ddfma2048 fma 0E-3 00.00 -0e+384 -> 0.00000 191 192-- examples from decarith 193ddfma2050 fma 1.20 3 0e+384 -> 3.60 194ddfma2051 fma 7 3 0e+384 -> 21 195ddfma2052 fma 0.9 0.8 0e+384 -> 0.72 196ddfma2053 fma 0.9 -0 0e+384 -> 0.0 197ddfma2054 fma 654321 654321 0e+384 -> 428135971041 198 199ddfma2060 fma 123.45 1e7 0e+384 -> 1.2345E+9 200ddfma2061 fma 123.45 1e8 0e+384 -> 1.2345E+10 201ddfma2062 fma 123.45 1e+9 0e+384 -> 1.2345E+11 202ddfma2063 fma 123.45 1e10 0e+384 -> 1.2345E+12 203ddfma2064 fma 123.45 1e11 0e+384 -> 1.2345E+13 204ddfma2065 fma 123.45 1e12 0e+384 -> 1.2345E+14 205ddfma2066 fma 123.45 1e13 0e+384 -> 1.2345E+15 206 207 208-- test some intermediate lengths 209-- 1234567890123456 210ddfma2080 fma 0.1 1230123456456789 0e+384 -> 123012345645678.9 211ddfma2084 fma 0.1 1230123456456789 0e+384 -> 123012345645678.9 212ddfma2090 fma 1230123456456789 0.1 0e+384 -> 123012345645678.9 213ddfma2094 fma 1230123456456789 0.1 0e+384 -> 123012345645678.9 214 215-- test some more edge cases and carries 216ddfma2101 fma 9 9 0e+384 -> 81 217ddfma2102 fma 9 90 0e+384 -> 810 218ddfma2103 fma 9 900 0e+384 -> 8100 219ddfma2104 fma 9 9000 0e+384 -> 81000 220ddfma2105 fma 9 90000 0e+384 -> 810000 221ddfma2106 fma 9 900000 0e+384 -> 8100000 222ddfma2107 fma 9 9000000 0e+384 -> 81000000 223ddfma2108 fma 9 90000000 0e+384 -> 810000000 224ddfma2109 fma 9 900000000 0e+384 -> 8100000000 225ddfma2110 fma 9 9000000000 0e+384 -> 81000000000 226ddfma2111 fma 9 90000000000 0e+384 -> 810000000000 227ddfma2112 fma 9 900000000000 0e+384 -> 8100000000000 228ddfma2113 fma 9 9000000000000 0e+384 -> 81000000000000 229ddfma2114 fma 9 90000000000000 0e+384 -> 810000000000000 230ddfma2115 fma 9 900000000000000 0e+384 -> 8100000000000000 231--ddfma2116 fma 9 9000000000000000 0e+384 -> 81000000000000000 232--ddfma2117 fma 9 90000000000000000 0e+384 -> 810000000000000000 233--ddfma2118 fma 9 900000000000000000 0e+384 -> 8100000000000000000 234--ddfma2119 fma 9 9000000000000000000 0e+384 -> 81000000000000000000 235--ddfma2120 fma 9 90000000000000000000 0e+384 -> 810000000000000000000 236--ddfma2121 fma 9 900000000000000000000 0e+384 -> 8100000000000000000000 237--ddfma2122 fma 9 9000000000000000000000 0e+384 -> 81000000000000000000000 238--ddfma2123 fma 9 90000000000000000000000 0e+384 -> 810000000000000000000000 239-- test some more edge cases without carries 240ddfma2131 fma 3 3 0e+384 -> 9 241ddfma2132 fma 3 30 0e+384 -> 90 242ddfma2133 fma 3 300 0e+384 -> 900 243ddfma2134 fma 3 3000 0e+384 -> 9000 244ddfma2135 fma 3 30000 0e+384 -> 90000 245ddfma2136 fma 3 300000 0e+384 -> 900000 246ddfma2137 fma 3 3000000 0e+384 -> 9000000 247ddfma2138 fma 3 30000000 0e+384 -> 90000000 248ddfma2139 fma 3 300000000 0e+384 -> 900000000 249ddfma2140 fma 3 3000000000 0e+384 -> 9000000000 250ddfma2141 fma 3 30000000000 0e+384 -> 90000000000 251ddfma2142 fma 3 300000000000 0e+384 -> 900000000000 252ddfma2143 fma 3 3000000000000 0e+384 -> 9000000000000 253ddfma2144 fma 3 30000000000000 0e+384 -> 90000000000000 254ddfma2145 fma 3 300000000000000 0e+384 -> 900000000000000 255 256-- test some edge cases with exact rounding 257ddfma2301 fma 9 9 0e+384 -> 81 258ddfma2302 fma 9 90 0e+384 -> 810 259ddfma2303 fma 9 900 0e+384 -> 8100 260ddfma2304 fma 9 9000 0e+384 -> 81000 261ddfma2305 fma 9 90000 0e+384 -> 810000 262ddfma2306 fma 9 900000 0e+384 -> 8100000 263ddfma2307 fma 9 9000000 0e+384 -> 81000000 264ddfma2308 fma 9 90000000 0e+384 -> 810000000 265ddfma2309 fma 9 900000000 0e+384 -> 8100000000 266ddfma2310 fma 9 9000000000 0e+384 -> 81000000000 267ddfma2311 fma 9 90000000000 0e+384 -> 810000000000 268ddfma2312 fma 9 900000000000 0e+384 -> 8100000000000 269ddfma2313 fma 9 9000000000000 0e+384 -> 81000000000000 270ddfma2314 fma 9 90000000000000 0e+384 -> 810000000000000 271ddfma2315 fma 9 900000000000000 0e+384 -> 8100000000000000 272ddfma2316 fma 9 9000000000000000 0e+384 -> 8.100000000000000E+16 Rounded 273ddfma2317 fma 90 9000000000000000 0e+384 -> 8.100000000000000E+17 Rounded 274ddfma2318 fma 900 9000000000000000 0e+384 -> 8.100000000000000E+18 Rounded 275ddfma2319 fma 9000 9000000000000000 0e+384 -> 8.100000000000000E+19 Rounded 276ddfma2320 fma 90000 9000000000000000 0e+384 -> 8.100000000000000E+20 Rounded 277ddfma2321 fma 900000 9000000000000000 0e+384 -> 8.100000000000000E+21 Rounded 278ddfma2322 fma 9000000 9000000000000000 0e+384 -> 8.100000000000000E+22 Rounded 279ddfma2323 fma 90000000 9000000000000000 0e+384 -> 8.100000000000000E+23 Rounded 280 281-- tryzeros cases 282ddfma2504 fma 0E-260 1000E-260 0e+384 -> 0E-398 Clamped 283ddfma2505 fma 100E+260 0E+260 0e+384 -> 0E+369 Clamped 284 285-- mixed with zeros 286ddfma2541 fma 0 -1 0e+384 -> 0 287ddfma2542 fma -0 -1 0e+384 -> 0 288ddfma2543 fma 0 1 0e+384 -> 0 289ddfma2544 fma -0 1 0e+384 -> 0 290ddfma2545 fma -1 0 0e+384 -> 0 291ddfma2546 fma -1 -0 0e+384 -> 0 292ddfma2547 fma 1 0 0e+384 -> 0 293ddfma2548 fma 1 -0 0e+384 -> 0 294 295ddfma2551 fma 0.0 -1 0e+384 -> 0.0 296ddfma2552 fma -0.0 -1 0e+384 -> 0.0 297ddfma2553 fma 0.0 1 0e+384 -> 0.0 298ddfma2554 fma -0.0 1 0e+384 -> 0.0 299ddfma2555 fma -1.0 0 0e+384 -> 0.0 300ddfma2556 fma -1.0 -0 0e+384 -> 0.0 301ddfma2557 fma 1.0 0 0e+384 -> 0.0 302ddfma2558 fma 1.0 -0 0e+384 -> 0.0 303 304ddfma2561 fma 0 -1.0 0e+384 -> 0.0 305ddfma2562 fma -0 -1.0 0e+384 -> 0.0 306ddfma2563 fma 0 1.0 0e+384 -> 0.0 307ddfma2564 fma -0 1.0 0e+384 -> 0.0 308ddfma2565 fma -1 0.0 0e+384 -> 0.0 309ddfma2566 fma -1 -0.0 0e+384 -> 0.0 310ddfma2567 fma 1 0.0 0e+384 -> 0.0 311ddfma2568 fma 1 -0.0 0e+384 -> 0.0 312 313ddfma2571 fma 0.0 -1.0 0e+384 -> 0.00 314ddfma2572 fma -0.0 -1.0 0e+384 -> 0.00 315ddfma2573 fma 0.0 1.0 0e+384 -> 0.00 316ddfma2574 fma -0.0 1.0 0e+384 -> 0.00 317ddfma2575 fma -1.0 0.0 0e+384 -> 0.00 318ddfma2576 fma -1.0 -0.0 0e+384 -> 0.00 319ddfma2577 fma 1.0 0.0 0e+384 -> 0.00 320ddfma2578 fma 1.0 -0.0 0e+384 -> 0.00 321 322-- Specials 323ddfma2580 fma Inf -Inf 0e+384 -> -Infinity 324ddfma2581 fma Inf -1000 0e+384 -> -Infinity 325ddfma2582 fma Inf -1 0e+384 -> -Infinity 326ddfma2583 fma Inf -0 0e+384 -> NaN Invalid_operation 327ddfma2584 fma Inf 0 0e+384 -> NaN Invalid_operation 328ddfma2585 fma Inf 1 0e+384 -> Infinity 329ddfma2586 fma Inf 1000 0e+384 -> Infinity 330ddfma2587 fma Inf Inf 0e+384 -> Infinity 331ddfma2588 fma -1000 Inf 0e+384 -> -Infinity 332ddfma2589 fma -Inf Inf 0e+384 -> -Infinity 333ddfma2590 fma -1 Inf 0e+384 -> -Infinity 334ddfma2591 fma -0 Inf 0e+384 -> NaN Invalid_operation 335ddfma2592 fma 0 Inf 0e+384 -> NaN Invalid_operation 336ddfma2593 fma 1 Inf 0e+384 -> Infinity 337ddfma2594 fma 1000 Inf 0e+384 -> Infinity 338ddfma2595 fma Inf Inf 0e+384 -> Infinity 339 340ddfma2600 fma -Inf -Inf 0e+384 -> Infinity 341ddfma2601 fma -Inf -1000 0e+384 -> Infinity 342ddfma2602 fma -Inf -1 0e+384 -> Infinity 343ddfma2603 fma -Inf -0 0e+384 -> NaN Invalid_operation 344ddfma2604 fma -Inf 0 0e+384 -> NaN Invalid_operation 345ddfma2605 fma -Inf 1 0e+384 -> -Infinity 346ddfma2606 fma -Inf 1000 0e+384 -> -Infinity 347ddfma2607 fma -Inf Inf 0e+384 -> -Infinity 348ddfma2608 fma -1000 Inf 0e+384 -> -Infinity 349ddfma2609 fma -Inf -Inf 0e+384 -> Infinity 350ddfma2610 fma -1 -Inf 0e+384 -> Infinity 351ddfma2611 fma -0 -Inf 0e+384 -> NaN Invalid_operation 352ddfma2612 fma 0 -Inf 0e+384 -> NaN Invalid_operation 353ddfma2613 fma 1 -Inf 0e+384 -> -Infinity 354ddfma2614 fma 1000 -Inf 0e+384 -> -Infinity 355ddfma2615 fma Inf -Inf 0e+384 -> -Infinity 356 357ddfma2621 fma NaN -Inf 0e+384 -> NaN 358ddfma2622 fma NaN -1000 0e+384 -> NaN 359ddfma2623 fma NaN -1 0e+384 -> NaN 360ddfma2624 fma NaN -0 0e+384 -> NaN 361ddfma2625 fma NaN 0 0e+384 -> NaN 362ddfma2626 fma NaN 1 0e+384 -> NaN 363ddfma2627 fma NaN 1000 0e+384 -> NaN 364ddfma2628 fma NaN Inf 0e+384 -> NaN 365ddfma2629 fma NaN NaN 0e+384 -> NaN 366ddfma2630 fma -Inf NaN 0e+384 -> NaN 367ddfma2631 fma -1000 NaN 0e+384 -> NaN 368ddfma2632 fma -1 NaN 0e+384 -> NaN 369ddfma2633 fma -0 NaN 0e+384 -> NaN 370ddfma2634 fma 0 NaN 0e+384 -> NaN 371ddfma2635 fma 1 NaN 0e+384 -> NaN 372ddfma2636 fma 1000 NaN 0e+384 -> NaN 373ddfma2637 fma Inf NaN 0e+384 -> NaN 374 375ddfma2641 fma sNaN -Inf 0e+384 -> NaN Invalid_operation 376ddfma2642 fma sNaN -1000 0e+384 -> NaN Invalid_operation 377ddfma2643 fma sNaN -1 0e+384 -> NaN Invalid_operation 378ddfma2644 fma sNaN -0 0e+384 -> NaN Invalid_operation 379ddfma2645 fma sNaN 0 0e+384 -> NaN Invalid_operation 380ddfma2646 fma sNaN 1 0e+384 -> NaN Invalid_operation 381ddfma2647 fma sNaN 1000 0e+384 -> NaN Invalid_operation 382ddfma2648 fma sNaN NaN 0e+384 -> NaN Invalid_operation 383ddfma2649 fma sNaN sNaN 0e+384 -> NaN Invalid_operation 384ddfma2650 fma NaN sNaN 0e+384 -> NaN Invalid_operation 385ddfma2651 fma -Inf sNaN 0e+384 -> NaN Invalid_operation 386ddfma2652 fma -1000 sNaN 0e+384 -> NaN Invalid_operation 387ddfma2653 fma -1 sNaN 0e+384 -> NaN Invalid_operation 388ddfma2654 fma -0 sNaN 0e+384 -> NaN Invalid_operation 389ddfma2655 fma 0 sNaN 0e+384 -> NaN Invalid_operation 390ddfma2656 fma 1 sNaN 0e+384 -> NaN Invalid_operation 391ddfma2657 fma 1000 sNaN 0e+384 -> NaN Invalid_operation 392ddfma2658 fma Inf sNaN 0e+384 -> NaN Invalid_operation 393ddfma2659 fma NaN sNaN 0e+384 -> NaN Invalid_operation 394 395-- propagating NaNs 396ddfma2661 fma NaN9 -Inf 0e+384 -> NaN9 397ddfma2662 fma NaN8 999 0e+384 -> NaN8 398ddfma2663 fma NaN71 Inf 0e+384 -> NaN71 399ddfma2664 fma NaN6 NaN5 0e+384 -> NaN6 400ddfma2665 fma -Inf NaN4 0e+384 -> NaN4 401ddfma2666 fma -999 NaN33 0e+384 -> NaN33 402ddfma2667 fma Inf NaN2 0e+384 -> NaN2 403 404ddfma2671 fma sNaN99 -Inf 0e+384 -> NaN99 Invalid_operation 405ddfma2672 fma sNaN98 -11 0e+384 -> NaN98 Invalid_operation 406ddfma2673 fma sNaN97 NaN 0e+384 -> NaN97 Invalid_operation 407ddfma2674 fma sNaN16 sNaN94 0e+384 -> NaN16 Invalid_operation 408ddfma2675 fma NaN95 sNaN93 0e+384 -> NaN93 Invalid_operation 409ddfma2676 fma -Inf sNaN92 0e+384 -> NaN92 Invalid_operation 410ddfma2677 fma 088 sNaN91 0e+384 -> NaN91 Invalid_operation 411ddfma2678 fma Inf sNaN90 0e+384 -> NaN90 Invalid_operation 412ddfma2679 fma NaN sNaN89 0e+384 -> NaN89 Invalid_operation 413 414ddfma2681 fma -NaN9 -Inf 0e+384 -> -NaN9 415ddfma2682 fma -NaN8 999 0e+384 -> -NaN8 416ddfma2683 fma -NaN71 Inf 0e+384 -> -NaN71 417ddfma2684 fma -NaN6 -NaN5 0e+384 -> -NaN6 418ddfma2685 fma -Inf -NaN4 0e+384 -> -NaN4 419ddfma2686 fma -999 -NaN33 0e+384 -> -NaN33 420ddfma2687 fma Inf -NaN2 0e+384 -> -NaN2 421 422ddfma2691 fma -sNaN99 -Inf 0e+384 -> -NaN99 Invalid_operation 423ddfma2692 fma -sNaN98 -11 0e+384 -> -NaN98 Invalid_operation 424ddfma2693 fma -sNaN97 NaN 0e+384 -> -NaN97 Invalid_operation 425ddfma2694 fma -sNaN16 -sNaN94 0e+384 -> -NaN16 Invalid_operation 426ddfma2695 fma -NaN95 -sNaN93 0e+384 -> -NaN93 Invalid_operation 427ddfma2696 fma -Inf -sNaN92 0e+384 -> -NaN92 Invalid_operation 428ddfma2697 fma 088 -sNaN91 0e+384 -> -NaN91 Invalid_operation 429ddfma2698 fma Inf -sNaN90 0e+384 -> -NaN90 Invalid_operation 430ddfma2699 fma -NaN -sNaN89 0e+384 -> -NaN89 Invalid_operation 431 432ddfma2701 fma -NaN -Inf 0e+384 -> -NaN 433ddfma2702 fma -NaN 999 0e+384 -> -NaN 434ddfma2703 fma -NaN Inf 0e+384 -> -NaN 435ddfma2704 fma -NaN -NaN 0e+384 -> -NaN 436ddfma2705 fma -Inf -NaN0 0e+384 -> -NaN 437ddfma2706 fma -999 -NaN 0e+384 -> -NaN 438ddfma2707 fma Inf -NaN 0e+384 -> -NaN 439 440ddfma2711 fma -sNaN -Inf 0e+384 -> -NaN Invalid_operation 441ddfma2712 fma -sNaN -11 0e+384 -> -NaN Invalid_operation 442ddfma2713 fma -sNaN00 NaN 0e+384 -> -NaN Invalid_operation 443ddfma2714 fma -sNaN -sNaN 0e+384 -> -NaN Invalid_operation 444ddfma2715 fma -NaN -sNaN 0e+384 -> -NaN Invalid_operation 445ddfma2716 fma -Inf -sNaN 0e+384 -> -NaN Invalid_operation 446ddfma2717 fma 088 -sNaN 0e+384 -> -NaN Invalid_operation 447ddfma2718 fma Inf -sNaN 0e+384 -> -NaN Invalid_operation 448ddfma2719 fma -NaN -sNaN 0e+384 -> -NaN Invalid_operation 449 450-- overflow and underflow tests .. note subnormal results 451-- signs 452ddfma2751 fma 1e+277 1e+311 0e+384 -> Infinity Overflow Inexact Rounded 453ddfma2752 fma 1e+277 -1e+311 0e+384 -> -Infinity Overflow Inexact Rounded 454ddfma2753 fma -1e+277 1e+311 0e+384 -> -Infinity Overflow Inexact Rounded 455ddfma2754 fma -1e+277 -1e+311 0e+384 -> Infinity Overflow Inexact Rounded 456ddfma2755 fma 1e-277 1e-311 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 457ddfma2756 fma 1e-277 -1e-311 0e+384 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 458ddfma2757 fma -1e-277 1e-311 0e+384 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 459ddfma2758 fma -1e-277 -1e-311 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 460 461-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic) 462ddfma2760 fma 1e-291 1e-101 0e+384 -> 1E-392 Subnormal 463ddfma2761 fma 1e-291 1e-102 0e+384 -> 1E-393 Subnormal 464ddfma2762 fma 1e-291 1e-103 0e+384 -> 1E-394 Subnormal 465ddfma2763 fma 1e-291 1e-104 0e+384 -> 1E-395 Subnormal 466ddfma2764 fma 1e-291 1e-105 0e+384 -> 1E-396 Subnormal 467ddfma2765 fma 1e-291 1e-106 0e+384 -> 1E-397 Subnormal 468ddfma2766 fma 1e-291 1e-107 0e+384 -> 1E-398 Subnormal 469ddfma2767 fma 1e-291 1e-108 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 470ddfma2768 fma 1e-291 1e-109 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 471ddfma2769 fma 1e-291 1e-110 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 472-- [no equivalent of 'subnormal' for overflow] 473ddfma2770 fma 1e+60 1e+321 0e+384 -> 1.000000000000E+381 Clamped 474ddfma2771 fma 1e+60 1e+322 0e+384 -> 1.0000000000000E+382 Clamped 475ddfma2772 fma 1e+60 1e+323 0e+384 -> 1.00000000000000E+383 Clamped 476ddfma2773 fma 1e+60 1e+324 0e+384 -> 1.000000000000000E+384 Clamped 477ddfma2774 fma 1e+60 1e+325 0e+384 -> Infinity Overflow Inexact Rounded 478ddfma2775 fma 1e+60 1e+326 0e+384 -> Infinity Overflow Inexact Rounded 479ddfma2776 fma 1e+60 1e+327 0e+384 -> Infinity Overflow Inexact Rounded 480ddfma2777 fma 1e+60 1e+328 0e+384 -> Infinity Overflow Inexact Rounded 481ddfma2778 fma 1e+60 1e+329 0e+384 -> Infinity Overflow Inexact Rounded 482ddfma2779 fma 1e+60 1e+330 0e+384 -> Infinity Overflow Inexact Rounded 483 484ddfma2801 fma 1.0000E-394 1 0e+384 -> 1.0000E-394 Subnormal 485ddfma2802 fma 1.000E-394 1e-1 0e+384 -> 1.000E-395 Subnormal 486ddfma2803 fma 1.00E-394 1e-2 0e+384 -> 1.00E-396 Subnormal 487ddfma2804 fma 1.0E-394 1e-3 0e+384 -> 1.0E-397 Subnormal 488ddfma2805 fma 1.0E-394 1e-4 0e+384 -> 1E-398 Subnormal Rounded 489ddfma2806 fma 1.3E-394 1e-4 0e+384 -> 1E-398 Underflow Subnormal Inexact Rounded 490ddfma2807 fma 1.5E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 491ddfma2808 fma 1.7E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 492ddfma2809 fma 2.3E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 493ddfma2810 fma 2.5E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 494ddfma2811 fma 2.7E-394 1e-4 0e+384 -> 3E-398 Underflow Subnormal Inexact Rounded 495ddfma2812 fma 1.49E-394 1e-4 0e+384 -> 1E-398 Underflow Subnormal Inexact Rounded 496ddfma2813 fma 1.50E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 497ddfma2814 fma 1.51E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 498ddfma2815 fma 2.49E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 499ddfma2816 fma 2.50E-394 1e-4 0e+384 -> 2E-398 Underflow Subnormal Inexact Rounded 500ddfma2817 fma 2.51E-394 1e-4 0e+384 -> 3E-398 Underflow Subnormal Inexact Rounded 501 502ddfma2818 fma 1E-394 1e-4 0e+384 -> 1E-398 Subnormal 503ddfma2819 fma 3E-394 1e-5 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 504ddfma2820 fma 5E-394 1e-5 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 505ddfma2821 fma 7E-394 1e-5 0e+384 -> 1E-398 Underflow Subnormal Inexact Rounded 506ddfma2822 fma 9E-394 1e-5 0e+384 -> 1E-398 Underflow Subnormal Inexact Rounded 507ddfma2823 fma 9.9E-394 1e-5 0e+384 -> 1E-398 Underflow Subnormal Inexact Rounded 508 509ddfma2824 fma 1E-394 -1e-4 0e+384 -> -1E-398 Subnormal 510ddfma2825 fma 3E-394 -1e-5 0e+384 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 511ddfma2826 fma -5E-394 1e-5 0e+384 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 512ddfma2827 fma 7E-394 -1e-5 0e+384 -> -1E-398 Underflow Subnormal Inexact Rounded 513ddfma2828 fma -9E-394 1e-5 0e+384 -> -1E-398 Underflow Subnormal Inexact Rounded 514ddfma2829 fma 9.9E-394 -1e-5 0e+384 -> -1E-398 Underflow Subnormal Inexact Rounded 515ddfma2830 fma 3.0E-394 -1e-5 0e+384 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped 516 517ddfma2831 fma 1.0E-199 1e-200 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped 518ddfma2832 fma 1.0E-199 1e-199 0e+384 -> 1E-398 Subnormal Rounded 519ddfma2833 fma 1.0E-199 1e-198 0e+384 -> 1.0E-397 Subnormal 520ddfma2834 fma 2.0E-199 2e-198 0e+384 -> 4.0E-397 Subnormal 521ddfma2835 fma 4.0E-199 4e-198 0e+384 -> 1.60E-396 Subnormal 522ddfma2836 fma 10.0E-199 10e-198 0e+384 -> 1.000E-395 Subnormal 523ddfma2837 fma 30.0E-199 30e-198 0e+384 -> 9.000E-395 Subnormal 524ddfma2838 fma 40.0E-199 40e-188 0e+384 -> 1.6000E-384 Subnormal 525ddfma2839 fma 40.0E-199 40e-187 0e+384 -> 1.6000E-383 526ddfma2840 fma 40.0E-199 40e-186 0e+384 -> 1.6000E-382 527 528-- Long operand overflow may be a different path 529ddfma2870 fma 100 9.999E+383 0e+384 -> Infinity Inexact Overflow Rounded 530ddfma2871 fma 100 -9.999E+383 0e+384 -> -Infinity Inexact Overflow Rounded 531ddfma2872 fma 9.999E+383 100 0e+384 -> Infinity Inexact Overflow Rounded 532ddfma2873 fma -9.999E+383 100 0e+384 -> -Infinity Inexact Overflow Rounded 533 534-- check for double-rounded subnormals 535ddfma2881 fma 1.2347E-355 1.2347E-40 0e+384 -> 1.524E-395 Inexact Rounded Subnormal Underflow 536ddfma2882 fma 1.234E-355 1.234E-40 0e+384 -> 1.523E-395 Inexact Rounded Subnormal Underflow 537ddfma2883 fma 1.23E-355 1.23E-40 0e+384 -> 1.513E-395 Inexact Rounded Subnormal Underflow 538ddfma2884 fma 1.2E-355 1.2E-40 0e+384 -> 1.44E-395 Subnormal 539ddfma2885 fma 1.2E-355 1.2E-41 0e+384 -> 1.44E-396 Subnormal 540ddfma2886 fma 1.2E-355 1.2E-42 0e+384 -> 1.4E-397 Subnormal Inexact Rounded Underflow 541ddfma2887 fma 1.2E-355 1.3E-42 0e+384 -> 1.6E-397 Subnormal Inexact Rounded Underflow 542ddfma2888 fma 1.3E-355 1.3E-42 0e+384 -> 1.7E-397 Subnormal Inexact Rounded Underflow 543ddfma2889 fma 1.3E-355 1.3E-43 0e+384 -> 2E-398 Subnormal Inexact Rounded Underflow 544ddfma2890 fma 1.3E-356 1.3E-43 0e+384 -> 0E-398 Clamped Subnormal Inexact Rounded Underflow 545 546ddfma2891 fma 1.2345E-39 1.234E-355 0e+384 -> 1.5234E-394 Inexact Rounded Subnormal Underflow 547ddfma2892 fma 1.23456E-39 1.234E-355 0e+384 -> 1.5234E-394 Inexact Rounded Subnormal Underflow 548ddfma2893 fma 1.2345E-40 1.234E-355 0e+384 -> 1.523E-395 Inexact Rounded Subnormal Underflow 549ddfma2894 fma 1.23456E-40 1.234E-355 0e+384 -> 1.523E-395 Inexact Rounded Subnormal Underflow 550ddfma2895 fma 1.2345E-41 1.234E-355 0e+384 -> 1.52E-396 Inexact Rounded Subnormal Underflow 551ddfma2896 fma 1.23456E-41 1.234E-355 0e+384 -> 1.52E-396 Inexact Rounded Subnormal Underflow 552 553-- Now explore the case where we get a normal result with Underflow 554ddfma2900 fma 0.3000000000E-191 0.3000000000E-191 0e+384 -> 9.00000000000000E-384 Subnormal Rounded 555ddfma2901 fma 0.3000000001E-191 0.3000000001E-191 0e+384 -> 9.00000000600000E-384 Underflow Inexact Subnormal Rounded 556ddfma2902 fma 9.999999999999999E-383 0.0999999999999 0e+384 -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded 557ddfma2903 fma 9.999999999999999E-383 0.09999999999999 0e+384 -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded 558ddfma2904 fma 9.999999999999999E-383 0.099999999999999 0e+384 -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded 559ddfma2905 fma 9.999999999999999E-383 0.0999999999999999 0e+384 -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded 560-- prove operands are exact 561ddfma2906 fma 9.999999999999999E-383 1 0e+384 -> 9.999999999999999E-383 562ddfma2907 fma 1 0.09999999999999999 0e+384 -> 0.09999999999999999 563-- the next rounds to Nmin 564ddfma2908 fma 9.999999999999999E-383 0.09999999999999999 0e+384 -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded 565 566-- hugest 567ddfma2909 fma 9999999999999999 9999999999999999 0e+384 -> 9.999999999999998E+31 Inexact Rounded 568 569-- Null tests 570ddfma2990 fma 10 # 0e+384 -> NaN Invalid_operation 571ddfma2991 fma # 10 0e+384 -> NaN Invalid_operation 572 573 574-- ADDITION TESTS ------------------------------------------------------ 575 576-- [first group are 'quick confidence check'] 577ddfma3001 fma 1 1 1 -> 2 578ddfma3002 fma 1 2 3 -> 5 579ddfma3003 fma 1 '5.75' '3.3' -> 9.05 580ddfma3004 fma 1 '5' '-3' -> 2 581ddfma3005 fma 1 '-5' '-3' -> -8 582ddfma3006 fma 1 '-7' '2.5' -> -4.5 583ddfma3007 fma 1 '0.7' '0.3' -> 1.0 584ddfma3008 fma 1 '1.25' '1.25' -> 2.50 585ddfma3009 fma 1 '1.23456789' '1.00000000' -> '2.23456789' 586ddfma3010 fma 1 '1.23456789' '1.00000011' -> '2.23456800' 587 588-- 1234567890123456 1234567890123456 589ddfma3011 fma 1 '0.4444444444444446' '0.5555555555555555' -> '1.000000000000000' Inexact Rounded 590ddfma3012 fma 1 '0.4444444444444445' '0.5555555555555555' -> '1.000000000000000' Rounded 591ddfma3013 fma 1 '0.4444444444444444' '0.5555555555555555' -> '0.9999999999999999' 592ddfma3014 fma 1 '4444444444444444' '0.49' -> '4444444444444444' Inexact Rounded 593ddfma3015 fma 1 '4444444444444444' '0.499' -> '4444444444444444' Inexact Rounded 594ddfma3016 fma 1 '4444444444444444' '0.4999' -> '4444444444444444' Inexact Rounded 595ddfma3017 fma 1 '4444444444444444' '0.5000' -> '4444444444444444' Inexact Rounded 596ddfma3018 fma 1 '4444444444444444' '0.5001' -> '4444444444444445' Inexact Rounded 597ddfma3019 fma 1 '4444444444444444' '0.501' -> '4444444444444445' Inexact Rounded 598ddfma3020 fma 1 '4444444444444444' '0.51' -> '4444444444444445' Inexact Rounded 599 600ddfma3021 fma 1 0 1 -> 1 601ddfma3022 fma 1 1 1 -> 2 602ddfma3023 fma 1 2 1 -> 3 603ddfma3024 fma 1 3 1 -> 4 604ddfma3025 fma 1 4 1 -> 5 605ddfma3026 fma 1 5 1 -> 6 606ddfma3027 fma 1 6 1 -> 7 607ddfma3028 fma 1 7 1 -> 8 608ddfma3029 fma 1 8 1 -> 9 609ddfma3030 fma 1 9 1 -> 10 610 611-- some carrying effects 612ddfma3031 fma 1 '0.9998' '0.0000' -> '0.9998' 613ddfma3032 fma 1 '0.9998' '0.0001' -> '0.9999' 614ddfma3033 fma 1 '0.9998' '0.0002' -> '1.0000' 615ddfma3034 fma 1 '0.9998' '0.0003' -> '1.0001' 616 617ddfma3035 fma 1 '70' '10000e+16' -> '1.000000000000000E+20' Inexact Rounded 618ddfma3036 fma 1 '700' '10000e+16' -> '1.000000000000000E+20' Inexact Rounded 619ddfma3037 fma 1 '7000' '10000e+16' -> '1.000000000000000E+20' Inexact Rounded 620ddfma3038 fma 1 '70000' '10000e+16' -> '1.000000000000001E+20' Inexact Rounded 621ddfma3039 fma 1 '700000' '10000e+16' -> '1.000000000000007E+20' Rounded 622 623-- symmetry: 624ddfma3040 fma 1 '10000e+16' '70' -> '1.000000000000000E+20' Inexact Rounded 625ddfma3041 fma 1 '10000e+16' '700' -> '1.000000000000000E+20' Inexact Rounded 626ddfma3042 fma 1 '10000e+16' '7000' -> '1.000000000000000E+20' Inexact Rounded 627ddfma3044 fma 1 '10000e+16' '70000' -> '1.000000000000001E+20' Inexact Rounded 628ddfma3045 fma 1 '10000e+16' '700000' -> '1.000000000000007E+20' Rounded 629 630-- same, without rounding 631ddfma3046 fma 1 '10000e+9' '7' -> '10000000000007' 632ddfma3047 fma 1 '10000e+9' '70' -> '10000000000070' 633ddfma3048 fma 1 '10000e+9' '700' -> '10000000000700' 634ddfma3049 fma 1 '10000e+9' '7000' -> '10000000007000' 635ddfma3050 fma 1 '10000e+9' '70000' -> '10000000070000' 636ddfma3051 fma 1 '10000e+9' '700000' -> '10000000700000' 637ddfma3052 fma 1 '10000e+9' '7000000' -> '10000007000000' 638 639-- examples from decarith 640ddfma3053 fma 1 '12' '7.00' -> '19.00' 641ddfma3054 fma 1 '1.3' '-1.07' -> '0.23' 642ddfma3055 fma 1 '1.3' '-1.30' -> '0.00' 643ddfma3056 fma 1 '1.3' '-2.07' -> '-0.77' 644ddfma3057 fma 1 '1E+2' '1E+4' -> '1.01E+4' 645 646-- leading zero preservation 647ddfma3061 fma 1 1 '0.0001' -> '1.0001' 648ddfma3062 fma 1 1 '0.00001' -> '1.00001' 649ddfma3063 fma 1 1 '0.000001' -> '1.000001' 650ddfma3064 fma 1 1 '0.0000001' -> '1.0000001' 651ddfma3065 fma 1 1 '0.00000001' -> '1.00000001' 652 653-- some funny zeros [in case of bad signum] 654ddfma3070 fma 1 1 0 -> 1 655ddfma3071 fma 1 1 0. -> 1 656ddfma3072 fma 1 1 .0 -> 1.0 657ddfma3073 fma 1 1 0.0 -> 1.0 658ddfma3074 fma 1 1 0.00 -> 1.00 659ddfma3075 fma 1 0 1 -> 1 660ddfma3076 fma 1 0. 1 -> 1 661ddfma3077 fma 1 .0 1 -> 1.0 662ddfma3078 fma 1 0.0 1 -> 1.0 663ddfma3079 fma 1 0.00 1 -> 1.00 664 665-- some carries 666ddfma3080 fma 1 999999998 1 -> 999999999 667ddfma3081 fma 1 999999999 1 -> 1000000000 668ddfma3082 fma 1 99999999 1 -> 100000000 669ddfma3083 fma 1 9999999 1 -> 10000000 670ddfma3084 fma 1 999999 1 -> 1000000 671ddfma3085 fma 1 99999 1 -> 100000 672ddfma3086 fma 1 9999 1 -> 10000 673ddfma3087 fma 1 999 1 -> 1000 674ddfma3088 fma 1 99 1 -> 100 675ddfma3089 fma 1 9 1 -> 10 676 677 678-- more LHS swaps 679ddfma3090 fma 1 '-56267E-10' 0 -> '-0.0000056267' 680ddfma3091 fma 1 '-56267E-6' 0 -> '-0.056267' 681ddfma3092 fma 1 '-56267E-5' 0 -> '-0.56267' 682ddfma3093 fma 1 '-56267E-4' 0 -> '-5.6267' 683ddfma3094 fma 1 '-56267E-3' 0 -> '-56.267' 684ddfma3095 fma 1 '-56267E-2' 0 -> '-562.67' 685ddfma3096 fma 1 '-56267E-1' 0 -> '-5626.7' 686ddfma3097 fma 1 '-56267E-0' 0 -> '-56267' 687ddfma3098 fma 1 '-5E-10' 0 -> '-5E-10' 688ddfma3099 fma 1 '-5E-7' 0 -> '-5E-7' 689ddfma3100 fma 1 '-5E-6' 0 -> '-0.000005' 690ddfma3101 fma 1 '-5E-5' 0 -> '-0.00005' 691ddfma3102 fma 1 '-5E-4' 0 -> '-0.0005' 692ddfma3103 fma 1 '-5E-1' 0 -> '-0.5' 693ddfma3104 fma 1 '-5E0' 0 -> '-5' 694ddfma3105 fma 1 '-5E1' 0 -> '-50' 695ddfma3106 fma 1 '-5E5' 0 -> '-500000' 696ddfma3107 fma 1 '-5E15' 0 -> '-5000000000000000' 697ddfma3108 fma 1 '-5E16' 0 -> '-5.000000000000000E+16' Rounded 698ddfma3109 fma 1 '-5E17' 0 -> '-5.000000000000000E+17' Rounded 699ddfma3110 fma 1 '-5E18' 0 -> '-5.000000000000000E+18' Rounded 700ddfma3111 fma 1 '-5E100' 0 -> '-5.000000000000000E+100' Rounded 701 702-- more RHS swaps 703ddfma3113 fma 1 0 '-56267E-10' -> '-0.0000056267' 704ddfma3114 fma 1 0 '-56267E-6' -> '-0.056267' 705ddfma3116 fma 1 0 '-56267E-5' -> '-0.56267' 706ddfma3117 fma 1 0 '-56267E-4' -> '-5.6267' 707ddfma3119 fma 1 0 '-56267E-3' -> '-56.267' 708ddfma3120 fma 1 0 '-56267E-2' -> '-562.67' 709ddfma3121 fma 1 0 '-56267E-1' -> '-5626.7' 710ddfma3122 fma 1 0 '-56267E-0' -> '-56267' 711ddfma3123 fma 1 0 '-5E-10' -> '-5E-10' 712ddfma3124 fma 1 0 '-5E-7' -> '-5E-7' 713ddfma3125 fma 1 0 '-5E-6' -> '-0.000005' 714ddfma3126 fma 1 0 '-5E-5' -> '-0.00005' 715ddfma3127 fma 1 0 '-5E-4' -> '-0.0005' 716ddfma3128 fma 1 0 '-5E-1' -> '-0.5' 717ddfma3129 fma 1 0 '-5E0' -> '-5' 718ddfma3130 fma 1 0 '-5E1' -> '-50' 719ddfma3131 fma 1 0 '-5E5' -> '-500000' 720ddfma3132 fma 1 0 '-5E15' -> '-5000000000000000' 721ddfma3133 fma 1 0 '-5E16' -> '-5.000000000000000E+16' Rounded 722ddfma3134 fma 1 0 '-5E17' -> '-5.000000000000000E+17' Rounded 723ddfma3135 fma 1 0 '-5E18' -> '-5.000000000000000E+18' Rounded 724ddfma3136 fma 1 0 '-5E100' -> '-5.000000000000000E+100' Rounded 725 726-- related 727ddfma3137 fma 1 1 '0E-19' -> '1.000000000000000' Rounded 728ddfma3138 fma 1 -1 '0E-19' -> '-1.000000000000000' Rounded 729ddfma3139 fma 1 '0E-19' 1 -> '1.000000000000000' Rounded 730ddfma3140 fma 1 '0E-19' -1 -> '-1.000000000000000' Rounded 731ddfma3141 fma 1 1E+11 0.0000 -> '100000000000.0000' 732ddfma3142 fma 1 1E+11 0.00000 -> '100000000000.0000' Rounded 733ddfma3143 fma 1 0.000 1E+12 -> '1000000000000.000' 734ddfma3144 fma 1 0.0000 1E+12 -> '1000000000000.000' Rounded 735 736-- [some of the next group are really constructor tests] 737ddfma3146 fma 1 '00.0' 0 -> '0.0' 738ddfma3147 fma 1 '0.00' 0 -> '0.00' 739ddfma3148 fma 1 0 '0.00' -> '0.00' 740ddfma3149 fma 1 0 '00.0' -> '0.0' 741ddfma3150 fma 1 '00.0' '0.00' -> '0.00' 742ddfma3151 fma 1 '0.00' '00.0' -> '0.00' 743ddfma3152 fma 1 '3' '.3' -> '3.3' 744ddfma3153 fma 1 '3.' '.3' -> '3.3' 745ddfma3154 fma 1 '3.0' '.3' -> '3.3' 746ddfma3155 fma 1 '3.00' '.3' -> '3.30' 747ddfma3156 fma 1 '3' '3' -> '6' 748ddfma3157 fma 1 '3' '+3' -> '6' 749ddfma3158 fma 1 '3' '-3' -> '0' 750ddfma3159 fma 1 '0.3' '-0.3' -> '0.0' 751ddfma3160 fma 1 '0.03' '-0.03' -> '0.00' 752 753-- try borderline precision, with carries, etc. 754ddfma3161 fma 1 '1E+12' '-1' -> '999999999999' 755ddfma3162 fma 1 '1E+12' '1.11' -> '1000000000001.11' 756ddfma3163 fma 1 '1.11' '1E+12' -> '1000000000001.11' 757ddfma3164 fma 1 '-1' '1E+12' -> '999999999999' 758ddfma3165 fma 1 '7E+12' '-1' -> '6999999999999' 759ddfma3166 fma 1 '7E+12' '1.11' -> '7000000000001.11' 760ddfma3167 fma 1 '1.11' '7E+12' -> '7000000000001.11' 761ddfma3168 fma 1 '-1' '7E+12' -> '6999999999999' 762 763rounding: half_up 764-- 1.234567890123456 1234567890123456 1 234567890123456 765ddfma3170 fma 1 '4.444444444444444' '0.5555555555555567' -> '5.000000000000001' Inexact Rounded 766ddfma3171 fma 1 '4.444444444444444' '0.5555555555555566' -> '5.000000000000001' Inexact Rounded 767ddfma3172 fma 1 '4.444444444444444' '0.5555555555555565' -> '5.000000000000001' Inexact Rounded 768ddfma3173 fma 1 '4.444444444444444' '0.5555555555555564' -> '5.000000000000000' Inexact Rounded 769ddfma3174 fma 1 '4.444444444444444' '0.5555555555555553' -> '4.999999999999999' Inexact Rounded 770ddfma3175 fma 1 '4.444444444444444' '0.5555555555555552' -> '4.999999999999999' Inexact Rounded 771ddfma3176 fma 1 '4.444444444444444' '0.5555555555555551' -> '4.999999999999999' Inexact Rounded 772ddfma3177 fma 1 '4.444444444444444' '0.5555555555555550' -> '4.999999999999999' Rounded 773ddfma3178 fma 1 '4.444444444444444' '0.5555555555555545' -> '4.999999999999999' Inexact Rounded 774ddfma3179 fma 1 '4.444444444444444' '0.5555555555555544' -> '4.999999999999998' Inexact Rounded 775ddfma3180 fma 1 '4.444444444444444' '0.5555555555555543' -> '4.999999999999998' Inexact Rounded 776ddfma3181 fma 1 '4.444444444444444' '0.5555555555555542' -> '4.999999999999998' Inexact Rounded 777ddfma3182 fma 1 '4.444444444444444' '0.5555555555555541' -> '4.999999999999998' Inexact Rounded 778ddfma3183 fma 1 '4.444444444444444' '0.5555555555555540' -> '4.999999999999998' Rounded 779 780-- and some more, including residue effects and different roundings 781rounding: half_up 782ddfma3200 fma 1 '1234560123456789' 0 -> '1234560123456789' 783ddfma3201 fma 1 '1234560123456789' 0.000000001 -> '1234560123456789' Inexact Rounded 784ddfma3202 fma 1 '1234560123456789' 0.000001 -> '1234560123456789' Inexact Rounded 785ddfma3203 fma 1 '1234560123456789' 0.1 -> '1234560123456789' Inexact Rounded 786ddfma3204 fma 1 '1234560123456789' 0.4 -> '1234560123456789' Inexact Rounded 787ddfma3205 fma 1 '1234560123456789' 0.49 -> '1234560123456789' Inexact Rounded 788ddfma3206 fma 1 '1234560123456789' 0.499999 -> '1234560123456789' Inexact Rounded 789ddfma3207 fma 1 '1234560123456789' 0.499999999 -> '1234560123456789' Inexact Rounded 790ddfma3208 fma 1 '1234560123456789' 0.5 -> '1234560123456790' Inexact Rounded 791ddfma3209 fma 1 '1234560123456789' 0.500000001 -> '1234560123456790' Inexact Rounded 792ddfma3210 fma 1 '1234560123456789' 0.500001 -> '1234560123456790' Inexact Rounded 793ddfma3211 fma 1 '1234560123456789' 0.51 -> '1234560123456790' Inexact Rounded 794ddfma3212 fma 1 '1234560123456789' 0.6 -> '1234560123456790' Inexact Rounded 795ddfma3213 fma 1 '1234560123456789' 0.9 -> '1234560123456790' Inexact Rounded 796ddfma3214 fma 1 '1234560123456789' 0.99999 -> '1234560123456790' Inexact Rounded 797ddfma3215 fma 1 '1234560123456789' 0.999999999 -> '1234560123456790' Inexact Rounded 798ddfma3216 fma 1 '1234560123456789' 1 -> '1234560123456790' 799ddfma3217 fma 1 '1234560123456789' 1.000000001 -> '1234560123456790' Inexact Rounded 800ddfma3218 fma 1 '1234560123456789' 1.00001 -> '1234560123456790' Inexact Rounded 801ddfma3219 fma 1 '1234560123456789' 1.1 -> '1234560123456790' Inexact Rounded 802 803rounding: half_even 804ddfma3220 fma 1 '1234560123456789' 0 -> '1234560123456789' 805ddfma3221 fma 1 '1234560123456789' 0.000000001 -> '1234560123456789' Inexact Rounded 806ddfma3222 fma 1 '1234560123456789' 0.000001 -> '1234560123456789' Inexact Rounded 807ddfma3223 fma 1 '1234560123456789' 0.1 -> '1234560123456789' Inexact Rounded 808ddfma3224 fma 1 '1234560123456789' 0.4 -> '1234560123456789' Inexact Rounded 809ddfma3225 fma 1 '1234560123456789' 0.49 -> '1234560123456789' Inexact Rounded 810ddfma3226 fma 1 '1234560123456789' 0.499999 -> '1234560123456789' Inexact Rounded 811ddfma3227 fma 1 '1234560123456789' 0.499999999 -> '1234560123456789' Inexact Rounded 812ddfma3228 fma 1 '1234560123456789' 0.5 -> '1234560123456790' Inexact Rounded 813ddfma3229 fma 1 '1234560123456789' 0.500000001 -> '1234560123456790' Inexact Rounded 814ddfma3230 fma 1 '1234560123456789' 0.500001 -> '1234560123456790' Inexact Rounded 815ddfma3231 fma 1 '1234560123456789' 0.51 -> '1234560123456790' Inexact Rounded 816ddfma3232 fma 1 '1234560123456789' 0.6 -> '1234560123456790' Inexact Rounded 817ddfma3233 fma 1 '1234560123456789' 0.9 -> '1234560123456790' Inexact Rounded 818ddfma3234 fma 1 '1234560123456789' 0.99999 -> '1234560123456790' Inexact Rounded 819ddfma3235 fma 1 '1234560123456789' 0.999999999 -> '1234560123456790' Inexact Rounded 820ddfma3236 fma 1 '1234560123456789' 1 -> '1234560123456790' 821ddfma3237 fma 1 '1234560123456789' 1.00000001 -> '1234560123456790' Inexact Rounded 822ddfma3238 fma 1 '1234560123456789' 1.00001 -> '1234560123456790' Inexact Rounded 823ddfma3239 fma 1 '1234560123456789' 1.1 -> '1234560123456790' Inexact Rounded 824-- critical few with even bottom digit... 825ddfma3240 fma 1 '1234560123456788' 0.499999999 -> '1234560123456788' Inexact Rounded 826ddfma3241 fma 1 '1234560123456788' 0.5 -> '1234560123456788' Inexact Rounded 827ddfma3242 fma 1 '1234560123456788' 0.500000001 -> '1234560123456789' Inexact Rounded 828 829rounding: down 830ddfma3250 fma 1 '1234560123456789' 0 -> '1234560123456789' 831ddfma3251 fma 1 '1234560123456789' 0.000000001 -> '1234560123456789' Inexact Rounded 832ddfma3252 fma 1 '1234560123456789' 0.000001 -> '1234560123456789' Inexact Rounded 833ddfma3253 fma 1 '1234560123456789' 0.1 -> '1234560123456789' Inexact Rounded 834ddfma3254 fma 1 '1234560123456789' 0.4 -> '1234560123456789' Inexact Rounded 835ddfma3255 fma 1 '1234560123456789' 0.49 -> '1234560123456789' Inexact Rounded 836ddfma3256 fma 1 '1234560123456789' 0.499999 -> '1234560123456789' Inexact Rounded 837ddfma3257 fma 1 '1234560123456789' 0.499999999 -> '1234560123456789' Inexact Rounded 838ddfma3258 fma 1 '1234560123456789' 0.5 -> '1234560123456789' Inexact Rounded 839ddfma3259 fma 1 '1234560123456789' 0.500000001 -> '1234560123456789' Inexact Rounded 840ddfma3260 fma 1 '1234560123456789' 0.500001 -> '1234560123456789' Inexact Rounded 841ddfma3261 fma 1 '1234560123456789' 0.51 -> '1234560123456789' Inexact Rounded 842ddfma3262 fma 1 '1234560123456789' 0.6 -> '1234560123456789' Inexact Rounded 843ddfma3263 fma 1 '1234560123456789' 0.9 -> '1234560123456789' Inexact Rounded 844ddfma3264 fma 1 '1234560123456789' 0.99999 -> '1234560123456789' Inexact Rounded 845ddfma3265 fma 1 '1234560123456789' 0.999999999 -> '1234560123456789' Inexact Rounded 846ddfma3266 fma 1 '1234560123456789' 1 -> '1234560123456790' 847ddfma3267 fma 1 '1234560123456789' 1.00000001 -> '1234560123456790' Inexact Rounded 848ddfma3268 fma 1 '1234560123456789' 1.00001 -> '1234560123456790' Inexact Rounded 849ddfma3269 fma 1 '1234560123456789' 1.1 -> '1234560123456790' Inexact Rounded 850 851-- 1 in last place tests 852rounding: half_up 853ddfma3301 fma 1 -1 1 -> 0 854ddfma3302 fma 1 0 1 -> 1 855ddfma3303 fma 1 1 1 -> 2 856ddfma3304 fma 1 12 1 -> 13 857ddfma3305 fma 1 98 1 -> 99 858ddfma3306 fma 1 99 1 -> 100 859ddfma3307 fma 1 100 1 -> 101 860ddfma3308 fma 1 101 1 -> 102 861ddfma3309 fma 1 -1 -1 -> -2 862ddfma3310 fma 1 0 -1 -> -1 863ddfma3311 fma 1 1 -1 -> 0 864ddfma3312 fma 1 12 -1 -> 11 865ddfma3313 fma 1 98 -1 -> 97 866ddfma3314 fma 1 99 -1 -> 98 867ddfma3315 fma 1 100 -1 -> 99 868ddfma3316 fma 1 101 -1 -> 100 869 870ddfma3321 fma 1 -0.01 0.01 -> 0.00 871ddfma3322 fma 1 0.00 0.01 -> 0.01 872ddfma3323 fma 1 0.01 0.01 -> 0.02 873ddfma3324 fma 1 0.12 0.01 -> 0.13 874ddfma3325 fma 1 0.98 0.01 -> 0.99 875ddfma3326 fma 1 0.99 0.01 -> 1.00 876ddfma3327 fma 1 1.00 0.01 -> 1.01 877ddfma3328 fma 1 1.01 0.01 -> 1.02 878ddfma3329 fma 1 -0.01 -0.01 -> -0.02 879ddfma3330 fma 1 0.00 -0.01 -> -0.01 880ddfma3331 fma 1 0.01 -0.01 -> 0.00 881ddfma3332 fma 1 0.12 -0.01 -> 0.11 882ddfma3333 fma 1 0.98 -0.01 -> 0.97 883ddfma3334 fma 1 0.99 -0.01 -> 0.98 884ddfma3335 fma 1 1.00 -0.01 -> 0.99 885ddfma3336 fma 1 1.01 -0.01 -> 1.00 886 887-- some more cases where adding 0 affects the coefficient 888ddfma3340 fma 1 1E+3 0 -> 1000 889ddfma3341 fma 1 1E+15 0 -> 1000000000000000 890ddfma3342 fma 1 1E+16 0 -> 1.000000000000000E+16 Rounded 891ddfma3343 fma 1 1E+20 0 -> 1.000000000000000E+20 Rounded 892-- which simply follow from these cases ... 893ddfma3344 fma 1 1E+3 1 -> 1001 894ddfma3345 fma 1 1E+15 1 -> 1000000000000001 895ddfma3346 fma 1 1E+16 1 -> 1.000000000000000E+16 Inexact Rounded 896ddfma3347 fma 1 1E+20 1 -> 1.000000000000000E+20 Inexact Rounded 897ddfma3348 fma 1 1E+3 7 -> 1007 898ddfma3349 fma 1 1E+15 7 -> 1000000000000007 899ddfma3350 fma 1 1E+16 7 -> 1.000000000000001E+16 Inexact Rounded 900ddfma3351 fma 1 1E+20 7 -> 1.000000000000000E+20 Inexact Rounded 901 902-- tryzeros cases 903rounding: half_up 904ddfma3360 fma 1 0E+50 10000E+1 -> 1.0000E+5 905ddfma3361 fma 1 0E-50 10000E+1 -> 100000.0000000000 Rounded 906ddfma3362 fma 1 10000E+1 0E-50 -> 100000.0000000000 Rounded 907ddfma3363 fma 1 10000E+1 10000E-50 -> 100000.0000000000 Rounded Inexact 908ddfma3364 fma 1 9.999999999999999E+384 -9.999999999999999E+384 -> 0E+369 909 910-- a curiosity from JSR 13 testing 911rounding: half_down 912ddfma3370 fma 1 999999999999999 815 -> 1000000000000814 913ddfma3371 fma 1 9999999999999999 815 -> 1.000000000000081E+16 Rounded Inexact 914rounding: half_up 915ddfma3372 fma 1 999999999999999 815 -> 1000000000000814 916ddfma3373 fma 1 9999999999999999 815 -> 1.000000000000081E+16 Rounded Inexact 917rounding: half_even 918ddfma3374 fma 1 999999999999999 815 -> 1000000000000814 919ddfma3375 fma 1 9999999999999999 815 -> 1.000000000000081E+16 Rounded Inexact 920 921-- ulp replacement tests 922ddfma3400 fma 1 1 77e-14 -> 1.00000000000077 923ddfma3401 fma 1 1 77e-15 -> 1.000000000000077 924ddfma3402 fma 1 1 77e-16 -> 1.000000000000008 Inexact Rounded 925ddfma3403 fma 1 1 77e-17 -> 1.000000000000001 Inexact Rounded 926ddfma3404 fma 1 1 77e-18 -> 1.000000000000000 Inexact Rounded 927ddfma3405 fma 1 1 77e-19 -> 1.000000000000000 Inexact Rounded 928ddfma3406 fma 1 1 77e-299 -> 1.000000000000000 Inexact Rounded 929 930ddfma3410 fma 1 10 77e-14 -> 10.00000000000077 931ddfma3411 fma 1 10 77e-15 -> 10.00000000000008 Inexact Rounded 932ddfma3412 fma 1 10 77e-16 -> 10.00000000000001 Inexact Rounded 933ddfma3413 fma 1 10 77e-17 -> 10.00000000000000 Inexact Rounded 934ddfma3414 fma 1 10 77e-18 -> 10.00000000000000 Inexact Rounded 935ddfma3415 fma 1 10 77e-19 -> 10.00000000000000 Inexact Rounded 936ddfma3416 fma 1 10 77e-299 -> 10.00000000000000 Inexact Rounded 937 938ddfma3420 fma 1 77e-14 1 -> 1.00000000000077 939ddfma3421 fma 1 77e-15 1 -> 1.000000000000077 940ddfma3422 fma 1 77e-16 1 -> 1.000000000000008 Inexact Rounded 941ddfma3423 fma 1 77e-17 1 -> 1.000000000000001 Inexact Rounded 942ddfma3424 fma 1 77e-18 1 -> 1.000000000000000 Inexact Rounded 943ddfma3425 fma 1 77e-19 1 -> 1.000000000000000 Inexact Rounded 944ddfma3426 fma 1 77e-299 1 -> 1.000000000000000 Inexact Rounded 945 946ddfma3430 fma 1 77e-14 10 -> 10.00000000000077 947ddfma3431 fma 1 77e-15 10 -> 10.00000000000008 Inexact Rounded 948ddfma3432 fma 1 77e-16 10 -> 10.00000000000001 Inexact Rounded 949ddfma3433 fma 1 77e-17 10 -> 10.00000000000000 Inexact Rounded 950ddfma3434 fma 1 77e-18 10 -> 10.00000000000000 Inexact Rounded 951ddfma3435 fma 1 77e-19 10 -> 10.00000000000000 Inexact Rounded 952ddfma3436 fma 1 77e-299 10 -> 10.00000000000000 Inexact Rounded 953 954-- negative ulps 955ddfma36440 fma 1 1 -77e-14 -> 0.99999999999923 956ddfma36441 fma 1 1 -77e-15 -> 0.999999999999923 957ddfma36442 fma 1 1 -77e-16 -> 0.9999999999999923 958ddfma36443 fma 1 1 -77e-17 -> 0.9999999999999992 Inexact Rounded 959ddfma36444 fma 1 1 -77e-18 -> 0.9999999999999999 Inexact Rounded 960ddfma36445 fma 1 1 -77e-19 -> 1.000000000000000 Inexact Rounded 961ddfma36446 fma 1 1 -77e-99 -> 1.000000000000000 Inexact Rounded 962 963ddfma36450 fma 1 10 -77e-14 -> 9.99999999999923 964ddfma36451 fma 1 10 -77e-15 -> 9.999999999999923 965ddfma36452 fma 1 10 -77e-16 -> 9.999999999999992 Inexact Rounded 966ddfma36453 fma 1 10 -77e-17 -> 9.999999999999999 Inexact Rounded 967ddfma36454 fma 1 10 -77e-18 -> 10.00000000000000 Inexact Rounded 968ddfma36455 fma 1 10 -77e-19 -> 10.00000000000000 Inexact Rounded 969ddfma36456 fma 1 10 -77e-99 -> 10.00000000000000 Inexact Rounded 970 971ddfma36460 fma 1 -77e-14 1 -> 0.99999999999923 972ddfma36461 fma 1 -77e-15 1 -> 0.999999999999923 973ddfma36462 fma 1 -77e-16 1 -> 0.9999999999999923 974ddfma36463 fma 1 -77e-17 1 -> 0.9999999999999992 Inexact Rounded 975ddfma36464 fma 1 -77e-18 1 -> 0.9999999999999999 Inexact Rounded 976ddfma36465 fma 1 -77e-19 1 -> 1.000000000000000 Inexact Rounded 977ddfma36466 fma 1 -77e-99 1 -> 1.000000000000000 Inexact Rounded 978 979ddfma36470 fma 1 -77e-14 10 -> 9.99999999999923 980ddfma36471 fma 1 -77e-15 10 -> 9.999999999999923 981ddfma36472 fma 1 -77e-16 10 -> 9.999999999999992 Inexact Rounded 982ddfma36473 fma 1 -77e-17 10 -> 9.999999999999999 Inexact Rounded 983ddfma36474 fma 1 -77e-18 10 -> 10.00000000000000 Inexact Rounded 984ddfma36475 fma 1 -77e-19 10 -> 10.00000000000000 Inexact Rounded 985ddfma36476 fma 1 -77e-99 10 -> 10.00000000000000 Inexact Rounded 986 987-- negative ulps 988ddfma36480 fma 1 -1 77e-14 -> -0.99999999999923 989ddfma36481 fma 1 -1 77e-15 -> -0.999999999999923 990ddfma36482 fma 1 -1 77e-16 -> -0.9999999999999923 991ddfma36483 fma 1 -1 77e-17 -> -0.9999999999999992 Inexact Rounded 992ddfma36484 fma 1 -1 77e-18 -> -0.9999999999999999 Inexact Rounded 993ddfma36485 fma 1 -1 77e-19 -> -1.000000000000000 Inexact Rounded 994ddfma36486 fma 1 -1 77e-99 -> -1.000000000000000 Inexact Rounded 995 996ddfma36490 fma 1 -10 77e-14 -> -9.99999999999923 997ddfma36491 fma 1 -10 77e-15 -> -9.999999999999923 998ddfma36492 fma 1 -10 77e-16 -> -9.999999999999992 Inexact Rounded 999ddfma36493 fma 1 -10 77e-17 -> -9.999999999999999 Inexact Rounded 1000ddfma36494 fma 1 -10 77e-18 -> -10.00000000000000 Inexact Rounded 1001ddfma36495 fma 1 -10 77e-19 -> -10.00000000000000 Inexact Rounded 1002ddfma36496 fma 1 -10 77e-99 -> -10.00000000000000 Inexact Rounded 1003 1004ddfma36500 fma 1 77e-14 -1 -> -0.99999999999923 1005ddfma36501 fma 1 77e-15 -1 -> -0.999999999999923 1006ddfma36502 fma 1 77e-16 -1 -> -0.9999999999999923 1007ddfma36503 fma 1 77e-17 -1 -> -0.9999999999999992 Inexact Rounded 1008ddfma36504 fma 1 77e-18 -1 -> -0.9999999999999999 Inexact Rounded 1009ddfma36505 fma 1 77e-19 -1 -> -1.000000000000000 Inexact Rounded 1010ddfma36506 fma 1 77e-99 -1 -> -1.000000000000000 Inexact Rounded 1011 1012ddfma36510 fma 1 77e-14 -10 -> -9.99999999999923 1013ddfma36511 fma 1 77e-15 -10 -> -9.999999999999923 1014ddfma36512 fma 1 77e-16 -10 -> -9.999999999999992 Inexact Rounded 1015ddfma36513 fma 1 77e-17 -10 -> -9.999999999999999 Inexact Rounded 1016ddfma36514 fma 1 77e-18 -10 -> -10.00000000000000 Inexact Rounded 1017ddfma36515 fma 1 77e-19 -10 -> -10.00000000000000 Inexact Rounded 1018ddfma36516 fma 1 77e-99 -10 -> -10.00000000000000 Inexact Rounded 1019 1020-- and a couple more with longer RHS 1021ddfma36520 fma 1 1 -7777e-16 -> 0.9999999999992223 1022ddfma36521 fma 1 1 -7777e-17 -> 0.9999999999999222 Inexact Rounded 1023ddfma36522 fma 1 1 -7777e-18 -> 0.9999999999999922 Inexact Rounded 1024ddfma36523 fma 1 1 -7777e-19 -> 0.9999999999999992 Inexact Rounded 1025ddfma36524 fma 1 1 -7777e-20 -> 0.9999999999999999 Inexact Rounded 1026ddfma36525 fma 1 1 -7777e-21 -> 1.000000000000000 Inexact Rounded 1027ddfma36526 fma 1 1 -7777e-22 -> 1.000000000000000 Inexact Rounded 1028 1029 1030-- and some more residue effects and different roundings 1031rounding: half_up 1032ddfma36540 fma 1 '6543210123456789' 0 -> '6543210123456789' 1033ddfma36541 fma 1 '6543210123456789' 0.000000001 -> '6543210123456789' Inexact Rounded 1034ddfma36542 fma 1 '6543210123456789' 0.000001 -> '6543210123456789' Inexact Rounded 1035ddfma36543 fma 1 '6543210123456789' 0.1 -> '6543210123456789' Inexact Rounded 1036ddfma36544 fma 1 '6543210123456789' 0.4 -> '6543210123456789' Inexact Rounded 1037ddfma36545 fma 1 '6543210123456789' 0.49 -> '6543210123456789' Inexact Rounded 1038ddfma36546 fma 1 '6543210123456789' 0.499999 -> '6543210123456789' Inexact Rounded 1039ddfma36547 fma 1 '6543210123456789' 0.499999999 -> '6543210123456789' Inexact Rounded 1040ddfma36548 fma 1 '6543210123456789' 0.5 -> '6543210123456790' Inexact Rounded 1041ddfma36549 fma 1 '6543210123456789' 0.500000001 -> '6543210123456790' Inexact Rounded 1042ddfma36550 fma 1 '6543210123456789' 0.500001 -> '6543210123456790' Inexact Rounded 1043ddfma36551 fma 1 '6543210123456789' 0.51 -> '6543210123456790' Inexact Rounded 1044ddfma36552 fma 1 '6543210123456789' 0.6 -> '6543210123456790' Inexact Rounded 1045ddfma36553 fma 1 '6543210123456789' 0.9 -> '6543210123456790' Inexact Rounded 1046ddfma36554 fma 1 '6543210123456789' 0.99999 -> '6543210123456790' Inexact Rounded 1047ddfma36555 fma 1 '6543210123456789' 0.999999999 -> '6543210123456790' Inexact Rounded 1048ddfma36556 fma 1 '6543210123456789' 1 -> '6543210123456790' 1049ddfma36557 fma 1 '6543210123456789' 1.000000001 -> '6543210123456790' Inexact Rounded 1050ddfma36558 fma 1 '6543210123456789' 1.00001 -> '6543210123456790' Inexact Rounded 1051ddfma36559 fma 1 '6543210123456789' 1.1 -> '6543210123456790' Inexact Rounded 1052 1053rounding: half_even 1054ddfma36560 fma 1 '6543210123456789' 0 -> '6543210123456789' 1055ddfma36561 fma 1 '6543210123456789' 0.000000001 -> '6543210123456789' Inexact Rounded 1056ddfma36562 fma 1 '6543210123456789' 0.000001 -> '6543210123456789' Inexact Rounded 1057ddfma36563 fma 1 '6543210123456789' 0.1 -> '6543210123456789' Inexact Rounded 1058ddfma36564 fma 1 '6543210123456789' 0.4 -> '6543210123456789' Inexact Rounded 1059ddfma36565 fma 1 '6543210123456789' 0.49 -> '6543210123456789' Inexact Rounded 1060ddfma36566 fma 1 '6543210123456789' 0.499999 -> '6543210123456789' Inexact Rounded 1061ddfma36567 fma 1 '6543210123456789' 0.499999999 -> '6543210123456789' Inexact Rounded 1062ddfma36568 fma 1 '6543210123456789' 0.5 -> '6543210123456790' Inexact Rounded 1063ddfma36569 fma 1 '6543210123456789' 0.500000001 -> '6543210123456790' Inexact Rounded 1064ddfma36570 fma 1 '6543210123456789' 0.500001 -> '6543210123456790' Inexact Rounded 1065ddfma36571 fma 1 '6543210123456789' 0.51 -> '6543210123456790' Inexact Rounded 1066ddfma36572 fma 1 '6543210123456789' 0.6 -> '6543210123456790' Inexact Rounded 1067ddfma36573 fma 1 '6543210123456789' 0.9 -> '6543210123456790' Inexact Rounded 1068ddfma36574 fma 1 '6543210123456789' 0.99999 -> '6543210123456790' Inexact Rounded 1069ddfma36575 fma 1 '6543210123456789' 0.999999999 -> '6543210123456790' Inexact Rounded 1070ddfma36576 fma 1 '6543210123456789' 1 -> '6543210123456790' 1071ddfma36577 fma 1 '6543210123456789' 1.00000001 -> '6543210123456790' Inexact Rounded 1072ddfma36578 fma 1 '6543210123456789' 1.00001 -> '6543210123456790' Inexact Rounded 1073ddfma36579 fma 1 '6543210123456789' 1.1 -> '6543210123456790' Inexact Rounded 1074 1075-- critical few with even bottom digit... 1076ddfma37540 fma 1 '6543210123456788' 0.499999999 -> '6543210123456788' Inexact Rounded 1077ddfma37541 fma 1 '6543210123456788' 0.5 -> '6543210123456788' Inexact Rounded 1078ddfma37542 fma 1 '6543210123456788' 0.500000001 -> '6543210123456789' Inexact Rounded 1079 1080rounding: down 1081ddfma37550 fma 1 '6543210123456789' 0 -> '6543210123456789' 1082ddfma37551 fma 1 '6543210123456789' 0.000000001 -> '6543210123456789' Inexact Rounded 1083ddfma37552 fma 1 '6543210123456789' 0.000001 -> '6543210123456789' Inexact Rounded 1084ddfma37553 fma 1 '6543210123456789' 0.1 -> '6543210123456789' Inexact Rounded 1085ddfma37554 fma 1 '6543210123456789' 0.4 -> '6543210123456789' Inexact Rounded 1086ddfma37555 fma 1 '6543210123456789' 0.49 -> '6543210123456789' Inexact Rounded 1087ddfma37556 fma 1 '6543210123456789' 0.499999 -> '6543210123456789' Inexact Rounded 1088ddfma37557 fma 1 '6543210123456789' 0.499999999 -> '6543210123456789' Inexact Rounded 1089ddfma37558 fma 1 '6543210123456789' 0.5 -> '6543210123456789' Inexact Rounded 1090ddfma37559 fma 1 '6543210123456789' 0.500000001 -> '6543210123456789' Inexact Rounded 1091ddfma37560 fma 1 '6543210123456789' 0.500001 -> '6543210123456789' Inexact Rounded 1092ddfma37561 fma 1 '6543210123456789' 0.51 -> '6543210123456789' Inexact Rounded 1093ddfma37562 fma 1 '6543210123456789' 0.6 -> '6543210123456789' Inexact Rounded 1094ddfma37563 fma 1 '6543210123456789' 0.9 -> '6543210123456789' Inexact Rounded 1095ddfma37564 fma 1 '6543210123456789' 0.99999 -> '6543210123456789' Inexact Rounded 1096ddfma37565 fma 1 '6543210123456789' 0.999999999 -> '6543210123456789' Inexact Rounded 1097ddfma37566 fma 1 '6543210123456789' 1 -> '6543210123456790' 1098ddfma37567 fma 1 '6543210123456789' 1.00000001 -> '6543210123456790' Inexact Rounded 1099ddfma37568 fma 1 '6543210123456789' 1.00001 -> '6543210123456790' Inexact Rounded 1100ddfma37569 fma 1 '6543210123456789' 1.1 -> '6543210123456790' Inexact Rounded 1101 1102 1103-- verify a query 1104rounding: down 1105ddfma37661 fma 1 1e-398 9.000000000000000E+384 -> 9.000000000000000E+384 Inexact Rounded 1106ddfma37662 fma 1 0 9.000000000000000E+384 -> 9.000000000000000E+384 Rounded 1107ddfma37663 fma 1 1e-388 9.000000000000000E+374 -> 9.000000000000000E+374 Inexact Rounded 1108ddfma37664 fma 1 0 9.000000000000000E+374 -> 9.000000000000000E+374 Rounded 1109 1110-- more zeros, etc. 1111rounding: half_even 1112 1113ddfma37701 fma 1 5.00 1.00E-3 -> 5.00100 1114ddfma37702 fma 1 00.00 0.000 -> 0.000 1115ddfma37703 fma 1 00.00 0E-3 -> 0.000 1116ddfma37704 fma 1 0E-3 00.00 -> 0.000 1117 1118ddfma37710 fma 1 0E+3 00.00 -> 0.00 1119ddfma37711 fma 1 0E+3 00.0 -> 0.0 1120ddfma37712 fma 1 0E+3 00. -> 0 1121ddfma37713 fma 1 0E+3 00.E+1 -> 0E+1 1122ddfma37714 fma 1 0E+3 00.E+2 -> 0E+2 1123ddfma37715 fma 1 0E+3 00.E+3 -> 0E+3 1124ddfma37716 fma 1 0E+3 00.E+4 -> 0E+3 1125ddfma37717 fma 1 0E+3 00.E+5 -> 0E+3 1126ddfma37718 fma 1 0E+3 -00.0 -> 0.0 1127ddfma37719 fma 1 0E+3 -00. -> 0 1128ddfma37731 fma 1 0E+3 -00.E+1 -> 0E+1 1129 1130ddfma37720 fma 1 00.00 0E+3 -> 0.00 1131ddfma37721 fma 1 00.0 0E+3 -> 0.0 1132ddfma37722 fma 1 00. 0E+3 -> 0 1133ddfma37723 fma 1 00.E+1 0E+3 -> 0E+1 1134ddfma37724 fma 1 00.E+2 0E+3 -> 0E+2 1135ddfma37725 fma 1 00.E+3 0E+3 -> 0E+3 1136ddfma37726 fma 1 00.E+4 0E+3 -> 0E+3 1137ddfma37727 fma 1 00.E+5 0E+3 -> 0E+3 1138ddfma37728 fma 1 -00.00 0E+3 -> 0.00 1139ddfma37729 fma 1 -00.0 0E+3 -> 0.0 1140ddfma37730 fma 1 -00. 0E+3 -> 0 1141 1142ddfma37732 fma 1 0 0 -> 0 1143ddfma37733 fma 1 0 -0 -> 0 1144ddfma37734 fma 1 -0 0 -> 0 1145ddfma37735 fma 1 -0 -0 -> -0 -- IEEE 854 special case 1146 1147ddfma37736 fma 1 1 -1 -> 0 1148ddfma37737 fma 1 -1 -1 -> -2 1149ddfma37738 fma 1 1 1 -> 2 1150ddfma37739 fma 1 -1 1 -> 0 1151 1152ddfma37741 fma 1 0 -1 -> -1 1153ddfma37742 fma 1 -0 -1 -> -1 1154ddfma37743 fma 1 0 1 -> 1 1155ddfma37744 fma 1 -0 1 -> 1 1156ddfma37745 fma 1 -1 0 -> -1 1157ddfma37746 fma 1 -1 -0 -> -1 1158ddfma37747 fma 1 1 0 -> 1 1159ddfma37748 fma 1 1 -0 -> 1 1160 1161ddfma37751 fma 1 0.0 -1 -> -1.0 1162ddfma37752 fma 1 -0.0 -1 -> -1.0 1163ddfma37753 fma 1 0.0 1 -> 1.0 1164ddfma37754 fma 1 -0.0 1 -> 1.0 1165ddfma37755 fma 1 -1.0 0 -> -1.0 1166ddfma37756 fma 1 -1.0 -0 -> -1.0 1167ddfma37757 fma 1 1.0 0 -> 1.0 1168ddfma37758 fma 1 1.0 -0 -> 1.0 1169 1170ddfma37761 fma 1 0 -1.0 -> -1.0 1171ddfma37762 fma 1 -0 -1.0 -> -1.0 1172ddfma37763 fma 1 0 1.0 -> 1.0 1173ddfma37764 fma 1 -0 1.0 -> 1.0 1174ddfma37765 fma 1 -1 0.0 -> -1.0 1175ddfma37766 fma 1 -1 -0.0 -> -1.0 1176ddfma37767 fma 1 1 0.0 -> 1.0 1177ddfma37768 fma 1 1 -0.0 -> 1.0 1178 1179ddfma37771 fma 1 0.0 -1.0 -> -1.0 1180ddfma37772 fma 1 -0.0 -1.0 -> -1.0 1181ddfma37773 fma 1 0.0 1.0 -> 1.0 1182ddfma37774 fma 1 -0.0 1.0 -> 1.0 1183ddfma37775 fma 1 -1.0 0.0 -> -1.0 1184ddfma37776 fma 1 -1.0 -0.0 -> -1.0 1185ddfma37777 fma 1 1.0 0.0 -> 1.0 1186ddfma37778 fma 1 1.0 -0.0 -> 1.0 1187 1188-- Specials 1189ddfma37780 fma 1 -Inf -Inf -> -Infinity 1190ddfma37781 fma 1 -Inf -1000 -> -Infinity 1191ddfma37782 fma 1 -Inf -1 -> -Infinity 1192ddfma37783 fma 1 -Inf -0 -> -Infinity 1193ddfma37784 fma 1 -Inf 0 -> -Infinity 1194ddfma37785 fma 1 -Inf 1 -> -Infinity 1195ddfma37786 fma 1 -Inf 1000 -> -Infinity 1196ddfma37787 fma 1 -1000 -Inf -> -Infinity 1197ddfma37788 fma 1 -Inf -Inf -> -Infinity 1198ddfma37789 fma 1 -1 -Inf -> -Infinity 1199ddfma37790 fma 1 -0 -Inf -> -Infinity 1200ddfma37791 fma 1 0 -Inf -> -Infinity 1201ddfma37792 fma 1 1 -Inf -> -Infinity 1202ddfma37793 fma 1 1000 -Inf -> -Infinity 1203ddfma37794 fma 1 Inf -Inf -> NaN Invalid_operation 1204 1205ddfma37800 fma 1 Inf -Inf -> NaN Invalid_operation 1206ddfma37801 fma 1 Inf -1000 -> Infinity 1207ddfma37802 fma 1 Inf -1 -> Infinity 1208ddfma37803 fma 1 Inf -0 -> Infinity 1209ddfma37804 fma 1 Inf 0 -> Infinity 1210ddfma37805 fma 1 Inf 1 -> Infinity 1211ddfma37806 fma 1 Inf 1000 -> Infinity 1212ddfma37807 fma 1 Inf Inf -> Infinity 1213ddfma37808 fma 1 -1000 Inf -> Infinity 1214ddfma37809 fma 1 -Inf Inf -> NaN Invalid_operation 1215ddfma37810 fma 1 -1 Inf -> Infinity 1216ddfma37811 fma 1 -0 Inf -> Infinity 1217ddfma37812 fma 1 0 Inf -> Infinity 1218ddfma37813 fma 1 1 Inf -> Infinity 1219ddfma37814 fma 1 1000 Inf -> Infinity 1220ddfma37815 fma 1 Inf Inf -> Infinity 1221 1222ddfma37821 fma 1 NaN -Inf -> NaN 1223ddfma37822 fma 1 NaN -1000 -> NaN 1224ddfma37823 fma 1 NaN -1 -> NaN 1225ddfma37824 fma 1 NaN -0 -> NaN 1226ddfma37825 fma 1 NaN 0 -> NaN 1227ddfma37826 fma 1 NaN 1 -> NaN 1228ddfma37827 fma 1 NaN 1000 -> NaN 1229ddfma37828 fma 1 NaN Inf -> NaN 1230ddfma37829 fma 1 NaN NaN -> NaN 1231ddfma37830 fma 1 -Inf NaN -> NaN 1232ddfma37831 fma 1 -1000 NaN -> NaN 1233ddfma37832 fma 1 -1 NaN -> NaN 1234ddfma37833 fma 1 -0 NaN -> NaN 1235ddfma37834 fma 1 0 NaN -> NaN 1236ddfma37835 fma 1 1 NaN -> NaN 1237ddfma37836 fma 1 1000 NaN -> NaN 1238ddfma37837 fma 1 Inf NaN -> NaN 1239 1240ddfma37841 fma 1 sNaN -Inf -> NaN Invalid_operation 1241ddfma37842 fma 1 sNaN -1000 -> NaN Invalid_operation 1242ddfma37843 fma 1 sNaN -1 -> NaN Invalid_operation 1243ddfma37844 fma 1 sNaN -0 -> NaN Invalid_operation 1244ddfma37845 fma 1 sNaN 0 -> NaN Invalid_operation 1245ddfma37846 fma 1 sNaN 1 -> NaN Invalid_operation 1246ddfma37847 fma 1 sNaN 1000 -> NaN Invalid_operation 1247ddfma37848 fma 1 sNaN NaN -> NaN Invalid_operation 1248ddfma37849 fma 1 sNaN sNaN -> NaN Invalid_operation 1249ddfma37850 fma 1 NaN sNaN -> NaN Invalid_operation 1250ddfma37851 fma 1 -Inf sNaN -> NaN Invalid_operation 1251ddfma37852 fma 1 -1000 sNaN -> NaN Invalid_operation 1252ddfma37853 fma 1 -1 sNaN -> NaN Invalid_operation 1253ddfma37854 fma 1 -0 sNaN -> NaN Invalid_operation 1254ddfma37855 fma 1 0 sNaN -> NaN Invalid_operation 1255ddfma37856 fma 1 1 sNaN -> NaN Invalid_operation 1256ddfma37857 fma 1 1000 sNaN -> NaN Invalid_operation 1257ddfma37858 fma 1 Inf sNaN -> NaN Invalid_operation 1258ddfma37859 fma 1 NaN sNaN -> NaN Invalid_operation 1259 1260-- propagating NaNs 1261ddfma37861 fma 1 NaN1 -Inf -> NaN1 1262ddfma37862 fma 1 +NaN2 -1000 -> NaN2 1263ddfma37863 fma 1 NaN3 1000 -> NaN3 1264ddfma37864 fma 1 NaN4 Inf -> NaN4 1265ddfma37865 fma 1 NaN5 +NaN6 -> NaN5 1266ddfma37866 fma 1 -Inf NaN7 -> NaN7 1267ddfma37867 fma 1 -1000 NaN8 -> NaN8 1268ddfma37868 fma 1 1000 NaN9 -> NaN9 1269ddfma37869 fma 1 Inf +NaN10 -> NaN10 1270ddfma37871 fma 1 sNaN11 -Inf -> NaN11 Invalid_operation 1271ddfma37872 fma 1 sNaN12 -1000 -> NaN12 Invalid_operation 1272ddfma37873 fma 1 sNaN13 1000 -> NaN13 Invalid_operation 1273ddfma37874 fma 1 sNaN14 NaN17 -> NaN14 Invalid_operation 1274ddfma37875 fma 1 sNaN15 sNaN18 -> NaN15 Invalid_operation 1275ddfma37876 fma 1 NaN16 sNaN19 -> NaN19 Invalid_operation 1276ddfma37877 fma 1 -Inf +sNaN20 -> NaN20 Invalid_operation 1277ddfma37878 fma 1 -1000 sNaN21 -> NaN21 Invalid_operation 1278ddfma37879 fma 1 1000 sNaN22 -> NaN22 Invalid_operation 1279ddfma37880 fma 1 Inf sNaN23 -> NaN23 Invalid_operation 1280ddfma37881 fma 1 +NaN25 +sNaN24 -> NaN24 Invalid_operation 1281ddfma37882 fma 1 -NaN26 NaN28 -> -NaN26 1282ddfma37883 fma 1 -sNaN27 sNaN29 -> -NaN27 Invalid_operation 1283ddfma37884 fma 1 1000 -NaN30 -> -NaN30 1284ddfma37885 fma 1 1000 -sNaN31 -> -NaN31 Invalid_operation 1285 1286-- Here we explore near the boundary of rounding a subnormal to Nmin 1287ddfma37575 fma 1 1E-383 -1E-398 -> 9.99999999999999E-384 Subnormal 1288ddfma37576 fma 1 -1E-383 +1E-398 -> -9.99999999999999E-384 Subnormal 1289 1290-- check overflow edge case 1291-- 1234567890123456 1292ddfma37972 apply 9.999999999999999E+384 -> 9.999999999999999E+384 1293ddfma37973 fma 1 9.999999999999999E+384 1 -> 9.999999999999999E+384 Inexact Rounded 1294ddfma37974 fma 1 9999999999999999E+369 1 -> 9.999999999999999E+384 Inexact Rounded 1295ddfma37975 fma 1 9999999999999999E+369 1E+369 -> Infinity Overflow Inexact Rounded 1296ddfma37976 fma 1 9999999999999999E+369 9E+368 -> Infinity Overflow Inexact Rounded 1297ddfma37977 fma 1 9999999999999999E+369 8E+368 -> Infinity Overflow Inexact Rounded 1298ddfma37978 fma 1 9999999999999999E+369 7E+368 -> Infinity Overflow Inexact Rounded 1299ddfma37979 fma 1 9999999999999999E+369 6E+368 -> Infinity Overflow Inexact Rounded 1300ddfma37980 fma 1 9999999999999999E+369 5E+368 -> Infinity Overflow Inexact Rounded 1301ddfma37981 fma 1 9999999999999999E+369 4E+368 -> 9.999999999999999E+384 Inexact Rounded 1302ddfma37982 fma 1 9999999999999999E+369 3E+368 -> 9.999999999999999E+384 Inexact Rounded 1303ddfma37983 fma 1 9999999999999999E+369 2E+368 -> 9.999999999999999E+384 Inexact Rounded 1304ddfma37984 fma 1 9999999999999999E+369 1E+368 -> 9.999999999999999E+384 Inexact Rounded 1305 1306ddfma37985 apply -9.999999999999999E+384 -> -9.999999999999999E+384 1307ddfma37986 fma 1 -9.999999999999999E+384 -1 -> -9.999999999999999E+384 Inexact Rounded 1308ddfma37987 fma 1 -9999999999999999E+369 -1 -> -9.999999999999999E+384 Inexact Rounded 1309ddfma37988 fma 1 -9999999999999999E+369 -1E+369 -> -Infinity Overflow Inexact Rounded 1310ddfma37989 fma 1 -9999999999999999E+369 -9E+368 -> -Infinity Overflow Inexact Rounded 1311ddfma37990 fma 1 -9999999999999999E+369 -8E+368 -> -Infinity Overflow Inexact Rounded 1312ddfma37991 fma 1 -9999999999999999E+369 -7E+368 -> -Infinity Overflow Inexact Rounded 1313ddfma37992 fma 1 -9999999999999999E+369 -6E+368 -> -Infinity Overflow Inexact Rounded 1314ddfma37993 fma 1 -9999999999999999E+369 -5E+368 -> -Infinity Overflow Inexact Rounded 1315ddfma37994 fma 1 -9999999999999999E+369 -4E+368 -> -9.999999999999999E+384 Inexact Rounded 1316ddfma37995 fma 1 -9999999999999999E+369 -3E+368 -> -9.999999999999999E+384 Inexact Rounded 1317ddfma37996 fma 1 -9999999999999999E+369 -2E+368 -> -9.999999999999999E+384 Inexact Rounded 1318ddfma37997 fma 1 -9999999999999999E+369 -1E+368 -> -9.999999999999999E+384 Inexact Rounded 1319 1320-- And for round down full and subnormal results 1321rounding: down 1322ddfma371100 fma 1 1e+2 -1e-383 -> 99.99999999999999 Rounded Inexact 1323ddfma371101 fma 1 1e+1 -1e-383 -> 9.999999999999999 Rounded Inexact 1324ddfma371103 fma 1 +1 -1e-383 -> 0.9999999999999999 Rounded Inexact 1325ddfma371104 fma 1 1e-1 -1e-383 -> 0.09999999999999999 Rounded Inexact 1326ddfma371105 fma 1 1e-2 -1e-383 -> 0.009999999999999999 Rounded Inexact 1327ddfma371106 fma 1 1e-3 -1e-383 -> 0.0009999999999999999 Rounded Inexact 1328ddfma371107 fma 1 1e-4 -1e-383 -> 0.00009999999999999999 Rounded Inexact 1329ddfma371108 fma 1 1e-5 -1e-383 -> 0.000009999999999999999 Rounded Inexact 1330ddfma371109 fma 1 1e-6 -1e-383 -> 9.999999999999999E-7 Rounded Inexact 1331 1332rounding: ceiling 1333ddfma371110 fma 1 -1e+2 +1e-383 -> -99.99999999999999 Rounded Inexact 1334ddfma371111 fma 1 -1e+1 +1e-383 -> -9.999999999999999 Rounded Inexact 1335ddfma371113 fma 1 -1 +1e-383 -> -0.9999999999999999 Rounded Inexact 1336ddfma371114 fma 1 -1e-1 +1e-383 -> -0.09999999999999999 Rounded Inexact 1337ddfma371115 fma 1 -1e-2 +1e-383 -> -0.009999999999999999 Rounded Inexact 1338ddfma371116 fma 1 -1e-3 +1e-383 -> -0.0009999999999999999 Rounded Inexact 1339ddfma371117 fma 1 -1e-4 +1e-383 -> -0.00009999999999999999 Rounded Inexact 1340ddfma371118 fma 1 -1e-5 +1e-383 -> -0.000009999999999999999 Rounded Inexact 1341ddfma371119 fma 1 -1e-6 +1e-383 -> -9.999999999999999E-7 Rounded Inexact 1342 1343-- tests based on Gunnar Degnbol's edge case 1344rounding: half_even 1345 1346ddfma371300 fma 1 1E16 -0.5 -> 1.000000000000000E+16 Inexact Rounded 1347ddfma371310 fma 1 1E16 -0.51 -> 9999999999999999 Inexact Rounded 1348ddfma371311 fma 1 1E16 -0.501 -> 9999999999999999 Inexact Rounded 1349ddfma371312 fma 1 1E16 -0.5001 -> 9999999999999999 Inexact Rounded 1350ddfma371313 fma 1 1E16 -0.50001 -> 9999999999999999 Inexact Rounded 1351ddfma371314 fma 1 1E16 -0.500001 -> 9999999999999999 Inexact Rounded 1352ddfma371315 fma 1 1E16 -0.5000001 -> 9999999999999999 Inexact Rounded 1353ddfma371316 fma 1 1E16 -0.50000001 -> 9999999999999999 Inexact Rounded 1354ddfma371317 fma 1 1E16 -0.500000001 -> 9999999999999999 Inexact Rounded 1355ddfma371318 fma 1 1E16 -0.5000000001 -> 9999999999999999 Inexact Rounded 1356ddfma371319 fma 1 1E16 -0.50000000001 -> 9999999999999999 Inexact Rounded 1357ddfma371320 fma 1 1E16 -0.500000000001 -> 9999999999999999 Inexact Rounded 1358ddfma371321 fma 1 1E16 -0.5000000000001 -> 9999999999999999 Inexact Rounded 1359ddfma371322 fma 1 1E16 -0.50000000000001 -> 9999999999999999 Inexact Rounded 1360ddfma371323 fma 1 1E16 -0.500000000000001 -> 9999999999999999 Inexact Rounded 1361ddfma371324 fma 1 1E16 -0.5000000000000001 -> 9999999999999999 Inexact Rounded 1362ddfma371325 fma 1 1E16 -0.5000000000000000 -> 1.000000000000000E+16 Inexact Rounded 1363ddfma371326 fma 1 1E16 -0.500000000000000 -> 1.000000000000000E+16 Inexact Rounded 1364ddfma371327 fma 1 1E16 -0.50000000000000 -> 1.000000000000000E+16 Inexact Rounded 1365ddfma371328 fma 1 1E16 -0.5000000000000 -> 1.000000000000000E+16 Inexact Rounded 1366ddfma371329 fma 1 1E16 -0.500000000000 -> 1.000000000000000E+16 Inexact Rounded 1367ddfma371330 fma 1 1E16 -0.50000000000 -> 1.000000000000000E+16 Inexact Rounded 1368ddfma371331 fma 1 1E16 -0.5000000000 -> 1.000000000000000E+16 Inexact Rounded 1369ddfma371332 fma 1 1E16 -0.500000000 -> 1.000000000000000E+16 Inexact Rounded 1370ddfma371333 fma 1 1E16 -0.50000000 -> 1.000000000000000E+16 Inexact Rounded 1371ddfma371334 fma 1 1E16 -0.5000000 -> 1.000000000000000E+16 Inexact Rounded 1372ddfma371335 fma 1 1E16 -0.500000 -> 1.000000000000000E+16 Inexact Rounded 1373ddfma371336 fma 1 1E16 -0.50000 -> 1.000000000000000E+16 Inexact Rounded 1374ddfma371337 fma 1 1E16 -0.5000 -> 1.000000000000000E+16 Inexact Rounded 1375ddfma371338 fma 1 1E16 -0.500 -> 1.000000000000000E+16 Inexact Rounded 1376ddfma371339 fma 1 1E16 -0.50 -> 1.000000000000000E+16 Inexact Rounded 1377 1378ddfma371340 fma 1 1E16 -5000000.000010001 -> 9999999995000000 Inexact Rounded 1379ddfma371341 fma 1 1E16 -5000000.000000001 -> 9999999995000000 Inexact Rounded 1380 1381ddfma371349 fma 1 9999999999999999 0.4 -> 9999999999999999 Inexact Rounded 1382ddfma371350 fma 1 9999999999999999 0.49 -> 9999999999999999 Inexact Rounded 1383ddfma371351 fma 1 9999999999999999 0.499 -> 9999999999999999 Inexact Rounded 1384ddfma371352 fma 1 9999999999999999 0.4999 -> 9999999999999999 Inexact Rounded 1385ddfma371353 fma 1 9999999999999999 0.49999 -> 9999999999999999 Inexact Rounded 1386ddfma371354 fma 1 9999999999999999 0.499999 -> 9999999999999999 Inexact Rounded 1387ddfma371355 fma 1 9999999999999999 0.4999999 -> 9999999999999999 Inexact Rounded 1388ddfma371356 fma 1 9999999999999999 0.49999999 -> 9999999999999999 Inexact Rounded 1389ddfma371357 fma 1 9999999999999999 0.499999999 -> 9999999999999999 Inexact Rounded 1390ddfma371358 fma 1 9999999999999999 0.4999999999 -> 9999999999999999 Inexact Rounded 1391ddfma371359 fma 1 9999999999999999 0.49999999999 -> 9999999999999999 Inexact Rounded 1392ddfma371360 fma 1 9999999999999999 0.499999999999 -> 9999999999999999 Inexact Rounded 1393ddfma371361 fma 1 9999999999999999 0.4999999999999 -> 9999999999999999 Inexact Rounded 1394ddfma371362 fma 1 9999999999999999 0.49999999999999 -> 9999999999999999 Inexact Rounded 1395ddfma371363 fma 1 9999999999999999 0.499999999999999 -> 9999999999999999 Inexact Rounded 1396ddfma371364 fma 1 9999999999999999 0.4999999999999999 -> 9999999999999999 Inexact Rounded 1397ddfma371365 fma 1 9999999999999999 0.5000000000000000 -> 1.000000000000000E+16 Inexact Rounded 1398ddfma371367 fma 1 9999999999999999 0.500000000000000 -> 1.000000000000000E+16 Inexact Rounded 1399ddfma371368 fma 1 9999999999999999 0.50000000000000 -> 1.000000000000000E+16 Inexact Rounded 1400ddfma371369 fma 1 9999999999999999 0.5000000000000 -> 1.000000000000000E+16 Inexact Rounded 1401ddfma371370 fma 1 9999999999999999 0.500000000000 -> 1.000000000000000E+16 Inexact Rounded 1402ddfma371371 fma 1 9999999999999999 0.50000000000 -> 1.000000000000000E+16 Inexact Rounded 1403ddfma371372 fma 1 9999999999999999 0.5000000000 -> 1.000000000000000E+16 Inexact Rounded 1404ddfma371373 fma 1 9999999999999999 0.500000000 -> 1.000000000000000E+16 Inexact Rounded 1405ddfma371374 fma 1 9999999999999999 0.50000000 -> 1.000000000000000E+16 Inexact Rounded 1406ddfma371375 fma 1 9999999999999999 0.5000000 -> 1.000000000000000E+16 Inexact Rounded 1407ddfma371376 fma 1 9999999999999999 0.500000 -> 1.000000000000000E+16 Inexact Rounded 1408ddfma371377 fma 1 9999999999999999 0.50000 -> 1.000000000000000E+16 Inexact Rounded 1409ddfma371378 fma 1 9999999999999999 0.5000 -> 1.000000000000000E+16 Inexact Rounded 1410ddfma371379 fma 1 9999999999999999 0.500 -> 1.000000000000000E+16 Inexact Rounded 1411ddfma371380 fma 1 9999999999999999 0.50 -> 1.000000000000000E+16 Inexact Rounded 1412ddfma371381 fma 1 9999999999999999 0.5 -> 1.000000000000000E+16 Inexact Rounded 1413ddfma371382 fma 1 9999999999999999 0.5000000000000001 -> 1.000000000000000E+16 Inexact Rounded 1414ddfma371383 fma 1 9999999999999999 0.500000000000001 -> 1.000000000000000E+16 Inexact Rounded 1415ddfma371384 fma 1 9999999999999999 0.50000000000001 -> 1.000000000000000E+16 Inexact Rounded 1416ddfma371385 fma 1 9999999999999999 0.5000000000001 -> 1.000000000000000E+16 Inexact Rounded 1417ddfma371386 fma 1 9999999999999999 0.500000000001 -> 1.000000000000000E+16 Inexact Rounded 1418ddfma371387 fma 1 9999999999999999 0.50000000001 -> 1.000000000000000E+16 Inexact Rounded 1419ddfma371388 fma 1 9999999999999999 0.5000000001 -> 1.000000000000000E+16 Inexact Rounded 1420ddfma371389 fma 1 9999999999999999 0.500000001 -> 1.000000000000000E+16 Inexact Rounded 1421ddfma371390 fma 1 9999999999999999 0.50000001 -> 1.000000000000000E+16 Inexact Rounded 1422ddfma371391 fma 1 9999999999999999 0.5000001 -> 1.000000000000000E+16 Inexact Rounded 1423ddfma371392 fma 1 9999999999999999 0.500001 -> 1.000000000000000E+16 Inexact Rounded 1424ddfma371393 fma 1 9999999999999999 0.50001 -> 1.000000000000000E+16 Inexact Rounded 1425ddfma371394 fma 1 9999999999999999 0.5001 -> 1.000000000000000E+16 Inexact Rounded 1426ddfma371395 fma 1 9999999999999999 0.501 -> 1.000000000000000E+16 Inexact Rounded 1427ddfma371396 fma 1 9999999999999999 0.51 -> 1.000000000000000E+16 Inexact Rounded 1428 1429-- More GD edge cases, where difference between the unadjusted 1430-- exponents is larger than the maximum precision and one side is 0 1431ddfma371420 fma 1 0 1.123456789012345 -> 1.123456789012345 1432ddfma371421 fma 1 0 1.123456789012345E-1 -> 0.1123456789012345 1433ddfma371422 fma 1 0 1.123456789012345E-2 -> 0.01123456789012345 1434ddfma371423 fma 1 0 1.123456789012345E-3 -> 0.001123456789012345 1435ddfma371424 fma 1 0 1.123456789012345E-4 -> 0.0001123456789012345 1436ddfma371425 fma 1 0 1.123456789012345E-5 -> 0.00001123456789012345 1437ddfma371426 fma 1 0 1.123456789012345E-6 -> 0.000001123456789012345 1438ddfma371427 fma 1 0 1.123456789012345E-7 -> 1.123456789012345E-7 1439ddfma371428 fma 1 0 1.123456789012345E-8 -> 1.123456789012345E-8 1440ddfma371429 fma 1 0 1.123456789012345E-9 -> 1.123456789012345E-9 1441ddfma371430 fma 1 0 1.123456789012345E-10 -> 1.123456789012345E-10 1442ddfma371431 fma 1 0 1.123456789012345E-11 -> 1.123456789012345E-11 1443ddfma371432 fma 1 0 1.123456789012345E-12 -> 1.123456789012345E-12 1444ddfma371433 fma 1 0 1.123456789012345E-13 -> 1.123456789012345E-13 1445ddfma371434 fma 1 0 1.123456789012345E-14 -> 1.123456789012345E-14 1446ddfma371435 fma 1 0 1.123456789012345E-15 -> 1.123456789012345E-15 1447ddfma371436 fma 1 0 1.123456789012345E-16 -> 1.123456789012345E-16 1448ddfma371437 fma 1 0 1.123456789012345E-17 -> 1.123456789012345E-17 1449ddfma371438 fma 1 0 1.123456789012345E-18 -> 1.123456789012345E-18 1450ddfma371439 fma 1 0 1.123456789012345E-19 -> 1.123456789012345E-19 1451 1452-- same, reversed 0 1453ddfma371440 fma 1 1.123456789012345 0 -> 1.123456789012345 1454ddfma371441 fma 1 1.123456789012345E-1 0 -> 0.1123456789012345 1455ddfma371442 fma 1 1.123456789012345E-2 0 -> 0.01123456789012345 1456ddfma371443 fma 1 1.123456789012345E-3 0 -> 0.001123456789012345 1457ddfma371444 fma 1 1.123456789012345E-4 0 -> 0.0001123456789012345 1458ddfma371445 fma 1 1.123456789012345E-5 0 -> 0.00001123456789012345 1459ddfma371446 fma 1 1.123456789012345E-6 0 -> 0.000001123456789012345 1460ddfma371447 fma 1 1.123456789012345E-7 0 -> 1.123456789012345E-7 1461ddfma371448 fma 1 1.123456789012345E-8 0 -> 1.123456789012345E-8 1462ddfma371449 fma 1 1.123456789012345E-9 0 -> 1.123456789012345E-9 1463ddfma371450 fma 1 1.123456789012345E-10 0 -> 1.123456789012345E-10 1464ddfma371451 fma 1 1.123456789012345E-11 0 -> 1.123456789012345E-11 1465ddfma371452 fma 1 1.123456789012345E-12 0 -> 1.123456789012345E-12 1466ddfma371453 fma 1 1.123456789012345E-13 0 -> 1.123456789012345E-13 1467ddfma371454 fma 1 1.123456789012345E-14 0 -> 1.123456789012345E-14 1468ddfma371455 fma 1 1.123456789012345E-15 0 -> 1.123456789012345E-15 1469ddfma371456 fma 1 1.123456789012345E-16 0 -> 1.123456789012345E-16 1470ddfma371457 fma 1 1.123456789012345E-17 0 -> 1.123456789012345E-17 1471ddfma371458 fma 1 1.123456789012345E-18 0 -> 1.123456789012345E-18 1472ddfma371459 fma 1 1.123456789012345E-19 0 -> 1.123456789012345E-19 1473 1474-- same, Es on the 0 1475ddfma371460 fma 1 1.123456789012345 0E-0 -> 1.123456789012345 1476ddfma371461 fma 1 1.123456789012345 0E-1 -> 1.123456789012345 1477ddfma371462 fma 1 1.123456789012345 0E-2 -> 1.123456789012345 1478ddfma371463 fma 1 1.123456789012345 0E-3 -> 1.123456789012345 1479ddfma371464 fma 1 1.123456789012345 0E-4 -> 1.123456789012345 1480ddfma371465 fma 1 1.123456789012345 0E-5 -> 1.123456789012345 1481ddfma371466 fma 1 1.123456789012345 0E-6 -> 1.123456789012345 1482ddfma371467 fma 1 1.123456789012345 0E-7 -> 1.123456789012345 1483ddfma371468 fma 1 1.123456789012345 0E-8 -> 1.123456789012345 1484ddfma371469 fma 1 1.123456789012345 0E-9 -> 1.123456789012345 1485ddfma371470 fma 1 1.123456789012345 0E-10 -> 1.123456789012345 1486ddfma371471 fma 1 1.123456789012345 0E-11 -> 1.123456789012345 1487ddfma371472 fma 1 1.123456789012345 0E-12 -> 1.123456789012345 1488ddfma371473 fma 1 1.123456789012345 0E-13 -> 1.123456789012345 1489ddfma371474 fma 1 1.123456789012345 0E-14 -> 1.123456789012345 1490ddfma371475 fma 1 1.123456789012345 0E-15 -> 1.123456789012345 1491-- next four flag Rounded because the 0 extends the result 1492ddfma371476 fma 1 1.123456789012345 0E-16 -> 1.123456789012345 Rounded 1493ddfma371477 fma 1 1.123456789012345 0E-17 -> 1.123456789012345 Rounded 1494ddfma371478 fma 1 1.123456789012345 0E-18 -> 1.123456789012345 Rounded 1495ddfma371479 fma 1 1.123456789012345 0E-19 -> 1.123456789012345 Rounded 1496 1497-- sum of two opposite-sign operands is exactly 0 and floor => -0 1498rounding: half_up 1499-- exact zeros from zeros 1500ddfma371500 fma 1 0 0E-19 -> 0E-19 1501ddfma371501 fma 1 -0 0E-19 -> 0E-19 1502ddfma371502 fma 1 0 -0E-19 -> 0E-19 1503ddfma371503 fma 1 -0 -0E-19 -> -0E-19 1504-- exact zeros from non-zeros 1505ddfma371511 fma 1 -11 11 -> 0 1506ddfma371512 fma 1 11 -11 -> 0 1507 1508rounding: half_down 1509-- exact zeros from zeros 1510ddfma371520 fma 1 0 0E-19 -> 0E-19 1511ddfma371521 fma 1 -0 0E-19 -> 0E-19 1512ddfma371522 fma 1 0 -0E-19 -> 0E-19 1513ddfma371523 fma 1 -0 -0E-19 -> -0E-19 1514-- exact zeros from non-zeros 1515ddfma371531 fma 1 -11 11 -> 0 1516ddfma371532 fma 1 11 -11 -> 0 1517 1518rounding: half_even 1519-- exact zeros from zeros 1520ddfma371540 fma 1 0 0E-19 -> 0E-19 1521ddfma371541 fma 1 -0 0E-19 -> 0E-19 1522ddfma371542 fma 1 0 -0E-19 -> 0E-19 1523ddfma371543 fma 1 -0 -0E-19 -> -0E-19 1524-- exact zeros from non-zeros 1525ddfma371551 fma 1 -11 11 -> 0 1526ddfma371552 fma 1 11 -11 -> 0 1527 1528rounding: up 1529-- exact zeros from zeros 1530ddfma371560 fma 1 0 0E-19 -> 0E-19 1531ddfma371561 fma 1 -0 0E-19 -> 0E-19 1532ddfma371562 fma 1 0 -0E-19 -> 0E-19 1533ddfma371563 fma 1 -0 -0E-19 -> -0E-19 1534-- exact zeros from non-zeros 1535ddfma371571 fma 1 -11 11 -> 0 1536ddfma371572 fma 1 11 -11 -> 0 1537 1538rounding: down 1539-- exact zeros from zeros 1540ddfma371580 fma 1 0 0E-19 -> 0E-19 1541ddfma371581 fma 1 -0 0E-19 -> 0E-19 1542ddfma371582 fma 1 0 -0E-19 -> 0E-19 1543ddfma371583 fma 1 -0 -0E-19 -> -0E-19 1544-- exact zeros from non-zeros 1545ddfma371591 fma 1 -11 11 -> 0 1546ddfma371592 fma 1 11 -11 -> 0 1547 1548rounding: ceiling 1549-- exact zeros from zeros 1550ddfma371600 fma 1 0 0E-19 -> 0E-19 1551ddfma371601 fma 1 -0 0E-19 -> 0E-19 1552ddfma371602 fma 1 0 -0E-19 -> 0E-19 1553ddfma371603 fma 1 -0 -0E-19 -> -0E-19 1554-- exact zeros from non-zeros 1555ddfma371611 fma 1 -11 11 -> 0 1556ddfma371612 fma 1 11 -11 -> 0 1557 1558-- and the extra-special ugly case; unusual minuses marked by -- * 1559rounding: floor 1560-- exact zeros from zeros 1561ddfma371620 fma 1 0 0E-19 -> 0E-19 1562ddfma371621 fma 1 -0 0E-19 -> -0E-19 -- * 1563ddfma371622 fma 1 0 -0E-19 -> -0E-19 -- * 1564ddfma371623 fma 1 -0 -0E-19 -> -0E-19 1565-- exact zeros from non-zeros 1566ddfma371631 fma 1 -11 11 -> -0 -- * 1567ddfma371632 fma 1 11 -11 -> -0 -- * 1568 1569-- Examples from SQL proposal (Krishna Kulkarni) 1570ddfma371701 fma 1 130E-2 120E-2 -> 2.50 1571ddfma371702 fma 1 130E-2 12E-1 -> 2.50 1572ddfma371703 fma 1 130E-2 1E0 -> 2.30 1573ddfma371704 fma 1 1E2 1E4 -> 1.01E+4 1574ddfma371705 fma 1 130E-2 -120E-2 -> 0.10 1575ddfma371706 fma 1 130E-2 -12E-1 -> 0.10 1576ddfma371707 fma 1 130E-2 -1E0 -> 0.30 1577ddfma371708 fma 1 1E2 -1E4 -> -9.9E+3 1578 1579-- Gappy coefficients; check residue handling even with full coefficient gap 1580rounding: half_even 1581 1582ddfma375001 fma 1 1234567890123456 1 -> 1234567890123457 1583ddfma375002 fma 1 1234567890123456 0.6 -> 1234567890123457 Inexact Rounded 1584ddfma375003 fma 1 1234567890123456 0.06 -> 1234567890123456 Inexact Rounded 1585ddfma375004 fma 1 1234567890123456 6E-3 -> 1234567890123456 Inexact Rounded 1586ddfma375005 fma 1 1234567890123456 6E-4 -> 1234567890123456 Inexact Rounded 1587ddfma375006 fma 1 1234567890123456 6E-5 -> 1234567890123456 Inexact Rounded 1588ddfma375007 fma 1 1234567890123456 6E-6 -> 1234567890123456 Inexact Rounded 1589ddfma375008 fma 1 1234567890123456 6E-7 -> 1234567890123456 Inexact Rounded 1590ddfma375009 fma 1 1234567890123456 6E-8 -> 1234567890123456 Inexact Rounded 1591ddfma375010 fma 1 1234567890123456 6E-9 -> 1234567890123456 Inexact Rounded 1592ddfma375011 fma 1 1234567890123456 6E-10 -> 1234567890123456 Inexact Rounded 1593ddfma375012 fma 1 1234567890123456 6E-11 -> 1234567890123456 Inexact Rounded 1594ddfma375013 fma 1 1234567890123456 6E-12 -> 1234567890123456 Inexact Rounded 1595ddfma375014 fma 1 1234567890123456 6E-13 -> 1234567890123456 Inexact Rounded 1596ddfma375015 fma 1 1234567890123456 6E-14 -> 1234567890123456 Inexact Rounded 1597ddfma375016 fma 1 1234567890123456 6E-15 -> 1234567890123456 Inexact Rounded 1598ddfma375017 fma 1 1234567890123456 6E-16 -> 1234567890123456 Inexact Rounded 1599ddfma375018 fma 1 1234567890123456 6E-17 -> 1234567890123456 Inexact Rounded 1600ddfma375019 fma 1 1234567890123456 6E-18 -> 1234567890123456 Inexact Rounded 1601ddfma375020 fma 1 1234567890123456 6E-19 -> 1234567890123456 Inexact Rounded 1602ddfma375021 fma 1 1234567890123456 6E-20 -> 1234567890123456 Inexact Rounded 1603 1604-- widening second argument at gap 1605ddfma375030 fma 1 12345678 1 -> 12345679 1606ddfma375031 fma 1 12345678 0.1 -> 12345678.1 1607ddfma375032 fma 1 12345678 0.12 -> 12345678.12 1608ddfma375033 fma 1 12345678 0.123 -> 12345678.123 1609ddfma375034 fma 1 12345678 0.1234 -> 12345678.1234 1610ddfma375035 fma 1 12345678 0.12345 -> 12345678.12345 1611ddfma375036 fma 1 12345678 0.123456 -> 12345678.123456 1612ddfma375037 fma 1 12345678 0.1234567 -> 12345678.1234567 1613ddfma375038 fma 1 12345678 0.12345678 -> 12345678.12345678 1614ddfma375039 fma 1 12345678 0.123456789 -> 12345678.12345679 Inexact Rounded 1615ddfma375040 fma 1 12345678 0.123456785 -> 12345678.12345678 Inexact Rounded 1616ddfma375041 fma 1 12345678 0.1234567850 -> 12345678.12345678 Inexact Rounded 1617ddfma375042 fma 1 12345678 0.1234567851 -> 12345678.12345679 Inexact Rounded 1618ddfma375043 fma 1 12345678 0.12345678501 -> 12345678.12345679 Inexact Rounded 1619ddfma375044 fma 1 12345678 0.123456785001 -> 12345678.12345679 Inexact Rounded 1620ddfma375045 fma 1 12345678 0.1234567850001 -> 12345678.12345679 Inexact Rounded 1621ddfma375046 fma 1 12345678 0.12345678500001 -> 12345678.12345679 Inexact Rounded 1622ddfma375047 fma 1 12345678 0.123456785000001 -> 12345678.12345679 Inexact Rounded 1623ddfma375048 fma 1 12345678 0.1234567850000001 -> 12345678.12345679 Inexact Rounded 1624ddfma375049 fma 1 12345678 0.1234567850000000 -> 12345678.12345678 Inexact Rounded 1625-- 90123456 1626rounding: half_even 1627ddfma375050 fma 1 12345678 0.0234567750000000 -> 12345678.02345678 Inexact Rounded 1628ddfma375051 fma 1 12345678 0.0034567750000000 -> 12345678.00345678 Inexact Rounded 1629ddfma375052 fma 1 12345678 0.0004567750000000 -> 12345678.00045678 Inexact Rounded 1630ddfma375053 fma 1 12345678 0.0000567750000000 -> 12345678.00005678 Inexact Rounded 1631ddfma375054 fma 1 12345678 0.0000067750000000 -> 12345678.00000678 Inexact Rounded 1632ddfma375055 fma 1 12345678 0.0000007750000000 -> 12345678.00000078 Inexact Rounded 1633ddfma375056 fma 1 12345678 0.0000000750000000 -> 12345678.00000008 Inexact Rounded 1634ddfma375057 fma 1 12345678 0.0000000050000000 -> 12345678.00000000 Inexact Rounded 1635ddfma375060 fma 1 12345678 0.0234567750000001 -> 12345678.02345678 Inexact Rounded 1636ddfma375061 fma 1 12345678 0.0034567750000001 -> 12345678.00345678 Inexact Rounded 1637ddfma375062 fma 1 12345678 0.0004567750000001 -> 12345678.00045678 Inexact Rounded 1638ddfma375063 fma 1 12345678 0.0000567750000001 -> 12345678.00005678 Inexact Rounded 1639ddfma375064 fma 1 12345678 0.0000067750000001 -> 12345678.00000678 Inexact Rounded 1640ddfma375065 fma 1 12345678 0.0000007750000001 -> 12345678.00000078 Inexact Rounded 1641ddfma375066 fma 1 12345678 0.0000000750000001 -> 12345678.00000008 Inexact Rounded 1642ddfma375067 fma 1 12345678 0.0000000050000001 -> 12345678.00000001 Inexact Rounded 1643-- far-out residues (full coefficient gap is 16+15 digits) 1644rounding: up 1645ddfma375070 fma 1 12345678 1E-8 -> 12345678.00000001 1646ddfma375071 fma 1 12345678 1E-9 -> 12345678.00000001 Inexact Rounded 1647ddfma375072 fma 1 12345678 1E-10 -> 12345678.00000001 Inexact Rounded 1648ddfma375073 fma 1 12345678 1E-11 -> 12345678.00000001 Inexact Rounded 1649ddfma375074 fma 1 12345678 1E-12 -> 12345678.00000001 Inexact Rounded 1650ddfma375075 fma 1 12345678 1E-13 -> 12345678.00000001 Inexact Rounded 1651ddfma375076 fma 1 12345678 1E-14 -> 12345678.00000001 Inexact Rounded 1652ddfma375077 fma 1 12345678 1E-15 -> 12345678.00000001 Inexact Rounded 1653ddfma375078 fma 1 12345678 1E-16 -> 12345678.00000001 Inexact Rounded 1654ddfma375079 fma 1 12345678 1E-17 -> 12345678.00000001 Inexact Rounded 1655ddfma375080 fma 1 12345678 1E-18 -> 12345678.00000001 Inexact Rounded 1656ddfma375081 fma 1 12345678 1E-19 -> 12345678.00000001 Inexact Rounded 1657ddfma375082 fma 1 12345678 1E-20 -> 12345678.00000001 Inexact Rounded 1658ddfma375083 fma 1 12345678 1E-25 -> 12345678.00000001 Inexact Rounded 1659ddfma375084 fma 1 12345678 1E-30 -> 12345678.00000001 Inexact Rounded 1660ddfma375085 fma 1 12345678 1E-31 -> 12345678.00000001 Inexact Rounded 1661ddfma375086 fma 1 12345678 1E-32 -> 12345678.00000001 Inexact Rounded 1662ddfma375087 fma 1 12345678 1E-33 -> 12345678.00000001 Inexact Rounded 1663ddfma375088 fma 1 12345678 1E-34 -> 12345678.00000001 Inexact Rounded 1664ddfma375089 fma 1 12345678 1E-35 -> 12345678.00000001 Inexact Rounded 1665 1666-- desctructive subtraction (from remainder tests) 1667 1668-- +++ some of these will be off-by-one remainder vs remainderNear 1669 1670ddfma4000 fma -1234567890123454 1.000000000000001 1234567890123456 -> 0.765432109876546 1671ddfma4001 fma -1234567890123443 1.00000000000001 1234567890123456 -> 0.65432109876557 1672ddfma4002 fma -1234567890123332 1.0000000000001 1234567890123456 -> 0.5432109876668 1673ddfma4003 fma -308641972530863 4.000000000000001 1234567890123455 -> 2.691358027469137 1674ddfma4004 fma -308641972530863 4.000000000000001 1234567890123456 -> 3.691358027469137 1675ddfma4005 fma -246913578024696 4.9999999999999 1234567890123456 -> 0.6913578024696 1676ddfma4006 fma -246913578024691 4.99999999999999 1234567890123456 -> 3.46913578024691 1677ddfma4007 fma -246913578024691 4.999999999999999 1234567890123456 -> 1.246913578024691 1678ddfma4008 fma -246913578024691 5.000000000000001 1234567890123456 -> 0.753086421975309 1679ddfma4009 fma -246913578024690 5.00000000000001 1234567890123456 -> 3.53086421975310 1680ddfma4010 fma -246913578024686 5.0000000000001 1234567890123456 -> 1.3086421975314 1681ddfma4011 fma -1234567890123455 1.000000000000001 1234567890123456 -> -0.234567890123455 1682ddfma4012 fma -1234567890123444 1.00000000000001 1234567890123456 -> -0.34567890123444 1683ddfma4013 fma -1234567890123333 1.0000000000001 1234567890123456 -> -0.4567890123333 1684ddfma4014 fma -308641972530864 4.000000000000001 1234567890123455 -> -1.308641972530864 1685ddfma4015 fma -308641972530864 4.000000000000001 1234567890123456 -> -0.308641972530864 1686ddfma4016 fma -246913578024696 4.9999999999999 1234567890123456 -> 0.6913578024696 1687ddfma4017 fma -246913578024692 4.99999999999999 1234567890123456 -> -1.53086421975308 1688ddfma4018 fma -246913578024691 4.999999999999999 1234567890123456 -> 1.246913578024691 1689ddfma4019 fma -246913578024691 5.000000000000001 1234567890123456 -> 0.753086421975309 1690ddfma4020 fma -246913578024691 5.00000000000001 1234567890123456 -> -1.46913578024691 1691ddfma4021 fma -246913578024686 5.0000000000001 1234567890123456 -> 1.3086421975314 1692 1693 1694-- Null tests 1695ddfma39990 fma 1 10 # -> NaN Invalid_operation 1696ddfma39991 fma 1 # 10 -> NaN Invalid_operation 1697 1698 1699