(8.D.1.2) ReciprocalFract32
Overview
Computes the reciprocal (1/x)
Discussion
Generates the reciprocal of the input signal on a sample-by-sample basis. $out[n]=\frac{\displaystyle 1}{\displaystyle in[n]}$ Note that the module does not do any input checking and if the input is 0 then the output will be NaN.
Type Definition
typedef struct _ModuleReciprocalFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 exp; // number of guard bits of the reciprocal output. Default is Q9.23 format.
} ModuleReciprocalFract32Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
exp | int | parameter | 0 | 8 | 0:1:15 | Â |
Pins
Input Pins
Name: in
Description: Input signal
Data type: fract32
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: fract32
MATLAB Usage
File Name: reciprocal_fract32_module.m
M=reciprocal_fract32_module(NAME, BLOCKSIZE)
Creates a module that produces the reciprocal of the input signal
for use with the Audio Weaver. Arguments:
NAME - name of the module.
BLOCKSIZE - size of each block to process (optional)
Â