InvalidOperationException | x is signaling NaN |
UnderflowException | 2x - 1 is too small to be represented |
OverflowException | 2x - 1 is too big to be represented |
InexactException | the result is inexact |
x | exp2m1(x) |
---|---|
NaN | NaN |
±0.0 | ±0.0 |
-∞ | -1.0 |
+∞ | +∞ |
decimal32 x = 3; assert(exp2m1(x) == 7);
Calculates 2x - 1