exp2

power of 2.

real
exp2
(
real x
)

Examples

1 static assert(real.nan.exp2.isNaN);
2 static assert(real.infinity.exp2.isInfinity);
3 static assert((-real.infinity).exp2 == 0);
4 static assert(0.exp2 == 1);
5 static assert(2.exp2 == 4);
6 static assert(8.exp2 == 256);
7 static assert((-1).exp2 == 0.5);

Meta