Declaration; Mlib_Negsat - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

void main(void)
{
f32Val = FRAC32(0.85);
/* f32Result = -f32Val */
f32Result = MLIB_Neg_F32(f32Val);
}

2.37 MLIB_NegSat

The
MLIB_NegSat
functions return the negative value of the input. The function
saturates the output. See the following equation:
2.37.1 Available versions
The function is available in the following versions:
• Fractional output - the output is the fractional portion of the result; the result is
within the range <-1 ; 1). The result may saturate.
The available versions of the
Function name
Input type
MLIB_NegSat_F16
frac16_t
MLIB_NegSat_F32
frac32_t

2.37.2 Declaration

The available
MLIB_NegSat
frac16_t MLIB_NegSat_F16(frac16_t
frac32_t MLIB_NegSat_F32(frac32_t
Freescale Semiconductor, Inc.
/* f32Val = 0.85 */
Equation 35. Algorithm formula
MLIB_NegSat
function are shown in the following table:
Table 2-37. Function versions
Result type
frac16_t
Negative value of a 16-bit value. The output is within the range <-1 ;
1).
frac32_t
Negative value of a 32-bit value. The output is within the range <-1 ;
1).
functions have the following declarations:
f16Val)
f32Val)
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
Description
75

Advertisement

Table of Contents
loading

Table of Contents