Learn R Programming

lgcp (version 1.3-3)

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
is.pow2(128)  # TRUE
is.pow2(64.9) # FALSE

Run the code above in your browser using DataLab