# fn() log2
Computes floored logarithm of base 2 for integer types

Defined in | <seqan/basic.h>
Signature | `unsigned log2(i);`

## Parameters

`i` | An integer type.

## Return Values

`unsigned` | The largest integer smaller or equal than the logarithm of `i`.

## Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### Dox Sources

    /*!
     * @fn log2
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Computes floored logarithm of base 2 for integer types
     *
     * @signature unsigned log2(i);
     *
     * @param[in] i An integer type.
     *
     * @return unsigned The largest integer smaller or equal than the logarithm of
     *                  <tt>i</tt>.
     */