| LDEXP(3) | Library Functions Manual | LDEXP(3) |
ldexp, ldexpf,
ldexpl — multiply
floating-point number by integral power of 2
Math Library (libm, -lm)
#include
<math.h>
double
ldexp(double
x, int exp);
float
ldexpf(float
x, int exp);
long double
ldexpl(long
double x, int
exp);
The
ldexp()
family of functions compute
for a real floating-point number x.
The functions return the value of x times 2 raised to the power exp. Otherwise the following may occur:
±HUGE_VAL,
±HUGE_VALF, or
±HUGE_VALL is returned, depending on the
sign of x and the type of the return value.The described functions conform to ISO/IEC 9899:1999 (“ISO C99”).
| March 17, 2016 | NetBSD 11.0 |