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