Function Use - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Rcp

2.37.3 Function use

The use of the
MLIB_NegSat
#include "mlib.h"
static
frac32_t
f32Val, f32Result;
void main(void)
{
f32Val = FRAC32(-1.0);
/* f32Result = sat(-f32Val)
f32Result = MLIB_NegSat_F32(f32Val);
}
2.38 MLIB_Rcp
The
MLIB_Rcp
functions return the reciprocal value for the input value. The function
does not saturate the output. See the following equation:
2.38.1 Available versions
This function is available in the following versions:
• Accumulator output with fractional input - the output is the accumulator type, where
the absolute value of the result is greater than or equal to 1. The input is the fractional
type.
The available versions of the
Function name
Input type
MLIB_Rcp_A32s
frac16_t
MLIB_Rcp1_A32s
frac16_t
76
function is shown in the following example:
/* f32Val = -1.0*/
*/
Equation 36. Algorithm formula
MLIB_Rcp
function are shown in the following table.
Table 2-38. Function versions
Result type
acc32_t
Reciprocal for a 16-bit fractional value; the output is a 32-bit
accumulator value. The absolute value of the output is greater than or
equal to 1. The division is performed with 32-bit accuracy.
acc32_t
Reciprocal for a 16-bit fractional value; the output is a 32-bit
accumulator value. The absolute value of the output is greater than or
equal to 1. Faster version, where the division is performed with 16-bit
accuracy.
MLIB User's Guide, Rev. 2, 10/2015
Description
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents