Return the base‐2 logarithm of the specified value rounded up to the nearest integer. The behavior is undefined unless 0 < value.

Synopsis

Declared in <bdlb_bitutil.h>

static
int
log2(unsigned int value);

Return Value

base‐2 logarithm of value rounded up to the nearest integer

Parameters

Name

Description

value

value whose base‐2 logarithm is returned

Created with MrDocs