Skip to content

Frexp

Overview

Computes the function [f,e] = frexp(x) using the math library

Discussion

Computes the funtion [f, e]=frexp(x) using the math library. This function splits a floating point number into a fraction F and an exponent E, such that the absolute value of F is in the range [0.5 1.0) and such that 2^E * F equals the input value. The output pin 'f' is a floating-point value and the output pin 'e' is an integer.

Module Pack

Standard

ClassID

classID = 51

Type Definition

typedef struct _ModuleFrexp
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleFrexpClass;

Pins

Input Pins

Name x
Description Input signal x
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name f
Description Fractional output f
Data Type float
Name e
Description Exponent n
Data Type int

Matlab Usage

File Name: frexp_module.m 
 M=frexp_module(NAME) 
 Creates an Audio Weaver module that computes the function frexp(x) 
 using the math library.  This function splits a floating point  
 number into a fraction F and an exponent E, such that the absolute  
 value 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.  Arguments: 
    NAME - name of the module. 

Copyright (c) 2026 DSP Concepts, Inc.