| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <math.h> double ldexp(double val, int exp); |
This function computes val*2^exp.
val*2^exp. ldexp(0., exp) returns 0 for all
values of exp, without setting errno. For non-zero values
of val, errno is set to ERANGE if the result cannot
be accurately represented by a double, and the return value is
then the nearest representable double (possibly, an Inf).
If val is a NaN or Inf, the return value is
NaN and errno is set to EDOM.
| ANSI/ISO C | C89; C99 |
| POSIX | 1003.2-1992; 1003.1-2001 |
ldexp(3.5,4) == 3.5 * (2^4) == 56.0 |