Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

2.53.1 Available versions

This 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 available versions of the
Function name
Input type
MLIB_Sign_F16
frac16_t
MLIB_Sign_F32
frac32_t
2.53.2 Declaration
The available
MLIB_Sign
frac16_t MLIB_Sign_F16(frac16_t
frac32_t MLIB_Sign_F32(frac32_t
2.53.3 Function use
The use of the
MLIB_Sign
#include "mlib.h"
static
frac32_t
f32In, f32Result;
void main(void)
{
f32In = FRAC32(-0.95);
/* f32Result = sign(f32In)*/
f32Result = MLIB_Sign_F32(f32In);
}
Freescale Semiconductor, Inc.
Equation 51. Algorithm formula
MLIB_Sign
function are shown in the following table.
Table 2-53. Function versions
Result type
frac16_t
Sign of a 16-bit fractional value. The output is within the range <-1 ; 1).
frac32_t
Sign of a 32-bit fractional value. The output is within the range <-1 ; 1).
functions have the following declarations:
f16Val)
f32Val)
function is shown in the following example:
/* f32In = -0.95 */
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
Description
95

Advertisement

Table of Contents
loading

Table of Contents