C Reference function ldexp()
Usage of ldexp():
double ldexp(double x, int exponent);
Parameters:
There is no range limit on the argument.
Return value:
There is no range limit on the return value.
Source code example of ldexp():
#include<stdio.h>
#include<math.h>
main()
{
double input, output;
int i;
input = 0.50;
i = 2;
output = ldexp (input , i);
printf ("%f * 2^%d = %f\n", input, i, output);
return 0;
}
Output of the ldexp example program above:
0.500000 * 2^2 = 2.000000
This entry was posted in C Reference math.h Functions.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Tweet This! or use
to share this post with others.