Mlib_Shr; Available Versions; Declaration - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_ShR

f16Val = FRAC16(-0.003);
u16Sh = 6;
/* f16Result =
sat(f16Val << u16Sh) */
f16Result = MLIB_ShLSat_F16(f16Val, u16Sh);
}
2.48 MLIB_ShR
The
MLIB_ShR
functions return the arithmetically shifted value to the right a specified
number of times. See the following equation:

2.48.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 available versions of the
Function name
Input type
Value
MLIB_ShR_F16
frac16_t
MLIB_ShR_F32
frac32_t

2.48.2 Declaration

The available
MLIB_ShR
frac16_t MLIB_ShR_F16(frac16_t
frac32_t MLIB_ShR_F32(frac32_t
88
/* f16Val = -0.003 */
/* u16Sh = 6 */
Equation 46. Algorithm formula
MLIB_ShR
function are shown in the following table.
Table 2-48. Function versions
Result
type
Shift
uint16_t
frac16_t
Shift of a 16-bit fractional value to the right by a number of times
given by the second argument; the shift is allowed within the range
<0 ; 15>. The output is within the range <-1 ; 1).
uint16_t
frac32_t
Shift of a 32-bit fractional value to the right by a number of times
given by the second argument; the shift is allowed within the range
<0 ; 31>. The output is within the range <-1 ; 1).
functions have the following declarations:
f16Val,
uint16_t
f32Val,
uint16_t
MLIB User's Guide, Rev. 2, 10/2015
Description
u16Sh)
u16Sh)
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents