Learn R Programming

lgcp (version 1.8)

is.pow2: is.pow2 function

Description

Tests whether a number id

Usage

is.pow2(num)

Arguments

num

a numeric

Value

logical: is num a power of 2?

Examples

Run this code
# NOT RUN {
is.pow2(128)  # TRUE
is.pow2(64.9) # FALSE
# }

Run the code above in your browser using DataLab