.\" Copyright 2001 Andries Brouwer . .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO .\" all rights reserved. .\" Translated Sun Jul 8 11:59:22 JST 2001 .\" by Yuichi SATO .\" Updated & Modified Sat Jan 15 22:39:05 JST 2005 .\" by Yuichi SATO .\" Updated 2008-09-18, Akihiro MOTOKI .\" .TH LRINT 3 2014\-01\-18 "" "Linux Programmer's Manual" .SH 名前 lrint, lrintf, lrintl, llrint, llrintf, llrintl \- 最も近い整数値に丸める .SH 書式 .nf \fB#include \fP .sp \fBlong int lrint(double \fP\fIx\fP\fB);\fP .br \fBlong int lrintf(float \fP\fIx\fP\fB);\fP .br \fBlong int lrintl(long double \fP\fIx\fP\fB);\fP .sp \fBlong long int llrint(double \fP\fIx\fP\fB);\fP .br \fBlong long int llrintf(float \fP\fIx\fP\fB);\fP .br \fBlong long int llrintl(long double \fP\fIx\fP\fB);\fP .fi .sp \fI\-lm\fP でリンクする。 .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l 上記の全ての関数: .RS 4 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or \fIcc\ \-std=c99\fP .RE .ad .SH 説明 これらの関数は、現在の丸め方向に基づき、最も近い整数に引き数を丸める (現在の丸め方向については \fBfesetround\fP(3) を参照)。 \fBrint\fP(3) 系の関数と違い、これらの関数の返り値の型は引き数の型と異なる点に注意すること。 .SH 返り値 これらの関数は丸めた整数値を返す。 .\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1) \fIx\fP が NaN か無限大の場合、もしくは丸めた値が大き過ぎて \fIlong\fP (\fBll*\fP 関数の場合には \fIlong long\fP) に格納できない場合、 領域エラー (domain error) が発生し、返り値は不定となる。 .SH エラー これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7) を参照のこと。 .PP 以下のエラーが発生する可能性がある。 .TP 領域エラー (domain error): \fIx\fP が NaN か無限大、もしくは丸めた値が大き過ぎる .\" .I errno .\" is set to .\" .BR EDOM . 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP) が上がる。 .PP .\" FIXME . Is it intentional that these functions do not set errno? .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6798 これらの関数は \fIerrno\fP を設定しない。 .SH バージョン これらの関数は glibc バージョン 2.1 で初めて登場した。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBlrint\fP(), \fBlrintf\fP(), \fBlrintl\fP(), \fBllrint\fP(), \fBllrintf\fP(), \fBllrintl\fP() はスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. .SH 関連項目 \fBceil\fP(3), \fBfloor\fP(3), \fBlround\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3), \fBround\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。