]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/scalb.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / scalb.3
CommitLineData
fea681da 1.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
8301c07d
MK
2.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3.\" <mtk.manpages@gmail.com>
fea681da 4.\"
93015253 5.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
6.\" Permission is granted to make and distribute verbatim copies of this
7.\" manual provided the copyright notice and this permission notice are
8.\" preserved on all copies.
9.\"
10.\" Permission is granted to copy and distribute modified versions of this
11.\" manual under the conditions for verbatim copying, provided that the
12.\" entire resulting derived work is distributed under the terms of a
13.\" permission notice identical to this one.
c13182ef 14.\"
fea681da
MK
15.\" Since the Linux kernel and libraries are constantly changing, this
16.\" manual page may be incorrect or out-of-date. The author(s) assume no
17.\" responsibility for errors or omissions, or for damages resulting from
18.\" the use of the information contained herein. The author(s) may not
19.\" have taken the same level of care in the production of this manual,
20.\" which is licensed free of charge, as they might when working
21.\" professionally.
c13182ef 22.\"
fea681da
MK
23.\" Formatted or processed versions of this manual, if unaccompanied by
24.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 25.\" %%%LICENSE_END
fea681da 26.\"
4b8c67d9 27.TH SCALB 3 2017-09-15 "" "Linux Programmer's Manual"
fea681da 28.SH NAME
8301c07d
MK
29scalb, scalbf, scalbl \- multiply floating-point number
30by integral power of radix (OBSOLETE)
fea681da
MK
31.SH SYNOPSIS
32.B #include <math.h>
68e4db0a 33.PP
fea681da
MK
34.BI "double scalb(double " x ", double " exp );
35.br
675a8e30 36.BI "float scalbf(float " x ", float " exp );
fea681da 37.br
675a8e30 38.BI "long double scalbl(long double " x ", long double " exp );
68e4db0a 39.PP
20c58d70 40Link with \fI\-lm\fP.
68e4db0a 41.PP
cc4615cc
MK
42.in -4n
43Feature Test Macro Requirements for glibc (see
44.BR feature_test_macros (7)):
45.in
68e4db0a 46.PP
cc4615cc 47.ad l
8301c07d 48.BR scalb ():
5f8bfc05 49.RS 4
636ed4d5 50_XOPEN_SOURCE\ >=\ 500
cf7fa0a1 51.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
636ed4d5
MK
52 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
53 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
5f8bfc05 54.RE
cc4615cc 55.br
8301c07d
MK
56.BR scalbf (),
57.BR scalbl ():
5f8bfc05 58.RS 4
636ed4d5
MK
59_XOPEN_SOURCE\ >=\ 600
60 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
61 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
5f8bfc05 62.RE
cc4615cc 63.ad b
fea681da
MK
64.SH DESCRIPTION
65These functions multiply their first argument
66.I x
2f0af33b
MK
67by
68.B FLT_RADIX
8301c07d
MK
69(probably 2)
70to the power of
71.IR exp ,
72that is:
207050fa 73.PP
8301c07d 74.nf
8301c07d
MK
75 x * FLT_RADIX ** exp
76.fi
847e0d88 77.PP
8301c07d 78The definition of
2f0af33b 79.B FLT_RADIX
8301c07d 80can be obtained by including
a5e0a0e4 81.IR <float.h> .
fea681da 82.\" not in /usr/include but in a gcc lib
8301c07d 83.SH RETURN VALUE
022671eb 84On success, these functions return
51700fd7 85.IR x
022671eb
MK
86*
87.B FLT_RADIX
88**
89.IR exp .
847e0d88 90.PP
8301c07d
MK
91If
92.I x
93or
94.I exp
95is a NaN, a NaN is returned.
847e0d88 96.PP
8301c07d
MK
97If
98.I x
99is positive infinity (negative infinity),
100and
101.I exp
102is not negative infinity,
103positive infinity (negative infinity) is returned.
847e0d88 104.PP
8301c07d
MK
105If
106.I x
107is +0 (\-0), and
108.I exp
109is not positive infinity, +0 (\-0) is returned.
847e0d88 110.PP
8301c07d
MK
111If
112.I x
113is zero, and
114.I exp
115is positive infinity,
efe294cb 116a domain error occurs, and
8301c07d 117a NaN is returned.
847e0d88 118.PP
8301c07d
MK
119If
120.I x
121is an infinity,
122and
123.I exp
385cf745 124is negative infinity,
efe294cb 125a domain error occurs, and
8301c07d 126a NaN is returned.
847e0d88 127.PP
8301c07d 128If the result overflows,
efe294cb 129a range error occurs,
8301c07d
MK
130and the functions return
131.BR HUGE_VAL ,
132.BR HUGE_VALF ,
133or
134.BR HUGE_VALL ,
135respectively, with a sign the same as
136.IR x .
847e0d88 137.PP
8301c07d 138If the result underflows,
efe294cb 139a range error occurs,
8301c07d
MK
140and the functions return zero, with a sign the same as
141.IR x .
142.SH ERRORS
143See
144.BR math_error (7)
145for information on how to determine whether an error has occurred
146when calling these functions.
147.PP
148The following errors can occur:
149.TP
150Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \