ldexp
double ldexp (double mantissa, int exponent);
Purpose
Multiplies a floating-point number by an integral power of two. This function is the inverse of frexp. The value returned is defined by the following:
result = mantissa * 2^exponent
![]() |
Note A range error may occur when the magnitudes of the arguments cause the function to return a value that cannot be represented as a double. |
Parameters
Input | ||
Name | Type | Description |
mantissa | double |
Contains the floating-point value that is multiplied by an integral power
of two. The value entered into this parameter and into
exponent are related to result by the
following:
result = mantissa * 2^exponent |
exponent | int |
Contains the integral power of two that is multiplied to
mantissa. The value entered into this parameter and into
mantissa are related to result by the following:
result = mantissa * 2^exponent |
Return Value
Name | Type | Description |
result | double |
Contains the returned result of the function. The value returned is defined by the following:
result = mantissa * 2^exponent If the arguments to the function are too large, ldexp returns Inf and sets errno to ERANGE. |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later