ldexp
multiply by power of 2
Synopsis
#include <math.h>
double ldexp(double x, int n);
float ldexpf(float x, int n);
Description
The
function returns the value of the floating-point input multi-
ldexp
plied by 2 raised to the power of
argument
to the exponent of the first argument
n
Error Conditions
If the result overflows,
returns a zero.
ldexp
Example
#include <math.h>
double y;
y = ldexp(0.5, 2);
See Also
exp,
pow
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
. It adds the value of the second
n
returns a NaN. If the result underflows,
ldexp
/* y = 2.0 */
C/C++ Run-Time Library
.
x
3-87
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers