ldexp

Multiplies a floating-point number by an integral power of 2.

Library:LibC
Classification:ANSI
Service:Math

Syntax

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

Parameters

x

(IN) Specifies the floating-point number to be multiplied by an integral power of 2.

exp

(IN) Specifies the integral power of 2.

Return Values

Returns the value of x times 2 raised to the power exp.

Remarks

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

See Also