Declaration; Function Use; Mlib_Mulrnd - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_MulRnd

Function name
MLIB_MulNeg_F32ss
frac16_t
MLIB_MulNeg_F32
frac32_t
MLIB_MulNeg_A32
acc32_t

2.32.2 Declaration

The available
MLIB_MulNeg
frac16_t MLIB_MulNeg_F16(frac16_t
frac16_t MLIB_MulNeg_F16as(acc32_t
frac32_t MLIB_MulNeg_F32ss(frac16_t
frac32_t MLIB_MulNeg_F32(frac32_t
acc32_t MLIB_MulNeg_A32(acc32_t

2.32.3 Function use

The use of the
MLIB_MulNeg
#include "mlib.h"
static
frac32_t
f32Result;
static
frac16_t
f16Mult1, f16Mult2;
void main(void)
{
f16Mult1 = FRAC16(0.5);
f16Mult2 = FRAC16(-0.3);
/* f32Result = f16Mult1 * (-f16Mult2) */
f32Result = MLIB_MulNeg_F32ss(f16Mult1, f16Mult2);
}
2.33 MLIB_MulRnd
68
Table 2-32. Function versions (continued)
Input type
Result
type
Mult. 1
Mult. 2
frac16_t
frac32_t
frac32_t
frac32_t
acc32_t
acc32_t
functions have the following declarations:
f16Mult1,
a32Accum,
f16Mult1,
f32Mult1,
a32Mult1,
acc32_t
function is shown in the following example:
/* f16Mult1 = 0.5 */
/* f16Mult2 = -0.3 */
MLIB User's Guide, Rev. 2, 10/2015
Description
Negative product of two 16-bit fractional multiplicands; the
result is a 32-bit fractional value. The output is within the range
<-1 ; 1).
Negative product of two 32-bit fractional multiplicands; the
output are the upper 32 bits of the results [16..31]. The output
is within the range <-1 ; 1).
Product of two 32-bit accumulator multiplicands; the output is a
32-bit accumulator, which has the mid bits of the result
[16..47]. The output is within the range <-65536.0 ; 65536.0).
frac16_t
f16Mult2)
frac16_t
f16Mult)
frac16_t
f16Mult2)
frac32_t
f32Mult2)
a32Mult1)
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents