OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / floor.3
1 .\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
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 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
26 .\" and Copyright (c) 2008 Akihiro MOTOKI
27 .\" Translated Mon Jan 20 18:35:18 JST 1997
28 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
29 .\" Updated & Modified Fri Jul  6 20:37:36 JST 2001
30 .\"       by Yuichi SATO <ysato@h4.dion.ne.jp>
31 .\" Updated & Modified Mon Jan 10 08:45:45 JST 2005
32 .\"       by Yuichi SATO <ysato444@yahoo.co.jp>
33 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
34 .\"
35 .\"WORD:        mantissa                仮数
36 .\"
37 .TH FLOOR 3  2010-09-20 "" "Linux Programmer's Manual"
38 .\"O .SH NAME
39 .SH 名前
40 .\"O floor, floorf, floorl \- largest integral value not greater than argument
41 floor, floorf, floorl \- 引き数を越えない最大の整数値
42 .\"O .SH SYNOPSIS
43 .SH 書式
44 .nf
45 .B #include <math.h>
46 .sp
47 .BI "double floor(double " x );
48 .br
49 .BI "float floorf(float " x );
50 .br
51 .BI "long double floorl(long double " x );
52 .fi
53 .sp
54 .\"O Link with \fI\-lm\fP.
55 \fI\-lm\fP でリンクする。
56 .sp
57 .in -4n
58 .\"O Feature Test Macro Requirements for glibc (see
59 .\"O .BR feature_test_macros (7)):
60 glibc 向けの機能検査マクロの要件
61 .RB ( feature_test_macros (7)
62 参照):
63 .in
64 .sp
65 .ad l
66 .BR floorf (),
67 .BR floorl ():
68 .RS 4
69 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
70 _POSIX_C_SOURCE\ >=\ 200112L;
71 .br
72 or
73 .I cc\ -std=c99
74 .RE
75 .ad
76 .\"O .SH DESCRIPTION
77 .SH 説明
78 .\"O These functions return the largest integral value that is not greater than
79 .\"O .IR x .
80 これらの関数は
81 .I x
82 より大きくない最大の整数値を返す。
83
84 .\"O For example,
85 .\"O .IR floor(0.5)
86 .\"O is 0.0, and
87 .\"O .IR floor(\-0.5)
88 .\"O is \-1.0.
89 例えば、
90 .I floor(0.5)
91 は 0.0 で、
92 .I floor(\-0.5)
93 は \-1.0 である。
94 .\"O .SH "RETURN VALUE"
95 .SH 返り値
96 .\"O These functions return the floor of
97 .\"O .IR x .
98 これらの関数は
99 .I x
100 を越えない最小の整数値を返す。
101
102 .\"O If \fIx\fP is integral, +0, \-0, NaN, or an infinity,
103 .\"O \fIx\fP itself is returned.
104 \fIx\fP が整数、+0、\-0、NaN、無限大のいずれかの場合、
105 \fIx\fP そのものが返される。
106 .\"O .SH ERRORS
107 .SH エラー
108 .\"O No errors occur.
109 エラーは発生しない。
110 .\"O POSIX.1-2001 documents a range error for overflows, but see NOTES.
111 POSIX.1-2001 にはオーバーフローに対して範囲エラーが記載されている。
112 「注意」の節を参照。
113 .\"O .SH "CONFORMING TO"
114 .SH 準拠
115 C99, POSIX.1-2001.
116 .\"O The variant returning
117 .\"O .I double
118 .\"O also conforms to
119 .\"O SVr4, 4.3BSD, C89.
120 .I double
121 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
122 .\"O .SH NOTES
123 .SH 注意
124 .\"O SUSv2 and POSIX.1-2001 contain text about overflow (which might set
125 .\"O .I errno
126 .\"O to
127 .\"O .BR ERANGE ,
128 .\"O or raise an
129 .\"O .B FE_OVERFLOW
130 .\"O exception).
131 SUSv2 と POSIX.1-2001 にはオーバーフローに関する記述があり、
132 オーバーフローの場合には、
133 .I errno
134
135 .B ERANGE
136 に設定するか、
137 .B FE_OVERFLOW
138 例外を発生することとされている。
139 .\"O In practice, the result cannot overflow on any current machine,
140 .\"O so this error-handling stuff is just nonsense.
141 実際のところ、現行のマシンでは結果がオーバーフローを起こすことはないので、
142 このエラー処理は意味がない。
143 .\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point.
144 .\"O (More precisely, overflow can happen only when the maximum value
145 .\"O of the exponent is smaller than the number of mantissa bits.
146 .\"O For the IEEE-754 standard 32-bit and 64-bit floating-point numbers
147 .\"O the maximum value of the exponent is 128 (respectively, 1024),
148 .\"O and the number of mantissa bits is 24 (respectively, 53).)
149 (より正確に言うと、オーバーフローは指数部の最大値が
150 仮数部を表すビットの数より小さい場合にしか起こらない。
151 IEEE-754 規格の 32 ビットと 64 ビットの浮動小数では、
152 指数部の最大値はそれぞれ 128 と 1024 であり、
153 仮数部のビット数はそれぞれ 24 と 53 である。)
154 .\"O .SH "SEE ALSO"
155 .SH 関連項目
156 .BR ceil (3),
157 .BR lrint (3),
158 .BR nearbyint (3),
159 .BR rint (3),
160 .BR round (3),
161 .BR trunc (3)