1scalbln(3)                 Library Functions 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

LIBRARY

10       Math library (libm, -lm)
11

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

ATTRIBUTES

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

STANDARDS

84       C11, POSIX.1-2008.
85

HISTORY

87       glibc 2.1.  C99, POSIX.1-2001.
88

HISTORY

90       These  functions  differ  from  the  obsolete  functions  described  in
91       scalb(3) in the type of their second argument.  The functions described
92       on this page have a second argument of an integral type, while those in
93       scalb(3) have a second argument of type double.
94

NOTES

96       If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent  to
97       ldexp(3).
98

BUGS

100       Before glibc 2.20, these functions did not set errno for range errors.
101

SEE ALSO

103       ldexp(3), scalb(3)
104
105
106
107Linux man-pages 6.05              2023-07-20                        scalbln(3)
Impressum