SCALBN 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

scalbnf, scalbn, scalbnl, scalbnw, scalbnq, scalbnll, scalbndf, scalbnd, scalbndl, scalbndll - scale floating-point number by power of FLT_RADIX

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float scalbnf (float x, int n);

extern double scalbn (double x, int n);

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

extern __float80 scalbnw (__float80 x, int n);

extern __float128 scalbnq (__float128 x, int n);

extern long_long_double scalbnll (long_long_double x, int n);

extern decimal_float scalbndf (decimal_float x, int n);

extern decimal_double scalbnd (decimal_double x, int n);

extern decimal_long_double scalbndl (decimal_long_double x, int n);

extern decimal_long_long_double scalbndll (decimal_long_long_double x, int n);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute the product of x and the value of FLT_RADIX raised to the power n. In the absence of underflow and overflow of the result, this scaling is always exact.

A companion function, scalbln(x,n), provides for a higher-precision exponent.


RETURN VALUES

Return the computed product.

ERRORS

If the first argument is +Infinity, -Infinity, or a NaN, the result is that argument. If the product would overflow, the result is Infinity with the sign of the first argument. However, errno is never set.

SEE ALSO

frexp(3CW), ldexp(3CW), logb(3CW), pow(3CW), scalbln(3CW).