Learn R Programming

ClamR (version 2.1-3)

NextPow2: Next power of 2

Description

Find the next integer power of 2

Usage

NextPow2(x)

Value

integer that is a power of 2 higher than given integer

Arguments

x

integer

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

Run this code

NextPow2(600)
NextPow2(1023)
NextPow2(1025)



Run the code above in your browser using DataLab