OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / sqrt.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 2002-07-27 by Walter Harms
31 .\"     (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .\" Japanese Version Copyright (c) 1996 Kenji Kajiwara
34 .\"         all rights reserved.
35 .\" Translated Mon Jul 15 18:40:00 JST 1996
36 .\"         by Kenji Kajiwara
37 .\" Proof Reading: Takashi Yoshino
38 .\" Updated Sun Sep 14 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
39 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH SQRT 3  2008-08-05 ""  "Linux Programmer's Manual"
42 .SH Ì¾Á°
43 sqrt, sqrtf, sqrtl \- Ê¿Êýº¬´Ø¿ô
44 .SH ½ñ¼°
45 .nf
46 .B #include <math.h>
47 .sp
48 .BI "double sqrt(double " x );
49 .br
50 .BI "float sqrtf(float " x );
51 .br
52 .BI "long double sqrtl(long double " x );
53 .fi
54 .sp
55 .\"O Link with \fI\-lm\fP.
56 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
57 .sp
58 .in -4n
59 .\"O Feature Test Macro Requirements for glibc (see
60 .\"O .BR feature_test_macros (7)):
61 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
62 .RB ( feature_test_macros (7)
63 »²¾È):
64 .in
65 .sp
66 .ad l
67 .BR sqrtf (),
68 .BR sqrtl ():
69 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
70 .I cc\ -std=c99
71 .ad b
72 .\"O .SH DESCRIPTION
73 .SH ÀâÌÀ
74 .\"O The
75 .\"O .BR sqrt ()
76 .\"O function returns the nonnegative square root of \fIx\fP.
77 .BR sqrt ()
78 ´Ø¿ô¤Ï \fIx\fP ¤ÎÊ¿Êýº¬¤Î¤¦¤ÁÉé¤Ç¤Ê¤¤Êý¤ÎÃͤòÊÖ¤¹¡£
79 .\"O .SH "RETURN VALUE"
80 .SH ÊÖ¤êÃÍ
81 .\"O On success, these functions return the square root of
82 .\"O .IR x .
83 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
84 .I x
85 ¤ÎÊ¿Êýº¬¤òÊÖ¤¹¡£
86
87 .\"O If
88 .\"O .I x
89 .\"O is a NaN, a NaN is returned.
90 .I x
91 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
92
93 .\"O If
94 .\"O .I x
95 .\"O is +0 (\-0), +0 (\-0) is returned.
96 .I x
97 ¤¬ +0 (\-0) ¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
98  
99 .\"O If
100 .\"O .I x
101 .\"O is positive infinity, positive infinity is returned.
102 .I x
103 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
104
105 .\"O If
106 .\"O .I x
107 .\"O is less than \-0,
108 .\"O a domain error occurs,
109 .\"O and a NaN is returned.
110 .I x
111 ¤¬ 0 Ì¤Ëþ¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
112 NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
113 .\"O .SH ERRORS
114 .SH ¥¨¥é¡¼
115 .\"O See
116 .\"O .BR math_error (7)
117 .\"O for information on how to determine whether an error has occurred
118 .\"O when calling these functions.
119 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
120 .BR math_error (7)
121 ¤ò»²¾È¤Î¤³¤È¡£
122 .PP
123 .\"O The following errors can occur:
124 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
125 .TP
126 .\"O Domain error: \fIx\fP less than \-0
127 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬ 0 Ì¤Ëþ
128 .\"O .I errno
129 .\"O is set to
130 .\"O .BR EDOM .
131 .\"O An invalid floating-point exception
132 .\"O .RB ( FE_INVALID )
133 .\"O is raised.
134 .I errno
135 ¤Ë
136 .B EDOM
137 ¤¬ÀßÄꤵ¤ì¤ë¡£
138 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
139 .RB ( FE_INVALID )
140 ¤¬¾å¤¬¤ë¡£
141 .\"O .SH "CONFORMING TO"
142 .SH ½àµò
143 C99, POSIX.1-2001.
144 .\"O The variant returning
145 .\"O .I double
146 .\"O also conforms to
147 .\"O SVr4, 4.3BSD, C89.
148 .I double
149 ÈǤδؿô¤Ï SVr4, 4.3BSD, C89 ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
150 .SH ´ØÏ¢¹àÌÜ
151 .BR cbrt (3),
152 .BR csqrt (3),
153 .BR hypot (3)