OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / hypot.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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.
11 .\"
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.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2002-07-27 by Walter Harms
29 .\"     (walter.harms@informatik.uni-oldenburg.de)
30 .\"
31 .\" Japanese Version Copyright (c) 1996 Kenji Kajiwara
32 .\"         all rights reserved.
33 .\" Translated Mon Jul 15 18:20:00 JST 1996
34 .\"         by Kenji Kajiwara
35 .\" Proof Reading: Takashi Yoshino
36 .\" Updated & Modified Sun Jun  6 05:30:45 JST 2004
37 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
38 .\" Updated & Modified Sat Jan 15 02:32:55 JST 2005 by Yuichi SATO
39 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH HYPOT 3 2010-09-20 ""  "Linux Programmer's Manual"
42 .SH Ì¾Á°
43 hypot, hypotf, hypotl \- ¥æ¡¼¥¯¥ê¥Ã¥Éµ÷Î¥´Ø¿ô
44 .SH ½ñ¼°
45 .nf
46 .B #include <math.h>
47 .sp
48 .BI "double hypot(double " x ", double " y );
49 .br
50 .BI "float hypotf(float " x ", float " y );
51 .br
52 .BI "long double hypotl(long double " x ", long double " y );
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 hypot ():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
67 _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 or
70 .I cc\ -std=c99
71 .RE
72 .br
73 .BR hypotf (),
74 .BR hypotl ():
75 .RS 4
76 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
77 _POSIX_C_SOURCE\ >=\ 200112L;
78 .br
79 or
80 .I cc\ -std=c99
81 .RE
82 .ad b
83 .SH ÀâÌÀ
84 .BR hypot ()
85 ´Ø¿ô¤Ï
86 .RI sqrt( x * x + y * y )
87 ¤ÎÃͤòÊÖ¤¹¡£
88 ¤³¤ì¤Ï
89 ľ³Ñ¤ò¶´¤à 2 ÊÕ¤ÎŤµ¤¬
90 .I x
91 ¤È
92 .I y
93 ¤Ç¤¢¤ëľ³Ñ»°³Ñ·Á¤Î¼ÐÊÕ¤ÎŤµ¡¢
94 ¤¹¤Ê¤ï¤Á¡¢¸¶ÅÀ¤ÈÅÀ
95 .RI ( x , y )
96 ¤È¤Îµ÷Î¥¤Ç¤¢¤ë¡£
97
98 ·×»»¤ÎÃæ´Ö¥¹¥Æ¥Ã¥×¤Ç¤Ï¡¢É¬Íװʾå¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤ä¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¬
99 µ¯¤­¤Ê¤¤¤è¤¦¤Ë¤·¤Æ·×»»¤¬¼Â¹Ô¤µ¤ì¤ë¡£
100 .\" e.g., hypot(DBL_MIN, DBL_MIN) does the right thing, as does, say
101 .\" hypot(DBL_MAX/2.0, DBL_MAX/2.0).
102 .SH ÊÖ¤êÃÍ
103 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢
104 ľ³Ñ¤ò¶´¤à 2 ÊÕ¤ÎŤµ¤¬
105 .I x
106 ¤È
107 .I y
108 ¤Ç¤¢¤ëľ³Ñ»°³Ñ·Á¤Î¼ÐÊÕ¤ÎŤµ¤òÊÖ¤¹¡£
109
110 .I x
111 ¤«
112 .I y
113 ¤¬Ìµ¸ÂÂç¤Î¾ì¹ç¡¢Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
114
115 .I x
116 ¤«
117 .I y
118 ¤Î°ìÊý¤¬ NaN ¤Ç¡¢¤â¤¦°ìÊý¤¬Ìµ¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢
119 NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
120
121 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
122 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
123 .BR HUGE_VAL ,
124 .BR HUGE_VALF ,
125 .B HUGE_VALL
126 ¤òÊÖ¤¹¡£
127
128 ξÊý¤Î°ú¤­¿ô¤¬ÈóÀµµ¬²½¿ô (subnormal) ¤Ç¡¢·ë²Ì¤âÈóÀµµ¬²½¿ô (subnormal) ¤Î¾ì¹ç¡¢
129 .\" Actually, could the result not be subnormal if both arguments
130 .\" are subnormal?  I think not -- mtk, Jul 2008
131 ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢Àµ¤·¤¤·ë²Ì¤¬ÊÖ¤µ¤ì¤ë¡£
132 .SH ¥¨¥é¡¼
133 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
134 .BR math_error (7)
135 ¤ò»²¾È¤Î¤³¤È¡£
136 .PP
137 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
138 .TP
139 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
140 .I errno
141 ¤Ë
142 .B ERANGE
143 ¤¬ÀßÄꤵ¤ì¤ë¡£
144 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
145 .RB ( FE_OVERFLOW )
146 ¤¬¾å¤¬¤ë¡£
147 .TP
148 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥¢¥ó¥À¡¼¥Õ¥í¡¼
149 .\" .I errno
150 .\" is set to
151 .\" .BR ERANGE .
152 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
153 .RB ( FE_UNDERFLOW )
154 ¤¬¾å¤¬¤ë¡£
155 .IP
156 ¤³¤Î¾ì¹ç¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
157 .I errno
158 ¤òÀßÄꤷ¤Ê¤¤¡£
159 .\" FIXME . Is it intentional that these functions do not set errno?
160 .\" They do set errno for the overflow case.
161 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6795
162 .SH ½àµò
163 C99, POSIX.1-2001.
164 .I double
165 ÈǤδؿô¤Ï SVr4, 4.3BSD ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
166 .SH ´ØÏ¢¹àÌÜ
167 .BR cabs (3),
168 .BR sqrt (3)