Share via


ldexp (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Reference

Computes a real number from the mantissa and exponent.

double ldexp(doublex,intexp);

Parameters

  • x
    Floating-point value.
  • exp
    Integer exponent.

Return Values

The ldexp function returns the value of x * 2exp if successful.

On overflow (depending on the sign of x), ldexp returns +/– HUGE_VAL.

Example

/* LDEXP.C */


void main( void )
{
   double x = 4.0, y;
   int p = 3;

   y = ldexp( x, p );
   printf( "%2.1f times two to the power of %d is %2.1f\n", x, p, y );
}

Output

4.0 times two to the power of 3 is 32.0

Requirements

OS Versions: Windows CE 2.0 and later.
Header: stdlib.h.
Link Library: coredll.dll.

See Also

frexp | modf

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.