Mlib_Mulnegrnd; Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_MulNegRnd

#include "mlib.h"
static
frac32_t
f32Mult1, f32Mult2, f32Result;
void main(void)
{
f32Mult1 = FRAC32(-1.0);
f32Mult2 = FRAC32(-1.0);
/* f32Result = sat(round(f32Mult1 * f32Mult2))*/
f32Result = MLIB_MulRndSat_F32(f32Mult1, f32Mult2);
}
2.35 MLIB_MulNegRnd
The
MLIB_MulNegRnd
multiplicands. The round method is the round to nearest. The function does not saturate
the output. See the following equation:

2.35.1 Available versions

This function is available in the following versions:
• Fractional output with fractional inputs - the output is the fractional portion of the
result; the result is within the range <-1 ; 1). The inputs are the fractional values only.
• Fractional output with mixed inputs - the output is the fractional portion of the result;
the result is within the range <-1 ; 1). The inputs are the accumulator and fractional
values. The result may overflow.
• Accumulator output - the output is the accumulator type where the result can be out
of the range <-1 ; 1). The result may overflow.
The available versions of the
table:
Function name
MLIB_MulNegRnd_F16
72
/* f32Mult1 = -1.0 */
/* f32Mult2 = -1.0 */
functions return the rounded negative product of two
Equation 33. Algorithm formula
MLIB_MulNegRnd
Table 2-35. Function versions
Input type
Result
type
Mult. 1
Mult. 2
frac16_t
frac16_t
frac16_t
Table continues on the next page...
MLIB User's Guide, Rev. 2, 10/2015
function are shown in the following
Description
Negative product of two 16-bit fractional multiplicands; the
output is rounded to the upper 16 bits of the results
[16..31]. The output is within the range <-1 ; 1).
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents