ldexp


Multiply a floating-point number and an integral power of 2

[Classification]

Mathematical library

[Syntax]

#include <math.h>

double __far ldexp(double val, int exp);

[Return value]

Returns the value calculated byval x 2 exp.

When val is a Not-a-Number (NaN), ldexp returns a Not-a-Number (NaN) and sets macro EDOM to global variable errno.

If an underflow or overflow occurs as a result of executing ldexp, it sets macro ERANGE to global variable errno. If an underflow occurs, ldexp returns an denormal number. If an overflow occurs, it returns ∞.

[Description]

Multiply a floating-point number and an integral power of 2.