exp2m1

Calculates 2x - 1

@IEEECompliant("exp2m1", 42)
D
exp2m1
(
D
)
(
auto const ref D x
)

Throws

InvalidOperationExceptionx is signaling NaN
UnderflowException2x - 1 is too small to be represented
OverflowException2x - 1 is too big to be represented
InexactExceptionthe result is inexact

Special values

xexp2m1(x)
NaNNaN
±0.0±0.0
-∞-1.0
+∞+∞

Examples

decimal32 x = 3;
assert(exp2m1(x) == 7);

Meta