OSDN Git Service

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