Compute a value from a mantissa and exponent.
Compatibility:This function is compatible with the following targets:
|
|
#include <math.h>
double ldexp(double x, int exp);
float ldexpf(float, int);
long double ldexpl(long double, int);Parameters:
Parameters for this function are:
#include <math.h>
#include <stdio.h>
int main(void)
{
double value, x = 0.75;
int e = 4;
value = ldexp(x, e);
printf("%f * 2 to the power of %d is %f.\n",x, e, value);
return 0;
}
Output:
0.750000 * 2 to the power of 4 is 12.000000.
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000