scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl - multiply floating-point number by integral power of radix

Synopsis

Description

Return Value

Errors

Versions

Notes

Colophon

#include <math.h>

double scalbln(doublex, long intexp);

float scalblnf(floatx, long intexp);

long double scalblnl(long doublex, long intexp);

double scalbn(doublex, intexp);

float scalbnf(floatx, intexp);

long double scalbnl(long doublex, intexp);Link with

-lm.Feature Test Macro Requirements for glibc (see

feature_test_macros(7)):

scalbln(),scalblnf(),scalblnl():_XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;

orcc -std=c99

scalbn(),scalbnf(),scalbnl():_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;

orcc -std=c99

These functions multiply their first argumentxbyFLT_RADIX(probably 2) to the power ofexp, that is:x * FLT_RADIX ** exp

The definition of

FLT_RADIXcan be obtained by including<float.h>.

On success, these functions returnx*FLT_RADIX**exp.If

xis a NaN, a NaN is returned.If

xis positive infinity (negative infinity), positive infinity (negative infinity) is returned.If

xis +0 (-0), +0 (-0) is returned.If the result overflows, a range error occurs, and the functions return

HUGE_VAL,HUGE_VALF, orHUGE_VALL, respectively, with a sign the same asx.If the result underflows, a range error occurs, and the functions return zero, with a sign the same as

x.

Seemath_error(7) for information on how to determine whether an error has occurred when calling these functions.The following errors can occur:

These functions do not set

Range error, overflow An overflow floating-point exception ( FE_OVERFLOW) is raised.Range error, underflow An underflow floating-point exception ( FE_UNDERFLOW) is raised.errno.

These functions first appeared in glibc in version 2.1.

C99, POSIX.1-2001.

These functions differ from the obsolete functions described inscalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those inscalb(3) have a second argument of typedouble.If

FLT_RADIXequals 2 (which is usual), thenscalbn() is equivalent toldexp(3).

ldexp(3),scalb(3)

This page is part of release 3.44 of the Linuxman-pagesproject. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.

SCALBLN (3) | 2010-09-20 |