Mlib_Subsat; Available Versions; Function Use - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

frac16_t MLIB_Sub_F16(frac16_t
frac32_t MLIB_Sub_F32(frac32_t
acc32_t MLIB_Sub_A32ss(frac16_t
acc32_t MLIB_Sub_A32as(acc32_t

2.54.3 Function use

The use of the
MLIB_Sub
#include "mlib.h"
static
acc32_t
a32Accum, a32Result;
static
frac16_t
f16Sub;
void main(void)
{
a32Accum = ACC32(4.5);
f16Sub = FRAC16(0.4);
/* a32Result = a32Accum - f16Sub */
a32Result = MLIB_Sub_A32as(a32Accum,f16Sub);
}

2.55 MLIB_SubSat

The
MLIB_SubSat
functions subtract the subtrahend from the minuend. The function
saturates the output. See the following equation:

2.55.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.
Freescale Semiconductor, Inc.
f16Min,
frac16_t
f16Sub)
f32Min,
frac32_t
f32Sub)
f16Min,
frac16_t
f16Sub)
a32Accum,
frac16_t
function is shown in the following example:
/* a32Accum = 4.5 */
/* f16Sub = 0.4 */
Equation 53. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
f16Sub)
97

Advertisement

Table of Contents
loading

Table of Contents