Declaration - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Rnd
The available versions of the
Function name
MLIB_Rcp1Q_A32s
frac16_t
MLIB_Rcp1Q1_A32s
frac16_t

2.39.2 Declaration

The available
MLIB_Rcp1Q
acc32_t MLIB_Rcp1Q_A32s(frac16_t
acc32_t MLIB_Rcp1Q1_A32s(frac16_t
2.39.3 Function use
The use of the
MLIB_Rcp1Q
#include "mlib.h"
static
acc32_t
a32Result;
static
frac16_t
f16Denom;
void main(void)
{
f16Denom = FRAC16(0.354);
/* a32Result = 1/f16Denom */
a32Result = MLIB_Rcp1Q1_A32s(f16Denom);
}
2.40 MLIB_Rnd
The
MLIB_Rnd
functions round the input to the nearest value to meet the return type's
size. The function does not saturate the output. See the following equation:
78
MLIB_Rcp1Q
Table 2-39. Function versions
Input type
Result type
acc32_t
acc32_t
functions have the following declarations:
f16Denom)
f16Denom)
function is shown in the following example:
/* f16Denom = 0.354 */
Equation 38. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
function are shown in the following table.
Description
Reciprocal for a nonnegative 16-bit fractional value; the output is a
positive 32-bit accumulator value. The output is greater than or
equal to 1. The division is performed with 32-bit accuracy.
Reciprocal for a nonnegative 16-bit fractional value; the output is a
positive 32-bit accumulator value. The output is greater than or
equal to 1. Faster version, where the division is performed with 16-
bit accuracy.
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents