Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

Computes 2^x using a fast polynomial approximation.

Discussion

This module computes 2^x for fractional input values. The input is in Q6.26 and the output is in Q16.16. The module uses a polynomial based approximation to the pow2() function and the result is accurate to within 0.04 dB (when you look at the result on a db20 scale). The maximum error occurs for very small input values. Over most of the usable range the error is within 0.004 dB.

Type Definition

typedef struct _ModulePow2Fract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModulePow2Fract32Class;

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: pow2_fract32_module.m

 M = pow2_fract32_module(NAME)
 Creates an Audio Weaver module that computes 2^x using a fast polynomial
 approximation.  The input is in Q6.26 format and the output is in 
 Q16.16 format.  Arguments:
    NAME - name of the module.

  • No labels