Reference for Wiring version 0024+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name |
ldexp() |
Examples |
double c = ldexp(3, 2); // Sets c to 12 = 3 * 2 ^ 2
double d = ldexp(2, 4); // Sets d to 32 = 2 * 2 ^ 4 |
Description |
The ldexp() function multiplies a floating-point number by an integral power of 2. The ldexp() function returns the value of x times 2 raised to the power exp. |
Syntax |
ldexp(x, exp) |
Parameters |
x |
double, float or int |
exp |
double, float or int |
|
Returns |
double |
Usage |
Application |
Updated on January 11, 2010 09:58:46pm PST