1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .TH SCALB 3 2021-03-22 GNU "Linux Programmer's Manual"
9 scalb, scalbf, scalbl \- multiply floating-point number
10 by integral power of radix (OBSOLETE)
13 .RI ( libm ", " \-lm )
18 .BI "double scalb(double " x ", double " exp );
19 .BI "float scalbf(float " x ", float " exp );
20 .BI "long double scalbl(long double " x ", long double " exp );
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
31 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
32 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
33 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
40 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
44 These functions multiply their first argument
59 can be obtained by including
61 .\" not in /usr/include but in a gcc lib
63 On success, these functions return
74 is a NaN, a NaN is returned.
78 is positive infinity (negative infinity),
81 is not negative infinity,
82 positive infinity (negative infinity) is returned.
88 is not positive infinity, +0 (\-0) is returned.
95 a domain error occurs, and
103 is negative infinity,
104 a domain error occurs, and
107 If the result overflows,
108 a range error occurs,
109 and the functions return
114 respectively, with a sign the same as
117 If the result underflows,
118 a range error occurs,
119 and the functions return zero, with a sign the same as
124 for information on how to determine whether an error has occurred
125 when calling these functions.
127 The following errors can occur:
129 Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \
130 or \fIx\fP is positive infinity and \fIexp\fP is negative infinity \
131 and the other argument is not a NaN
135 An invalid floating-point exception
139 Range error, overflow
143 An overflow floating-point exception
147 Range error, underflow
151 An underflow floating-point exception
155 For an explanation of the terms used in this section, see
163 Interface Attribute Value
168 T} Thread safety MT-Safe
175 is specified in POSIX.1-2001, but marked obsolescent.
176 POSIX.1-2008 removes the specification of
178 recommending the use of
186 function is from 4.3BSD.
193 is nevertheless present on several other systems
194 .\" Looking at header files: scalbf() is present on the
195 .\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64.
198 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
199 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804
200 these functions did not set
202 for domain and range errors.