[#BloombergLP-bdlb-BitUtil-log2-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitUtil.adoc[BitUtil]::log2
:relfileprefix: ../../../
:mrdocs:

`log2` overloads

== Synopses

Declared in `&lt;bdlb&lowbar;bitutil&period;h&gt;`

Return the base&hyphen;2 logarithm of the specified `value` rounded up to the nearest integer&period; The behavior is undefined unless `0 &lt; value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlb/BitUtil/log2-02d.adoc[log2](unsigned int value);
----

[.small]#xref:BloombergLP/bdlb/BitUtil/log2-02d.adoc[_» more&period;&period;&period;_]#

Same as the `unsigned int` overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlb/BitUtil/log2-0d.adoc[log2](unsigned long value);
----

[.small]#xref:BloombergLP/bdlb/BitUtil/log2-0d.adoc[_» more&period;&period;&period;_]#

Same as the `unsigned int` overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlb/BitUtil/log2-023.adoc[log2](unsigned long long value);
----

[.small]#xref:BloombergLP/bdlb/BitUtil/log2-023.adoc[_» more&period;&period;&period;_]#

== Return Value

base&hyphen;2 logarithm of `value` rounded up to the nearest integer

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| value whose base&hyphen;2 logarithm is returned
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
