OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[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 2008-08-05 ""  "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 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; or
66 .I cc\ -std=c99
67 .br
68 .BR hypotf (),
69 .BR hypotl ():
70 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
71 .I cc\ -std=c99
72 .ad b
73 .SH ÀâÌÀ
74 .BR hypot ()
75 ´Ø¿ô¤Ï
76 .RI sqrt( x * x + y * y )
77 ¤ÎÃͤòÊÖ¤¹¡£
78 ¤³¤ì¤Ï
79 ľ³Ñ¤ò¶´¤à 2 ÊÕ¤ÎŤµ¤¬
80 .I x
81 ¤È
82 .I y
83 ¤Ç¤¢¤ëľ³Ñ»°³Ñ·Á¤Î¼ÐÊÕ¤ÎŤµ¡¢
84 ¤¹¤Ê¤ï¤Á¡¢¸¶ÅÀ¤ÈÅÀ
85 .RI ( x , y )
86 ¤È¤Îµ÷Î¥¤Ç¤¢¤ë¡£
87
88 ·×»»¤ÎÃæ´Ö¥¹¥Æ¥Ã¥×¤Ç¤Ï¡¢É¬Íװʾå¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤ä¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¬
89 µ¯¤­¤Ê¤¤¤è¤¦¤Ë¤·¤Æ·×»»¤¬¼Â¹Ô¤µ¤ì¤ë¡£
90 .\" e.g., hypot(DBL_MIN, DBL_MIN) does the right thing, as does, say
91 .\" hypot(DBL_MAX/2.0, DBL_MAX/2.0).
92 .SH ÊÖ¤êÃÍ
93 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢
94 ľ³Ñ¤ò¶´¤à 2 ÊÕ¤ÎŤµ¤¬
95 .I x
96 ¤È
97 .I y
98 ¤Ç¤¢¤ëľ³Ñ»°³Ñ·Á¤Î¼ÐÊÕ¤ÎŤµ¤òÊÖ¤¹¡£
99
100 .I x
101 ¤«
102 .I y
103 ¤¬Ìµ¸ÂÂç¤Î¾ì¹ç¡¢Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
104
105 .I x
106 ¤«
107 .I y
108 ¤Î°ìÊý¤¬ NaN ¤Ç¡¢¤â¤¦°ìÊý¤¬Ìµ¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢
109 NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
110
111 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
112 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
113 .BR HUGE_VAL ,
114 .BR HUGE_VALF ,
115 .B HUGE_VALL
116 ¤òÊÖ¤¹¡£
117
118 ξÊý¤Î°ú¤­¿ô¤¬ÈóÀµµ¬²½¿ô (subnormal) ¤Ç¡¢·ë²Ì¤âÈóÀµµ¬²½¿ô (subnormal) ¤Î¾ì¹ç¡¢
119 .\" Actually, could the result not be subnormal if both arguments
120 .\" are subnormal?  I think not -- mtk, Jul 2008
121 ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢Àµ¤·¤¤·ë²Ì¤¬ÊÖ¤µ¤ì¤ë¡£
122 .SH ¥¨¥é¡¼
123 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
124 .BR math_error (7)
125 ¤ò»²¾È¤Î¤³¤È¡£
126 .PP
127 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
128 .TP
129 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
130 .I errno
131 ¤Ë
132 .B ERANGE
133 ¤¬ÀßÄꤵ¤ì¤ë¡£
134 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
135 .RB ( FE_OVERFLOW )
136 ¤¬¾å¤¬¤ë¡£
137 .TP
138 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥¢¥ó¥À¡¼¥Õ¥í¡¼
139 .\" .I errno
140 .\" is set to
141 .\" .BR ERANGE .
142 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
143 .RB ( FE_UNDERFLOW )
144 ¤¬¾å¤¬¤ë¡£
145 .IP
146 ¤³¤Î¾ì¹ç¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
147 .I errno
148 ¤òÀßÄꤷ¤Ê¤¤¡£
149 .\" FIXME . Is it intentional that these functions do not set errno?
150 .\" They do set errno for the overflow case.
151 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6795
152 .SH ½àµò
153 C99, POSIX.1-2001.
154 .I double
155 ÈǤδؿô¤Ï SVr4, 4.3BSD ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
156 .SH ´ØÏ¢¹àÌÜ
157 .BR cabs (3),
158 .BR sqrt (3)