]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>. |
2 | .\" | |
3 | .\" Permission is granted to make and distribute verbatim copies of this | |
4 | .\" manual provided the copyright notice and this permission notice are | |
5 | .\" preserved on all copies. | |
6 | .\" | |
7 | .\" Permission is granted to copy and distribute modified versions of this | |
8 | .\" manual under the conditions for verbatim copying, provided that the | |
9 | .\" entire resulting derived work is distributed under the terms of a | |
10 | .\" permission notice identical to this one. | |
c13182ef | 11 | .\" |
fea681da MK |
12 | .\" Since the Linux kernel and libraries are constantly changing, this |
13 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
14 | .\" responsibility for errors or omissions, or for damages resulting from | |
15 | .\" the use of the information contained herein. The author(s) may not | |
16 | .\" have taken the same level of care in the production of this manual, | |
17 | .\" which is licensed free of charge, as they might when working | |
18 | .\" professionally. | |
c13182ef | 19 | .\" |
fea681da MK |
20 | .\" Formatted or processed versions of this manual, if unaccompanied by |
21 | .\" the source, must acknowledge the copyright and authors of this work. | |
22 | .\" | |
cc4615cc | 23 | .TH SCALB 3 2007-07-26 "" "Linux Programmer's Manual" |
fea681da MK |
24 | .SH NAME |
25 | scalb, scalbf, scalbl, scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl \- | |
26 | multiply floating-point number by integral power of radix | |
27 | .SH SYNOPSIS | |
28 | .B #include <math.h> | |
29 | .sp | |
30 | .BI "double scalb(double " x ", double " exp ); | |
31 | .br | |
32 | .BI "float scalbf(float " x ", double " exp ); | |
33 | .br | |
34 | .BI "long double scalbl(long double " x ", double " exp ); | |
35 | .sp | |
36 | .BI "double scalbn(double " x ", int " exp ); | |
37 | .br | |
38 | .BI "float scalbnf(float " x ", int " exp ); | |
39 | .br | |
40 | .BI "long double scalbnl(long double " x ", int " exp ); | |
41 | .sp | |
42 | .BI "double scalbln(double " x ", long int " exp ); | |
43 | .br | |
44 | .BI "float scalblnf(float " x ", long int " exp ); | |
45 | .br | |
46 | .BI "long double scalblnl(long double " x ", long int " exp ); | |
47 | .sp | |
e9329f6d | 48 | Link with \fI-lm\fP. |
cc4615cc MK |
49 | .sp |
50 | .in -4n | |
51 | Feature Test Macro Requirements for glibc (see | |
52 | .BR feature_test_macros (7)): | |
53 | .in | |
54 | .sp | |
55 | .ad l | |
56 | .BR scalb (), | |
57 | .BR scalbf (), | |
58 | .BR scalbl (): | |
59 | _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 | |
60 | .br | |
61 | .BR scalbn (), | |
62 | .BR scalbnf (), | |
63 | .BR scalbnl (): | |
64 | _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or | |
65 | .I cc\ -std=c99 | |
66 | .br | |
67 | .BR scalbln (), | |
68 | .BR scalblnf (), | |
69 | .BR scalblnl (): | |
70 | _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or | |
71 | .I cc\ -std=c99 | |
72 | .ad b | |
fea681da MK |
73 | .SH DESCRIPTION |
74 | These functions multiply their first argument | |
75 | .I x | |
2f0af33b MK |
76 | by |
77 | .B FLT_RADIX | |
78 | (probably 2) to the power | |
fea681da MK |
79 | .IR exp . |
80 | ||
2f0af33b MK |
81 | If |
82 | .B FLT_RADIX | |
83 | equals 2, then | |
63aa9df0 | 84 | .BR scalbn () |
fea681da | 85 | is equivalent to |
fb186734 | 86 | .BR ldexp (3). |
fea681da | 87 | |
2f0af33b MK |
88 | The value of |
89 | .B FLT_RADIX | |
90 | is found in | |
a5e0a0e4 | 91 | .IR <float.h> . |
fea681da MK |
92 | .\" not in /usr/include but in a gcc lib |
93 | .SH "CONFORMING TO" | |
94 | The | |
63aa9df0 | 95 | .BR scalb () |
b14d4aa5 | 96 | function is from 4.3BSD. |
fea681da | 97 | The |
63aa9df0 | 98 | .BR scalbn () |
fea681da | 99 | and |
63aa9df0 | 100 | .BR scalbln () |
fea681da | 101 | functions are from C99. |
c13182ef | 102 | All three are in POSIX.1-2001. |
68e1685c | 103 | The |
63aa9df0 | 104 | .BR scalb () |
fea681da MK |
105 | function is marked obsolescent. |
106 | .SH "SEE ALSO" | |
107 | .BR ldexp (3) |