LabWindows/CVI

Content Type
Programming Language
Current manual

frexp

frexp

double frexp (double inputValue, int *exponent);

Purpose

Splits a floating-point value into two parts:

  1. mantissa—a normalized fraction with magnitude in the interval [0.5,1) or zero
  2. exponent—an integral power of two

The following equation illustrates the parameters' relationship:

mantissa * 2^exponent = inputValue

The function returns the mantissa. If inputValue is zero, both exponent and mantissa are assigned a value of zero.

Parameters

Input
Name Type Description
inputValue double Contains the argument to the function. The argument is broken into a normalized fraction and an integral power of two.
Output
Name Type Description
exponent int Contains the exponential result of the function. If inputValue is zero, this parameter is assigned a value of zero.

Return Value

Name Type Description
mantissa double Contains the returned mantissa value. The magnitude of this value is in the interval [0.5,1.0) or zero. If inputValue is zero, function returns zero.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Was this information helpful?

Previous

exp

Next

ldexp

Previous

exp

Next

ldexp