Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ldexp, ldexpf, ldexpl - load exponent of floating-point number

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double ldexp(double x, int exp);
C11
float ldexp(float x, int exp);
long double ldexpl(long double x, int exp); (End) 

Description

These functions compute the quantity:
x * 2exp
where x is the mantissa and exp is the exponent.

ldexp() is the inverse function of frexp().

Return val.

Value of x * 2exp



if successful.

 

+/-HUGE_VAL
+/-HUGE_VALF
+/-HUGE_VALL

depending on the function type and the sign of x, if an overflow occurs.
errno is set to indicate the error.

Errors

ldexp(), ldexpf() and ldexpl() will fail if:

ERANGE      Overflow.

See also

frexp(), modf(), math.h.