NEXTPOW2

Purpose:

Determines the exponent for the next power of 2 greater than or equal to the input value.

Syntax:

NEXTPOW2(val)

val

-

A real value or a series or table.

Returns:

An integer.

Example:

nextpow2(55)

 

returns 6. 2^6 == 64.

Example:

nextpow2(64)

 

returns 6. 2^6 == 64.

Example:

nextpow2(100)

 

returns 7. 2^7 == 128.

Example:

W1: 1..1024

nextpow2(w1)

 

returns 10. The length is 1024; 2^10 == 1024.

Remarks:

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.

See Also:

BESTPOW2

FFT

LOG2