ldexp

multiply a floating-point number by an integral power of 2

Synopsis:

#include <math.h>
double ldexp( double x, int exp );

Description:

The ldexp() function multiplies a floating-point number by an integral power of 2. A range error may occur.

Returns:

the value of x times 2 raised to the power exp

See also:

frexp(), modf()

Examples:

#include <stdio.h>
#include <math.h>

void main()
  {
    double value;

    value = ldexp( 4.7072345, 5 );
    printf( "%f\n", value );
  }

produces the output:

150.631504

Classification:

ANSI

Systems:

Math