_scalb, _scalbf

Scales argument by a power of 2.

Syntax

double _scalb(
   double x,
   long exp
);
float _scalbf(
   float x,
   long exp
); /* x64 only */

Parameters

x
Double-precision, floating-point value.

exp
Long integer exponent.

Return Value

Returns an exponential value if successful. On overflow (depending on the sign of x), _scalb returns +/- HUGE_VAL; the errno variable is set to ERANGE.

For more information about this and other return codes, see _doserrno, errno, _sys_errlist, and _sys_nerr.

Remarks

The _scalb function calculates the value of x * 2exp.

Requirements

Routine Required header
_scalb, _scalbf <float.h>

For more compatibility information, see Compatibility.

See also

Floating-Point Support
ldexp