OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / release / 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 .SH 名前
43 ldexp, ldexpf, ldexpl \- 浮動小数点実数と 2 の整数乗との積を計算する
44 .SH 書式
45 .nf
46 .B #include <math.h>
47 .sp
48 .BI "double ldexp(double " x ", int " exp );
49 .br
50 .BI "float ldexpf(float " x ", int " exp );
51 .br
52 .BI "long double ldexpl(long double " x ", int " exp );
53 .fi
54 .sp
55 \fI\-lm\fP でリンクする。
56 .sp
57 .in -4n
58 glibc 向けの機能検査マクロの要件
59 .RB ( feature_test_macros (7)
60 参照):
61 .in
62 .sp
63 .ad l
64 .BR ldexpf (),
65 .BR ldexpl ():
66 .RS 4
67 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
68 _POSIX_C_SOURCE\ >=\ 200112L;
69 .br
70 or
71 .I cc\ -std=c99
72 .RE
73 .ad
74 .SH 説明
75 .BR ldexp ()
76 関数は、浮動小数点実数
77 .I x
78 と 2 の
79 .I exp
80 乗との積を返す。
81 .SH 返り値
82 成功すると、これらの関数は
83 .I "x * (2^exp)"
84 を返す。
85
86 .I exp
87 がゼロの場合、
88 .I x
89 が返される。
90
91 .I x
92 が NaN の場合、NaN が返される。
93
94 .I x
95 が正の無限大 (負の無限大) の場合、
96 正の無限大 (負の無限大) が返される。
97
98 結果がアンダーフローする場合、
99 範囲エラー (range error) が発生し、ゼロが返される。
100
101 結果がオーバーフローする場合、範囲エラーが発生し、
102 各関数はそれぞれ
103 .BR HUGE_VAL ,
104 .BR HUGE_VALF ,
105 .B HUGE_VALL
106 を返す。返り値の符号は
107 .I x
108 と同じとなる。
109 .SH エラー
110 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
111 .BR math_error (7)
112 を参照のこと。
113 .PP
114 以下のエラーが発生する可能性がある。
115 .TP
116 範囲エラー: 結果のオーバーフロー
117 .I errno
118
119 .B ERANGE
120 が設定される。
121 オーバーフロー浮動小数点例外
122 .RB ( FE_OVERFLOW )
123 が上がる。
124 .TP
125 範囲エラー: 結果のアンダーフロー
126 .I errno
127
128 .B ERANGE
129 が設定される。
130 アンダーフロー浮動小数点例外
131 .RB ( FE_UNDERFLOW )
132 が上がる。
133 .SH 準拠
134 C99, POSIX.1-2001.
135 .I double
136 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
137 .SH 関連項目
138 .BR frexp (3),
139 .BR modf (3),
140 .BR scalbln (3)