Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Computes the function y = ldexp(f,e) using the math library

Discussion

Computes the funtion function Y = ldexp(F, E) using the math library. The function computes a floating point number starting with a fractional value F and an exponent E as: Y = F * 2^E. This function is the inverse of frexp().

...

Code Block
typedef struct _ModuleFrexpModuleLdexp
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleFrexpClassModuleLdexpClass;

Pins

Input Pins

Name: xf

Description: Input signal xFractional value f

Data type: float

Channel range: Unrestricted

...

Sample rate range: Unrestricted

Complex support: Real

...

Name: fe

Description: Fractional output fExponent e

Data type: float: int

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: ey

Description: Exponent nFloating point result

Data type: intfloat

MATLAB Usage

File Name: frexpldexp_module.m

Code Block
 M=frexpldexp_module(NAME)
 Creates an Audio Weaver module that computes the function frexp(xldexp(F, E)
 using the math library.  This function splitscomputes a floating point number
 numberstarting intowith a fractional fractionvalue F and an exponent E, suchas:
that the absolute   valueY of= F is in the range [0.5 1.0) and such that 2^E * F equals
 the input value.  The output F is a floating-point value; the output
 E is an integer* 2^E
 The function is the inverse of the function frexp().  Arguments:
    NAME - name of the module.

...