1SCALBLN(3)                 Linux Programmer's Manual                SCALBLN(3)
2
3
4

NAME

6       scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl - multiply float‐
7       ing-point number by integral power of radix
8

SYNOPSIS

10       #include <math.h>
11
12       double scalbln(double x, long int exp);
13       float scalblnf(float x, long int exp);
14       long double scalblnl(long double x, long int exp);
15
16       double scalbn(double x, int exp);
17       float scalbnf(float x, int exp);
18       long double scalbnl(long double x, int exp);
19
20       Link with -lm.
21
22   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
23
24       scalbln(), scalblnf(), scalblnl():
25              _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
26                  || /* Since glibc 2.19: */ _DEFAULT_SOURCE
27       scalbn(), scalbnf(), scalbnl():
28              _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
29                  || /* Since glibc 2.19: */ _DEFAULT_SOURCE
30                  || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
31

DESCRIPTION

33       These functions multiply their first argument x by FLT_RADIX  (probably
34       2) to the power of exp, that is:
35
36           x * FLT_RADIX ** exp
37
38       The definition of FLT_RADIX can be obtained by including <float.h>.
39

RETURN VALUE

41       On success, these functions return x * FLT_RADIX ** exp.
42
43       If x is a NaN, a NaN is returned.
44
45       If x is positive infinity (negative infinity), positive infinity (nega‐
46       tive infinity) is returned.
47
48       If x is +0 (-0), +0 (-0) is returned.
49
50       If the result overflows, a range error occurs, and the functions return
51       HUGE_VAL,  HUGE_VALF,  or HUGE_VALL, respectively, with a sign the same
52       as x.
53
54       If the result underflows, a  range  error  occurs,  and  the  functions
55       return zero, with a sign the same as x.
56

ERRORS

58       See  math_error(7) for information on how to determine whether an error
59       has occurred when calling these functions.
60
61       The following errors can occur:
62
63       Range error, overflow
64              An overflow floating-point exception (FE_OVERFLOW) is raised.
65
66       Range error, underflow
67              An underflow floating-point exception (FE_UNDERFLOW) is raised.
68
69       These functions do not set errno.
70

VERSIONS

72       These functions first appeared in glibc in version 2.1.
73

ATTRIBUTES

75       For  an  explanation  of  the  terms  used   in   this   section,   see
76       attributes(7).
77
78       ┌──────────────────────────────────┬───────────────┬─────────┐
79Interface                         Attribute     Value   
80       ├──────────────────────────────────┼───────────────┼─────────┤
81scalbn(), scalbnf(), scalbnl(),   │ Thread safety │ MT-Safe │
82scalbln(), scalblnf(), scalblnl() │               │         │
83       └──────────────────────────────────┴───────────────┴─────────┘

CONFORMING TO

85       C99, POSIX.1-2001, POSIX.1-2008.
86

NOTES

88       These  functions  differ  from  the  obsolete  functions  described  in
89       scalb(3) in the type of their second argument.  The functions described
90       on this page have a second argument of an integral type, while those in
91       scalb(3) have a second argument of type double.
92
93       If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent  to
94       ldexp(3).
95

SEE ALSO

97       ldexp(3), scalb(3)
98

COLOPHON

100       This  page  is  part of release 5.02 of the Linux man-pages project.  A
101       description of the project, information about reporting bugs,  and  the
102       latest     version     of     this    page,    can    be    found    at
103       https://www.kernel.org/doc/man-pages/.
104
105
106
107                                  2017-09-15                        SCALBLN(3)
Impressum