is.pow2 {lgcp}R Documentation

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

is.pow2(128)  # TRUE
is.pow2(64.9) # FALSE

[Package lgcp version 2.0 Index]