C Reference function ldexp()

Usage of ldexp():

double ldexp(double x, int exponent);


There is no range limit on the argument.

Return value:

There is no range limit on the return value.

Source code example of ldexp():


		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. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

There is currently one response to “C Reference function ldexp()”

Why not let us know what you think by adding your own comment!

  1. Imran Raja on June 22nd, 2013:

    I am very much pleased.I learn so many important thing through this site. Thanks for this type of help.