1 .\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
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.
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.
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
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
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>
37 .TH FLOOR 3 2010-09-20 "" "Linux Programmer's Manual"
40 .\"O floor, floorf, floorl \- largest integral value not greater than argument
41 floor, floorf, floorl \- 引き数を越えない最大の整数値
47 .BI "double floor(double " x );
49 .BI "float floorf(float " x );
51 .BI "long double floorl(long double " x );
54 .\"O Link with \fI\-lm\fP.
58 .\"O Feature Test Macro Requirements for glibc (see
59 .\"O .BR feature_test_macros (7)):
61 .RB ( feature_test_macros (7)
69 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
70 _POSIX_C_SOURCE\ >=\ 200112L;
78 .\"O These functions return the largest integral value that is not greater than
94 .\"O .SH "RETURN VALUE"
96 .\"O These functions return the floor of
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、無限大のいずれかの場合、
108 .\"O No errors occur.
110 .\"O POSIX.1-2001 documents a range error for overflows, but see NOTES.
111 POSIX.1-2001 にはオーバーフローに対して範囲エラーが記載されている。
113 .\"O .SH "CONFORMING TO"
116 .\"O The variant returning
118 .\"O also conforms to
119 .\"O SVr4, 4.3BSD, C89.
121 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
124 .\"O SUSv2 and POSIX.1-2001 contain text about overflow (which might set
131 SUSv2 と POSIX.1-2001 にはオーバーフローに関する記述があり、
139 .\"O In practice, the result cannot overflow on any current machine,
140 .\"O so this error-handling stuff is just nonsense.
141 実際のところ、現行のマシンでは結果がオーバーフローを起こすことはないので、
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 である。)