Returns its first argument multiplied by 2 raised to the power of
its second argument; that is, x(2n).
Format
#include <math.h>
double ldexp (double x, int n);
float ldexp (float x, int n); (Integrity servers, Alpha)
long double ldexp (long double x, int n);
(Integrity servers, Alpha)
1 – Arguments
x
A base value of type double, float, or long double that is to be
multiplied by 2n.
n
The integer exponent value to which 2 is raised.
2 – Return Values
x(2n) The first argument multiplied by 2 raised to
the power of the second argument.
0 Underflow occurred; errno is set to ERANGE.
HUGE_VAL Overflow occurred; errno is set to ERANGE.
NaN x is NaN; errno is set to EDOM.