Declaration; Mlib_Div - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_DivSat
Function name
Input type
Num.
MLIB_Div_A32ls
frac32_t
MLIB_Div_A32ll
frac32_t
MLIB_Div_A32as
acc32_t

2.9.2 Declaration

The available

MLIB_Div

frac16_t MLIB_Div_F16(frac16_t
frac16_t MLIB_Div_F16ls(frac32_t
frac16_t MLIB_Div_F16ll(frac32_t
frac32_t MLIB_Div_F32ls(frac32_t
frac32_t MLIB_Div_F32(frac32_t
acc32_t MLIB_Div_A32ss(frac16_t
acc32_t MLIB_Div_A32ls(frac32_t
acc32_t MLIB_Div_A32ll(frac32_t
acc32_t MLIB_Div_A32as(acc32_t
2.9.3 Function use
The use of the
MLIB_Div
#include "mlib.h"
static
frac32_t
f32Num, f32Result;
static
frac16_t
f16Denom;
void main(void)
{
f32Num = FRAC32(0.2);
f16Denom = FRAC16(-0.495);
/* f32Result = f32Num / f16Denom */
f32Result = MLIB_Div_F32ls(f32Num, f16Denom);
}
2.10 MLIB_DivSat
34
Table 2-9. Function versions (continued)
Result
type
Denom.
frac16_t
acc32_t
Division of a 32-bit fractional numerator by a 16-bit fractional
denominator; the output is a 32-bit accumulator result. The output
may be out of the range <-1 ; 1).
frac32_t
acc32_t
Division of a 32-bit fractional numerator and denominator; the
output is a 32-bit accumulator result. The output may be out of the
range <-1 ; 1).
frac16_t
acc32_t
Division of a 32-bit accumulator numerator by a 16-bit fractional
denominator; the output is a 32-bit accumulator result. The output
may be out of the range <-1 ; 1).
functions have the following declarations:
f16Num,
frac16_t
f32Num,
frac16_t
f32Num,
frac32_t
f32Num,
frac16_t
f32Num,
frac32_t
f16Num,
frac16_t
f32Num,
frac16_t
f32Num,
frac32_t
a32Num,
frac16_t
function is shown in the following example:
/* f32Num = 0.2 */
/* f16Denom = -0.495 */
MLIB User's Guide, Rev. 2, 10/2015
Description
f16Denom)
f16Denom)
f32Denom)
f16Denom)
f32Denom)
f16Denom)
f16Denom)
f32Denom)
f16Denom)
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents