DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > NEXTPOW2
Determines the exponent for the next power of 2 greater than or equal to the input value.
NEXTPOW2(val)
val |
- |
A real value or a series or table. |
An integer.
nextpow2(55)
returns 6. 2^6 == 64.
nextpow2(64)
returns 6. 2^6 == 64.
nextpow2(100)
returns 7. 2^7 == 128.
W1: 1..1024
nextpow2(w1)
returns 10. The length is 1024; 2^10 == 1024.
If the input is a series or table, the return value is the next power of 2 greater than or equal to the length of the series.