OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / 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  2010-09-20 ""  "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 .RS 4
70 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
71 _POSIX_C_SOURCE\ >=\ 200112L;
72 .br
73 or
74 .I cc\ -std=c99
75 .RE
76 .ad
77 .\"O .SH DESCRIPTION
78 .SH 説明
79 .\"O The
80 .\"O .BR sqrt ()
81 .\"O function returns the nonnegative square root of \fIx\fP.
82 .BR sqrt ()
83 関数は \fIx\fP の平方根のうち負でない方の値を返す。
84 .\"O .SH "RETURN VALUE"
85 .SH 返り値
86 .\"O On success, these functions return the square root of
87 .\"O .IR x .
88 成功すると、これらの関数は
89 .I x
90 の平方根を返す。
91
92 .\"O If
93 .\"O .I x
94 .\"O is a NaN, a NaN is returned.
95 .I x
96 が NaN の場合、NaN が返される。
97
98 .\"O If
99 .\"O .I x
100 .\"O is +0 (\-0), +0 (\-0) is returned.
101 .I x
102 が +0 (\-0) の場合、+0 (\-0) が返される。
103  
104 .\"O If
105 .\"O .I x
106 .\"O is positive infinity, positive infinity is returned.
107 .I x
108 が正の無限大の場合、正の無限大が返される。
109
110 .\"O If
111 .\"O .I x
112 .\"O is less than \-0,
113 .\"O a domain error occurs,
114 .\"O and a NaN is returned.
115 .I x
116 が 0 未満の場合、領域エラー (domain error) が発生し、
117 NaN が返される。
118 .\"O .SH ERRORS
119 .SH エラー
120 .\"O See
121 .\"O .BR math_error (7)
122 .\"O for information on how to determine whether an error has occurred
123 .\"O when calling these functions.
124 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
125 .BR math_error (7)
126 を参照のこと。
127 .PP
128 .\"O The following errors can occur:
129 以下のエラーが発生する可能性がある。
130 .TP
131 .\"O Domain error: \fIx\fP less than \-0
132 領域エラー (domain error): \fIx\fP が 0 未満
133 .\"O .I errno
134 .\"O is set to
135 .\"O .BR EDOM .
136 .\"O An invalid floating-point exception
137 .\"O .RB ( FE_INVALID )
138 .\"O is raised.
139 .I errno
140
141 .B EDOM
142 が設定される。
143 不正 (invalid) 浮動小数点例外
144 .RB ( FE_INVALID )
145 が上がる。
146 .\"O .SH "CONFORMING TO"
147 .SH 準拠
148 C99, POSIX.1-2001.
149 .\"O The variant returning
150 .\"O .I double
151 .\"O also conforms to
152 .\"O SVr4, 4.3BSD, C89.
153 .I double
154 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
155 .SH 関連項目
156 .BR cbrt (3),
157 .BR csqrt (3),
158 .BR hypot (3)