Declaration; Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Sat

2.41.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 saturate.
The available versions of the
Function name
Input type
MLIB_RndSat_F16l
frac32_t

2.41.2 Declaration

The available
MLIB_RndSat
frac16_t MLIB_RndSat_F16l(frac32_t
2.41.3 Function use
The use of the
MLIB_RndSat
#include "mlib.h"
static
frac32_t
f32Val;
static
frac16_t
f16Result;
void main(void)
{
f32Val = FRAC32(0.9997996);
/* f16Result = sat(round(f32Val)) */
f16Result = MLIB_RndSat_F16l(f32Val);
}
2.42 MLIB_Sat
80
Equation 39. Algorithm formula
MLIB_RndSat
function are shown in the following table.
Table 2-41. Function versions
Result type
frac16_t
Rounding of a 32-bit fractional value to a 16-bit fractional value.
The output is within the range <-1 ; 1).
functions have the following declarations:
f32Val)
function is shown in the following example:
/* f32Val = 0.9997996 */
MLIB User's Guide, Rev. 2, 10/2015
Description
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents