OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / release / man3 / ceil.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 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
26 .\"
27 .\"*******************************************************************
28 .\"
29 .\" This file was generated with po4a. Translate the source file.
30 .\"
31 .\"*******************************************************************
32 .\"
33 .\" Japanese Version Copyright (c) 1997 Ueyama Rui
34 .\"         all rights reserved.
35 .\" Translated Tue Feb 21 0:47:30 JST 1997
36 .\"         by Ueyama Rui <ueyama@campusnet.or.jp>
37 .\" Updated & Modified Fri Jul  6 20:35:28 JST 2001
38 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
39 .\" Updated & Modified Sun Jan  9 23:39:35 JST 2005
40 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
41 .\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
42 .\"
43 .TH CEIL 3 2013\-06\-21 "" "Linux Programmer's Manual"
44 .SH 名前
45 ceil, ceilf, ceill \- 引き数を下回らない最小の整数値
46 .SH 書式
47 .nf
48 \fB#include <math.h>\fP
49 .sp
50 \fBdouble ceil(double \fP\fIx\fP\fB);\fP
51 .br
52 \fBfloat ceilf(float \fP\fIx\fP\fB);\fP
53 .br
54 \fBlong double ceill(long double \fP\fIx\fP\fB);\fP
55 .fi
56 .sp
57 \fI\-lm\fP でリンクする。
58 .sp
59 .in -4n
60 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
61 .in
62 .sp
63 .ad l
64 \fBceilf\fP(), \fBceill\fP():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
67 || _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 or \fIcc\ \-std=c99\fP
70 .RE
71 .ad
72 .SH 説明
73 これらの関数は \fIx\fP より小さくない最小の整数値を返す。
74
75 例えば、 \fIceil(0.5)\fP は 1.0 であり、 \fIceil(\-0.5)\fP は 0.0 である。
76 .SH 返り値
77 これらの関数は \fIx\fP を下回らない整数値を返す。
78
79 \fIx\fP が整数、+0、\-0、NaN、無限のいずれかの場合、 \fIx\fP そのものが返される。
80 .SH エラー
81 エラーは発生しない。 POSIX.1\-2001 にはオーバーフローでの範囲エラー (range error) の 記載がある。「注意」の節を参照のこと。
82 .SH 属性
83 .SS "マルチスレッディング (pthreads(7) 参照)"
84 関数 \fBceil\fP(), \fBceilf\fP(), \fBceill\fP() はスレッドセーフである。
85 .SH 準拠
86 C99, POSIX.1\-2001.  \fIdouble\fP 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
87 .SH 注意
88 .\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point.
89 SUSv2 と POSIX.1\-2001 にはオーバーフローに関する記述があり、 オーバーフローの場合には、 \fIerrno\fP を \fBERANGE\fP
90 に設定するか、 \fBFE_OVERFLOW\fP 例外を発生することとされている。
91 実際のところ、どの現行のマシンでも結果がオーバーフローを起こすことはないので、 このエラー処理は意味がない。
92 (より正確に言うと、オーバーフローは指数部の最大値が 仮数部を表すビットの数より小さい場合にしか起こらない。 IEEE\-754 規格の 32 ビットと
93 64 ビットの浮動小数では、 指数部の最大値はそれぞれ 128 と 1024 であり、 仮数部のビット数はそれぞれ 24 と 53 である。)
94
95 これらの関数が返す整数値は整数型 (\fIint\fP, \fIlong\fP など) に格納するには大き過ぎるかもしれない。
96 オーバーフローが起こった場合の結果は分からないので、 オーバーフローを避けるため、アプリケーションでは整数型に代入する前に
97 返された値の範囲確認を実行すべきである。
98 .SH 関連項目
99 \fBfloor\fP(3), \fBlrint\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3), \fBround\fP(3),
100 \fBtrunc\fP(3)
101 .SH この文書について
102 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
103 である。プロジェクトの説明とバグ報告に関する情報は
104 http://www.kernel.org/doc/man\-pages/ に書かれている。