frexp
- Updated2023-02-21
- 1 minute(s) read
frexp
double frexp (double inputValue, int *exponent);
Purpose
Splits a floating-point value into two parts:
- mantissa—a normalized fraction with magnitude in the interval [0.5,1) or zero
- 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