Learn R Programming

ifultools (version 2.0-23)

nextDyadic: Next integer power of 2

Description

Find smallest power of two that is greater than or equal to an input x.

Usage

nextDyadic(x)

Arguments

x

a real number. May be positive, zero, or negative.

Value

returns the next power of two that is greater than, or equal to, the input x. If x is negative, 1 is returned.

See Also

isVectorAtomic, decibel.

Examples

Run this code
# NOT RUN {
nextDyadic(15)
# }

Run the code above in your browser using DataLab