
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - ldexp
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ldexp
Usage
#include <math.h>
double ldexp(double x,int exp);
Description
The function ldexp multiplies a floating point number by an integral
power of two.
Example
#include <math.h>
#include <stdio.h>
main()
{
double x,y;
int exp;
x = 1.5;
exp = 5;
y = ldexp(x,exp);
printf("The ldexp (%f exp %d) = %f\n",x,exp,y);
}
Return Value
ldexp returns x* 2 raised to the power exp.
See Also: exp frexp log log10 modf
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson