powered by
pow2(f, e)
f * 2^e
e
f
nextpow2
pow2(c(0, 1, 2, 3)) #=> 1 2 4 8 pow2(c(0, -1, 2, 3), c(0,1,-2,3)) #=> 0.0 -2.0 0.5 24.0 pow2(1i) #=> 0.7692389+0.6389613i
Run the code above in your browser using DataLab