InvalidOperationException | x is signaling NaN or x < -1.0 |
DivisionByZeroException | x = -1.0 and n < 0 |
OverflowException | result is too big to be represented |
UnderflowException | result is too small to be represented |
InexactException | the result is inexact |
x | n | compound(x, n) |
---|---|---|
sNaN | any | NaN |
any | 0 | +1.0 |
-1.0 | <0 | +∞ |
-1.0 | >0 | +0.0 |
+∞ | any | +∞ |
decimal32 x = "0.2"; assert (compound(x, 2) == decimal32("1.44"));
Computes (1 + x)n where n is an integer