OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man3 / ldexp.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2004-10-31 by aeb
31 .\"
32 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
33 .\"       all rights reserved.
34 .\" Translated Thu Feb 13 23:14:00 JST 1997
35 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
36 .\" Updated & Modified Sun Jun  6 10:35:26 JST 2004
37 .\"       by Yuichi SATO <ysato444@yahoo.co.jp>
38 .\" Updated & Modified Sat Jan 15 05:40:56 JST 2005 by Yuichi SATO
39 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH LDEXP 3 2010-09-20 "" "Linux Programmer's Manual"
42 .\"O .SH NAME
43 .SH 名前
44 .\"O ldexp, ldexpf, ldexpl \- multiply floating-point number by integral power of 2
45 ldexp, ldexpf, ldexpl \- 浮動小数点実数と 2 の整数乗との積を計算する
46 .\"O .SH SYNOPSIS
47 .SH 書式
48 .nf
49 .B #include <math.h>
50 .sp
51 .BI "double ldexp(double " x ", int " exp );
52 .br
53 .BI "float ldexpf(float " x ", int " exp );
54 .br
55 .BI "long double ldexpl(long double " x ", int " exp );
56 .fi
57 .sp
58 .\"O Link with \fI\-lm\fP.
59 \fI\-lm\fP でリンクする。
60 .sp
61 .in -4n
62 .\"O Feature Test Macro Requirements for glibc (see
63 .\"O .BR feature_test_macros (7)):
64 glibc 向けの機能検査マクロの要件
65 .RB ( feature_test_macros (7)
66 参照):
67 .in
68 .sp
69 .ad l
70 .BR ldexpf (),
71 .BR ldexpl ():
72 .RS 4
73 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
74 _POSIX_C_SOURCE\ >=\ 200112L;
75 .br
76 or
77 .I cc\ -std=c99
78 .RE
79 .ad
80 .\"O .SH DESCRIPTION
81 .SH 説明
82 .\"O The
83 .\"O .BR ldexp ()
84 .\"O function returns the result of multiplying the floating-point number
85 .\"O .I x
86 .\"O by 2 raised to the power
87 .\"O .IR exp .
88 .BR ldexp ()
89 関数は、浮動小数点実数
90 .I x
91 と 2 の
92 .I exp
93 乗との積を返す。
94 .\"O .SH RETURN VALUE
95 .SH 返り値
96 .\"O On success, these functions return
97 .\"O .IR "x * (2^exp)" .
98 成功すると、これらの関数は
99 .I "x * (2^exp)"
100 を返す。
101
102 .\"O If
103 .\"O .I exp
104 .\"O is zero, then
105 .\"O .I x
106 .\"O is returned.
107 .I exp
108 がゼロの場合、
109 .I x
110 が返される。
111
112 .\"O If
113 .\"O .I x
114 .\"O is a NaN,
115 .\"O a NaN is returned.
116 .I x
117 が NaN の場合、NaN が返される。
118
119 .\"O If
120 .\"O .I x
121 .\"O is positive infinity (negative infinity),
122 .\"O positive infinity (negative infinity) is returned.
123 .I x
124 が正の無限大 (負の無限大) の場合、
125 正の無限大 (負の無限大) が返される。
126
127 .\"O If the result underflows,
128 .\"O a range error occurs,
129 .\"O and zero is returned.
130 結果がアンダーフローする場合、
131 範囲エラー (range error) が発生し、ゼロが返される。
132
133 .\"O If the result overflows,
134 .\"O a range error occurs,
135 .\"O and the functions return
136 .\"O .BR HUGE_VAL ,
137 .\"O .BR HUGE_VALF ,
138 .\"O or
139 .\"O .BR HUGE_VALL ,
140 .\"O respectively, with a sign the same as
141 .\"O .IR x .
142 結果がオーバーフローする場合、範囲エラーが発生し、
143 各関数はそれぞれ
144 .BR HUGE_VAL ,
145 .BR HUGE_VALF ,
146 .B HUGE_VALL
147 を返す。返り値の符号は
148 .I x
149 と同じとなる。
150 .\"O .SH ERRORS
151 .SH エラー
152 .\"O See
153 .\"O .BR math_error (7)
154 .\"O for information on how to determine whether an error has occurred
155 .\"O when calling these functions.
156 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
157 .BR math_error (7)
158 を参照のこと。
159 .PP
160 .\"O The following errors can occur:
161 以下のエラーが発生する可能性がある。
162 .TP
163 .\"O Range error, overflow
164 範囲エラー: 結果のオーバーフロー
165 .\"O .I errno
166 .\"O is set to
167 .\"O .BR ERANGE .
168 .\"O An overflow floating-point exception
169 .\"O .RB ( FE_OVERFLOW )
170 .\"O is raised.
171 .I errno
172
173 .B ERANGE
174 が設定される。
175 オーバーフロー浮動小数点例外
176 .RB ( FE_OVERFLOW )
177 が上がる。
178 .TP
179 .\"O Range error, underflow
180 範囲エラー: 結果のアンダーフロー
181 .\"O .I errno
182 .\"O is set to
183 .\"O .BR ERANGE .
184 .\"O An underflow floating-point exception
185 .\"O .RB ( FE_UNDERFLOW )
186 .\"O is raised.
187 .I errno
188
189 .B ERANGE
190 が設定される。
191 アンダーフロー浮動小数点例外
192 .RB ( FE_UNDERFLOW )
193 が上がる。
194 .\"O .SH "CONFORMING TO"
195 .SH 準拠
196 C99, POSIX.1-2001.
197 .\"O The variant returning
198 .\"O .I double
199 .\"O also conforms to
200 .\"O SVr4, 4.3BSD, C89.
201 .I double
202 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
203 .\"O .SH "SEE ALSO"
204 .SH 関連項目
205 .BR frexp (3),
206 .BR modf (3),
207 .BR scalbln (3)