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

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

2.56.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.
The available versions of the
Function name
Minuend
MLIB_Sub4_F16
frac16_t
MLIB_Sub4_F32
frac32_t

2.56.2 Declaration

The available

MLIB_Sub4

frac16_t MLIB_Sub4_F16(frac16_t
frac32_t MLIB_Sub4_F32(frac32_t

2.56.3 Function use

The use of the
MLIB_Sub4
#include "mlib.h"
static
frac16_t
f16Result, f16Min, f16Sub1, f16Sub2, f16Sub3;
void main(void)
{
f16Min = FRAC16(0.2);
f16Sub1 = FRAC16(0.3);
f16Sub2 = FRAC16(-0.5);
f16Sub3 = FRAC16(0.2);
/* f16Result = sat(f16Min - f16Sub1 - f16Sub2 - f16Sub3) */
f16Result = MLIB_Sub4_F16(f16Min, f16Sub1, f16Sub2, f16Sub3);
}
Freescale Semiconductor, Inc.
MLIB_Sub4
function are shown in the following table.
Table 2-56. Function versions
Input type
Sub. 1
Sub. 2
Sub. 3
frac16_t
frac16_t
frac16_t
frac32_t
frac32_t
frac32_t
functions have the following declarations:
f16Min,
frac16_t
f32Min,
frac32_t
function is shown in the following example:
/* f16Min = 0.2 */
/* f16Sub1 = 0.3 */
/* f16Sub2 = -0.5 */
/* f16Sub3 = 0.2 */
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
Result
type
frac16_t
Subtraction of three 16-bit fractional
subtrahends from 16-bit fractional
minuend. The output is within the range
<-1 ; 1).
frac32_t
Subtraction of three 32-bit fractional
subtrahends from 32-bit fractional
minuend. The output is within the range
<-1 ; 1).
f16Sub1,
frac16_t
f16Sub2,
f32Sub1,
frac32_t
f32Sub2,
Description
frac16_t
f16Sub3)
frac32_t
f32Sub3)
99

Advertisement

Table of Contents
loading

Table of Contents