Mlib_Log2 - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Log2

2.13 MLIB_Log2
The
MLIB_Log2
functions return the binary logarithm of the input. See the following
equation:
2.13.1 Available versions
This function is available in the following versions:
• Unsigned integer output - the output is the unsigned integer result.
The available versions of the
Function name
Input type
MLIB_Log2_U16
uint16_t
2.13.2 Declaration
The available
MLIB_Log2
uint16_t MLIB_Log2_U16(uint16_t
2.13.3 Function use
The use of the
MLIB_Log2
#include "mlib.h"
static
uint16_t
u16Result, u16Val;
void main(void)
{
u16Val = 5;
40
Equation 11. Algorithm formula
MLIB_Log2
function are shown in the following table.
Table 2-13. Function versions
Result type
uint16_t
Binary logarithm of a 16-bit unsigned integer value. The output is
greater than or equal to 0.
functions have the following declarations:
u16Val)
function is shown in the following example:
/* u16Val = 5 */
MLIB User's Guide, Rev. 2, 10/2015
Description
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents