1SCALBLN(3) Linux Programmer's Manual SCALBLN(3)
2
3
4
6 scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl - multiply float‐
7 ing-point number by integral power of radix
8
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 _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE ||
26 _POSIX_C_SOURCE >= 200112L;
27 or cc -std=c99
28 scalbn(), scalbnf(), scalbnl():
29 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
30 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
31 or cc -std=c99
32
34 These functions multiply their first argument x by FLT_RADIX (probably
35 2) to the power of exp, that is:
36
37 x * FLT_RADIX ** exp
38
39 The definition of FLT_RADIX can be obtained by including <float.h>.
40
42 On success, these functions return x * FLT_RADIX ** exp.
43
44 If x is a NaN, a NaN is returned.
45
46 If x is positive infinity (negative infinity), positive infinity (nega‐
47 tive infinity) is returned.
48
49 If x is +0 (-0), +0 (-0) is returned.
50
51 If the result overflows, a range error occurs, and the functions return
52 HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same
53 as x.
54
55 If the result underflows, a range error occurs, and the functions
56 return zero, with a sign the same as x.
57
59 See math_error(7) for information on how to determine whether an error
60 has occurred when calling these functions.
61
62 The following errors can occur:
63
64 Range error, overflow
65 An overflow floating-point exception (FE_OVERFLOW) is raised.
66
67 Range error, underflow
68 An underflow floating-point exception (FE_UNDERFLOW) is raised.
69
70 These functions do not set errno.
71
73 These functions first appeared in glibc in version 2.1.
74
76 Multithreading (see pthreads(7))
77 The scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), and scal‐
78 blnl() functions are thread-safe.
79
81 C99, POSIX.1-2001.
82
84 These functions differ from the obsolete functions described in
85 scalb(3) in the type of their second argument. The functions described
86 on this page have a second argument of an integral type, while those in
87 scalb(3) have a second argument of type double.
88
89 If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to
90 ldexp(3).
91
93 ldexp(3), scalb(3)
94
96 This page is part of release 3.53 of the Linux man-pages project. A
97 description of the project, and information about reporting bugs, can
98 be found at http://www.kernel.org/doc/man-pages/.
99
100
101
102 2013-06-21 SCALBLN(3)