25. Counting 1 bits {VeryLargeIntegers}R Documentation

Counting the Number of 1-Bits in vli Objects

Description

Counting the number of 1-bits in the base 2 expression of vli (Very Large Integer) objects.

Usage

count1bits(x)

## Default S3 method:
count1bits(x)

## S3 method for class 'numeric'
count1bits(x)

## S3 method for class 'vli'
count1bits(x)

Arguments

x

object of class vli

Value

integer

Author(s)

Javier Leiva Cuadrado

Examples

x <- as.vli("69158247560284795612")
count1bits(x)

[Package VeryLargeIntegers version 0.2.1 Index]