InvalidOperationException | x, y or z is signaling NaN |
InvalidOperationException | (x, y) = (±∞, ±0.0) or (±0.0, ±∞) |
InvalidOperationException | x or y is infinite, z is infinite but has opposing sign |
UnderflowException | result is too small to be represented |
OverflowException | result is too big to be represented |
InexactException | the result is inexact |
x | y | z | fma(x, y, z) |
---|---|---|---|
NaN | any | any | NaN |
any | NaN | any | NaN |
any | any | NaN | NaN |
±∞ | ±0.0 | any | NaN |
±0.0 | ±∞ | any | NaN |
+∞ | >0.0 | -∞ | NaN |
-∞ | <0.0 | -∞ | NaN |
-∞ | <0.0 | -∞ | NaN |
+∞ | >0.0 | -∞ | NaN |
-∞ | >0.0 | +∞ | NaN |
+∞ | <0.0 | +∞ | NaN |
+∞ | <0.0 | +∞ | NaN |
-∞ | >0.0 | +∞ | NaN |
>0.0 | +∞ | -∞ | NaN |
<0.0 | -∞ | -∞ | NaN |
<0.0 | -∞ | -∞ | NaN |
>0.0 | +∞ | -∞ | NaN |
>0.0 | -∞ | +∞ | NaN |
<0.0 | +∞ | +∞ | NaN |
<0.0 | +∞ | +∞ | NaN |
>0.0 | -∞ | +∞ | NaN |
+∞ | >0.0 | +∞ | +∞ |
-∞ | <0.0 | +∞ | +∞ |
+∞ | <0.0 | -∞ | -∞ |
-∞ | >0.0 | -∞ | -∞ |
>0.0 | +∞ | +∞ | +∞ |
<0.0 | -∞ | +∞ | +∞ |
<0.0 | +∞ | -∞ | -∞ |
>0.0 | -∞ | -∞ | -∞ |
+∞ | >0.0 | any | +∞ |
-∞ | <0.0 | any | +∞ |
+∞ | <0.0 | any | -∞ |
-∞ | >0.0 | any | -∞ |
>0.0 | +∞ | any | +∞ |
<0.0 | -∞ | any | +∞ |
<0.0 | +∞ | any | -∞ |
>0.0 | -∞ | any | -∞ |
decimal32 x = 2; decimal64 y = 3; decimal128 z = 5; assert (fma(x, y, z) == 11);
Returns (x * y) + z, rounding only once according to the current precision and rounding mode