SCALBN(3) Library Functions Manual SCALBN(3)

scalbn, scalbln

#include <math.h>

double
scalbn(double x, int n);

long double
scalbnl(long double x, int n);

float
scalbnf(float x, int n);

double
scalbln(double x, long int n);

long double
scalblnl(long double x, long int n);

float
scalblnf(float x, long int n);

The () , and scalbln() functions return x∗(2**n) computed by exponent manipulation.

scalbn(±0, n) returns ±0.

(x, 0) returns x.

(±infinity, n) returns ±infinity.

() has the same special values.

The () function is deprecated. scalbn() should be used instead.

If you need to apply the scalbn() functions to SIMD vectors or arrays, using the following function provided by the Accelerate.framework may give significantly better performance:

#include <Accelerate/Accelerate.h>

vFloat (vFloat x, vSInt32);

math(3), ldexp(3)

The scalbn() and scalbln() functions conform to ISO/IEC 9899:2011.

July 2, 2008 macOS 15.0