OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[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 .\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated Sat Jul 14 11:21:46 JST 2001
28 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
29 .\" Updated & Modified Sun Jan 16 06:26:19 JST 2005
30 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
31 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"
33 .TH LROUND 3  2010-09-20 "" "Linux Programmer's Manual"
34 .SH 名前
35 lround, lroundf, lroundl, llround, llroundf, llroundl \-
36 (0 から遠い方の) 最も近い整数値に丸める
37 .nf
38 .B #include <math.h>
39 .sp
40 .BI "long int lround(double " x );
41 .br
42 .BI "long int lroundf(float " x );
43 .br
44 .BI "long int lroundl(long double " x );
45 .sp
46 .BI "long long int llround(double " x );
47 .br
48 .BI "long long int llroundf(float " x );
49 .br
50 .BI "long long int llroundl(long double " x );
51 .fi
52 .sp
53 \fI\-lm\fP でリンクする。
54 .sp
55 .in -4n
56 glibc 向けの機能検査マクロの要件
57 .RB ( feature_test_macros (7)
58 参照):
59 .in
60 .sp
61 .ad l
62 ここに記載されている全ての関数:
63 .RS 4
64 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
65 _POSIX_C_SOURCE\ >=\ 200112L;
66 .br
67 or
68 .I cc\ -std=c99
69 .RE
70 .ad
71 \"O .SH DESCRIPTION
72 .SH 説明
73 これらの関数は最も近い整数に引き数を丸める。
74 現在の丸め方向に関係なく、
75 0 から遠い方の最も近い整数に引き数は丸められる
76 (現在の丸め方向については
77 .BR fenv (3)
78 参照)。
79
80 .BR round (3),
81 .BR ceil (3)
82 などと違い、これらの関数の返り値の型は引き数の型と異なる点に注意すること。
83 .SH 返り値
84 これらの関数は丸めた整数値を返す。
85
86 .I x
87 が NaN か無限大の場合、もしくは丸めた値が大き過ぎて
88 .I long
89 .RB ( ll*
90 関数の場合には
91 .IR "long long" )
92 に格納できない場合、
93 領域エラー (domain error) が発生し、返り値は不定となる。
94 .\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1)
95 .SH エラー
96 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
97 .BR math_error (7)
98 を参照のこと。
99 .PP
100 以下のエラーが発生する可能性がある。
101 .TP
102 領域エラー (domain error): \fIx\fP が NaN か無限大、もしくは丸めた値が大き過ぎる
103 .\" .I errno
104 .\" is set to
105 .\" .BR EDOM .
106 不正 (invalid) 浮動小数点例外
107 .RB ( FE_INVALID )
108 が上がる。
109 .PP
110 これらの関数は
111 .I errno
112 を設定しない。
113 .\" FIXME . Is it intentional that these functions do not set errno?
114 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6797
115 .SH バージョン
116 これらの関数は glibc バージョン 2.1 で初めて登場した。
117 .SH 準拠
118 C99, POSIX.1-2001.
119 .SH 関連項目
120 .BR ceil (3),
121 .BR floor (3),
122 .BR lrint (3),
123 .BR nearbyint (3),
124 .BR rint (3),
125 .BR round (3)