OSDN Git Service

366c039019e197c2c2b77b37e9ed19b052318f67
[linuxjm/LDP_man-pages.git] / release / man3 / lround.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 .TH LROUND 3 2010\-09\-20 "" "Linux Programmer's Manual"
33 .SH 名前
34 lround, lroundf, lroundl, llround, llroundf, llroundl \- (0 から遠い方の)
35 最も近い整数値に丸める
36 .SH 書式
37 .nf
38 \fB#include <math.h>\fP
39 .sp
40 \fBlong int lround(double \fP\fIx\fP\fB);\fP
41 .br
42 \fBlong int lroundf(float \fP\fIx\fP\fB);\fP
43 .br
44 \fBlong int lroundl(long double \fP\fIx\fP\fB);\fP
45 .sp
46 \fBlong long int llround(double \fP\fIx\fP\fB);\fP
47 .br
48 \fBlong long int llroundf(float \fP\fIx\fP\fB);\fP
49 .br
50 \fBlong long int llroundl(long double \fP\fIx\fP\fB);\fP
51 .fi
52 .sp
53 \fI\-lm\fP でリンクする。
54 .sp
55 .in -4n
56 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
57 .in
58 .sp
59 .ad l
60 上記の全ての関数:
61 .RS 4
62 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
63 .br
64 or \fIcc\ \-std=c99\fP
65 .RE
66 .ad
67 .SH 説明
68 これらの関数は最も近い整数に引き数を丸める。 現在の丸め方向に関係なく、 0 から遠い方の最も近い整数に引き数は丸められる (現在の丸め方向については
69 \fBfenv\fP(3)  参照)。
70
71 \fBround\fP(3), \fBceil\fP(3)  などと違い、これらの関数の返り値の型は引き数の型と異なる点に注意すること。
72 .SH 返り値
73 これらの関数は丸めた整数値を返す。
74
75 .\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1)
76 \fIx\fP が NaN か無限大の場合、もしくは丸めた値が大き過ぎて \fIlong\fP (\fBll*\fP 関数の場合には \fIlong long\fP)
77 に格納できない場合、 領域エラー (domain error) が発生し、返り値は不定となる。
78 .SH エラー
79 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
80 .PP
81 以下のエラーが発生する可能性がある。
82 .TP 
83 領域エラー (domain error): \fIx\fP が NaN か無限大、もしくは丸めた値が大き過ぎる
84 .\" .I errno
85 .\" is set to
86 .\" .BR EDOM .
87 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
88 .PP
89 .\" FIXME . Is it intentional that these functions do not set errno?
90 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6797
91 これらの関数は \fIerrno\fP を設定しない。
92 .SH バージョン
93 これらの関数は glibc バージョン 2.1 で初めて登場した。
94 .SH 準拠
95 C99, POSIX.1\-2001.
96 .SH 関連項目
97 \fBceil\fP(3), \fBfloor\fP(3), \fBlrint\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3),
98 \fBround\fP(3)
99 .SH この文書について
100 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
101 である。プロジェクトの説明とバグ報告に関する情報は
102 http://www.kernel.org/doc/man\-pages/ に書かれている。