OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / lgamma.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" based on glibc infopages
4 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
5 .\"     <mtk.manpages@gmail.com>
6 .\"
7 .\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
8 .\"         all rights reserved.
9 .\" Translated Sun Sep 22 08:44:32 2002
10 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
11 .\" Updated & Modified Sat Feb 12 12:40:00 2005
12 .\"         by SAITOH Akira <s-akira@users.sourceforge.net>
13 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
14 .\"
15 .TH LGAMMA 3 2008-08-05 "" "Linux Programmer's Manual"
16 .\"O .SH NAME
17 .\"O lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, signgam \-
18 .\"O log gamma function
19 .SH Ì¾Á°
20 lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, signgam \-
21 ¥¬¥ó¥Þ´Ø¿ô¤ÎÂпô¤ò·×»»¤¹¤ë
22 .\"O .SH SYNOPSIS
23 .SH ½ñ¼°
24 .nf
25 .B #include <math.h>
26 .sp
27 .BI "double lgamma(double " x );
28 .br
29 .BI "float lgammaf(float " x );
30 .br
31 .BI "long double lgammal(long double " x );
32 .sp
33 .BI "double lgamma_r(double " x ", int *" signp );
34 .br
35 .BI "float lgammaf_r(float " x ", int *" signp );
36 .br
37 .BI "long double lgammal_r(long double " x ", int *" signp );
38 .sp
39 .BI "extern int " signgam ;
40 .fi
41 .sp
42 .\"O Link with \fI\-lm\fP.
43 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
44 .sp
45 .in -4n
46 .\"O Feature Test Macro Requirements for glibc (see
47 .\"O .BR feature_test_macros (7)):
48 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
49 .RB ( feature_test_macros (7)
50 »²¾È):
51 .in
52 .sp
53 .ad l
54 .BR lgamma ():
55 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; or
56 .I cc\ -std=c99
57 .br
58 .BR lgammaf (),
59 .BR lgammal ():
60 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
61 .I cc\ -std=c99
62 .br
63 .BR lgamma_r (),
64 .BR lgammaf_r (),
65 .BR lgammal_r ():
66 _BSD_SOURCE || _SVID_SOURCE
67 .br
68 .IR signgam :
69 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
70 .ad b
71 .\"O .SH DESCRIPTION
72 .\"O For the definition of the Gamma function, see
73 .\"O .BR tgamma (3).
74 .\"O .PP
75 .SH ÀâÌÀ
76 ¥¬¥ó¥Þ´Ø¿ô¤ÎÄêµÁ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
77 .BR tgamma (3)
78 ¤ò»²¾È¤Î¤³¤È¡£
79 .PP
80 .\"O The
81 .\"O .BR lgamma ()
82 .\"O function returns the natural logarithm of
83 .\"O the absolute value of the Gamma function.
84 .\"O The sign of the Gamma function is returned in the
85 .\"O external integer \fIsigngam\fP declared in
86 .\"O .IR <math.h> .
87 .\"O It is 1 when the Gamma function is positive or zero, \-1
88 .\"O when it is negative.
89 .\"O .PP
90 ´Ø¿ô
91 .BR lgamma ()
92 ¤Ï¡¢¥¬¥ó¥Þ´Ø¿ô¤ÎÀäÂÐÃͤμ«Á³Âпô¤òÊÖ¤¹¡£
93 ¥¬¥ó¥Þ´Ø¿ô¤ÎÉä¹æ¤Ï¡¢
94 .I <math.h>
95 ¤ÇÀë¸À¤µ¤ì¤Æ¤¤¤ë extern int \fIsigngam\fP ¤Ë³ÊǼ¤µ¤ì¤ë¡£
96 ³ÊǼ¤µ¤ì¤ëÃͤϡ¢¥¬¥ó¥Þ´Ø¿ô¤¬Àµ¤Þ¤¿¤Ï 0 ¤Î¾ì¹ç 1¡¢
97 Éé¤Î¾ì¹ç \-1 ¤Ç¤¢¤ë¡£
98 .PP
99 .\"O Since using a constant location
100 .\"O .I signgam
101 .\"O is not thread-safe, the functions
102 .\"O .BR lgamma_r ()
103 .\"O etc. have
104 .\"O been introduced; they return the sign via the argument
105 .\"O .IR signp .
106 .I signgam
107 ¤È¤¤¤¦¸ÇÄꤵ¤ì¤¿¾ì½ê¤ò»È¤¦¤³¤È¤Ï¥¹¥ì¥Ã¥É¥»¡¼¥Õ¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢
108 ´Ø¿ô
109 .BR lgamma_r ()
110 ¤Ê¤É¤¬Æ³Æþ¤µ¤ì¤Æ¤¤¤ë¡£
111 ¤³¤ì¤é¤Î´Ø¿ô¤Ç¤Ï¡¢Éä¹æ¤Ï°ú¤­¿ô
112 .I signp
113 ·Ðͳ¤ÇÊÖ¤µ¤ì¤ë¡£
114 .\"O .SH RETURN VALUE
115 .SH ÊÖ¤êÃÍ
116 .\"O On success, these functions return the natural logarithm of Gamma(x).
117 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï Gamma(x) ¤Î¼«Á³Âпô¤òÊÖ¤¹¡£
118
119 .\"O If
120 .\"O .I x
121 .\"O is a NaN, a NaN is returned.
122 .I x
123 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
124
125 .\"O If
126 .\"O .I x
127 .\"O is 1 or 2, +0 is returned.
128 .I x
129 ¤¬ 1 ¤« 2 ¤Î¾ì¹ç¡¢+0 ¤¬ÊÖ¤µ¤ì¤ë¡£
130
131 .\"O If
132 .\"O .I x
133 .\"O is positive infinity or negative infinity,
134 .\"O positive infinity is returned.
135 .I x
136 ¤¬Àµ¤Î̵¸ÂÂ礫Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢
137 Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
138
139 .\"O If
140 .\"O .I x
141 .\"O is a nonpositive integer,
142 .\"O a pole error occurs,
143 .\"O and the functions return
144 .\"O .RB + HUGE_VAL ,
145 .\"O .RB + HUGE_VALF ,
146 .\"O or
147 .\"O .RB + HUGE_VALL ,
148 .\"O respectively.
149 .I x
150 ¤¬Àµ¤Ç¤Ê¤¤À°¿ô¤Î¾ì¹ç¡¢¶Ë¥¨¥é¡¼ (pole error) ¤¬È¯À¸¤·¡¢
151 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
152 .RB + HUGE_VAL ,
153 .RB + HUGE_VALF ,
154 .RB + HUGE_VALL
155 ¤òÊÖ¤¹¡£
156
157 .\"O If the result overflows,
158 .\"O a range error occurs,
159 .\" e.g., lgamma(DBL_MAX)
160 .\"O and the functions return
161 .\"O .BR HUGE_VAL ,
162 .\"O .BR HUGE_VALF ,
163 .\"O or
164 .\"O .BR HUGE_VALL ,
165 .\"O respectively, with the correct mathematical sign.
166 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢
167 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
168 .BR HUGE_VAL ,
169 .BR HUGE_VALF ,
170 .B HUGE_VALL
171 ¤òÊÖ¤¹¡£ÊÖ¤êÃͤˤϿô³ØŪ¤ËÀµ¤·¤¤Éä¹æ¤¬ÉÕÍ¿¤µ¤ì¤ë¡£
172 .\"O .SH ERRORS
173 .SH ¥¨¥é¡¼
174 .\"O See
175 .\"O .BR math_error (7)
176 .\"O for information on how to determine whether an error has occurred
177 .\"O when calling these functions.
178 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
179 .BR math_error (7)
180 ¤ò»²¾È¤Î¤³¤È¡£
181 .PP
182 .\"O The following errors can occur:
183 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
184 .TP
185 .\"O Pole error: \fIx\fP is a nonpositive integer
186 ¶Ë¥¨¥é¡¼: \fIx\fP ¤¬Àµ¤Ç¤Ê¤¤À°¿ô
187 .\"O .I errno
188 .\"O is set to
189 .\" FIXME . glibc 2.8 gives EDOM!
190 .\"O .BR ERANGE
191 .\"O (but see BUGS).
192 .\"O A divide-by-zero floating-point exception
193 .\"O .RB ( FE_DIVBYZERO )
194 .\"O is raised.
195 .I errno
196 ¤Ë
197 .B ERANGE
198 ¤¬ÀßÄꤵ¤ì¤ë (¡Ö¥Ð¥°¡×¤ÎÀá¤ò»²¾È)¡£
199 0 ¤Ë¤è¤ë½ü»» (divide-by-zero) ÉâÆ°¾®¿ôÅÀÎã³°
200 .RB ( FE_DIVBYZERO )
201 ¤¬¾å¤¬¤ë¡£
202 .TP
203 .\"O Range error: result overflow
204 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
205 .\"O .I errno
206 .\"O is set to
207 .\"O .BR ERANGE .
208 .\"O An overflow floating-point exception
209 .\"O .RB ( FE_OVERFLOW )
210 .\"O is raised.
211 .I errno
212 ¤Ë
213 .B ERANGE
214 ¤¬ÀßÄꤵ¤ì¤ë¡£
215 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
216 .RB ( FE_OVERFLOW )
217 ¤¬¾å¤¬¤ë¡£
218 .\" glibc (as at 2.8) also supports an inexact
219 .\" exception for various cases.
220 .\"O .SH "CONFORMING TO"
221 .SH ½àµò
222 .\"O The
223 .\"O .BR lgamma ()
224 .\"O functions are specified in C99 and POSIX.1-2001.
225 .\"O .I signgam
226 .\"O is specified in POSIX.1-2001, but not in C99.
227 .\"O The
228 .\"O .BR lgamma_r ()
229 .\"O functions are nonstandard, but present on several other systems.
230 ´Ø¿ô
231 .BR lgamma ()
232 ¤Ï C99 ¤È POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
233 .I signgam
234 ¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¤¬¡¢C99 ¤Ë¤Ï¤Ê¤¤¡£
235 ´Ø¿ô
236 .BR lgamma_r ()
237 ¤ÏÈóɸ½à¤À¤¬¡¢¤¤¤¯¤Ä¤«¤Î¾¤Î¥·¥¹¥Æ¥à¤Ë¤â¸ºß¤¹¤ë¡£
238 .\"O .SH BUGS
239 .SH ¥Ð¥°
240 .\"O For a pole error,
241 ¶Ë¥¨¥é¡¼¤Î¾ì¹ç¡¢
242 .\"
243 .\" FIXME . this is as at glibc 2.8; check later if this bug is fixed
244 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6777
245 .\"O .I errno
246 .\"O is set to
247 .\"O .BR EDOM ;
248 .I errno
249 ¤Ë
250 .B EDOM
251 ¤¬ÀßÄꤵ¤ì¤ë¡£
252 .\"O POSIX.1 says it should be set to
253 .\"O .BR ERANGE .
254 POSIX.1 ¤Ç¤Ï¡¢
255 .B ERANGE
256 ¤¬ÀßÄꤵ¤ì¤ë¤Ù¤­¤È¤µ¤ì¤Æ¤¤¤ë¡£
257 .\"O .SH "SEE ALSO"
258 .SH ´ØÏ¢¹àÌÜ
259 .BR tgamma (3)