Declaration; Function Use; Mlib_Shl; Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

2.45.2 Declaration

The available
MLIB_Sh1R
frac16_t MLIB_Sh1R_F16(frac16_t
frac32_t MLIB_Sh1R_F32(frac32_t

2.45.3 Function use

The use of the
MLIB_Sh1R
#include "mlib.h"
static
frac32_t
f32Result, f32Val;
void main(void)
{
f32Val = FRAC32(-0.354);
/* f32Result = f32Val >> 1 */
f32Result = MLIB_Sh1R_F32(f32Val);
}

2.46 MLIB_ShL

The
MLIB_ShL
functions return the arithmetically shifted value to the left a specified
number of times. The function does not saturate the output. See the following equation:

2.46.1 Available versions

This function is available in the following versions:
• Fractional output - the output is the fractional portion of the result; the result is
within the range <-1 ; 1). The result may overflow.
Freescale Semiconductor, Inc.
functions have the following declarations:
f16Val)
f32Val)
function is shown in the following example:
/* f32Val = -0.354 */
Equation 44. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
85

Advertisement

Table of Contents
loading

Table of Contents