.\" Copyright 2004 Andries Brouwer . .\" .\" 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. .\" .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2005-02-21, Akihiro MOTOKI .\" Updated 2008-09-16, Akihiro MOTOKI .\" .\"WORD: classification 分類 .\"WORD: infinite 無限大 .\"WORD: not-a-number 無効値 .\"WORD: NaN 無効値 .\" .TH FINITE 3 2008-08-05 "" "Linux Programmer's Manual" .SH 名前 finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \- BSD の浮動小数点分類関数 .SH 書式 .nf .B #include .sp .BI "int finite(double " x ); .br .BI "int finitef(float " x ); .br .BI "int finitel(long double " x ); .sp .BI "int isinf(double " x ); .br .BI "int isinff(float " x ); .br .BI "int isinfl(long double " x ); .sp .BI "int isnan(double " x ); .br .BI "int isnanf(float " x ); .br .BI "int isnanl(long double " x ); .fi .sp .in -4n glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR finite (), .BR finitef (), .BR finitel (): .RS 4 _BSD_SOURCE || _SVID_SOURCE .RE .BR isinf (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; .br or .I cc\ -std=c99 .RE .br .BR isinff (), .BR isinfl (): .RS 4 _BSD_SOURCE || _SVID_SOURCE .RE .BR isnan (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; .br or .I cc\ -std=c99 .RE .BR isnanf (), .BR isnanl (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 .RE .ad b .SH 説明 .BR finite () 関数は、 \fIx\fP が無限大や無効値 (NaN) のいずれでもない 場合に 0 以外の値を返し、それ以外の場合は 0 を返す。 .BR isnan () 関数は、 \fIx\fP が NaN の場合 0 以外の値を返し、 それ以外の場合は 0 を返す。 .BR isinf () 関数は、 \fIx\fP が正の無限大であれば 1 を返し、\fIx\fP が負の無限大で あれば \-1 を返す。それ以外の場合は 0 を返す。 .SH 注意 これらの関数は廃止された点に注意すること。 C99 では、これらの置き換えとして (どんな型にも適用できる) .BR isfinite (), .BR isinf (), .BR isnan () というマクロが定義されている。 さらに C99 の .BR isinf () は返り値に関して弱い意味での保証しかないことにも 注意すること。詳細は .BR fpclassify (3) を参照。 .\" .\" finite* not on HP-UX; they exist on Tru64. .\" .SH 歴史 .\" .BR finite () .\" 関数は 4.3BSD で登場した。 .\" 4.3BSD のマニュアルの IEEE.3 を参照 .SH 関連項目 .BR fpclassify (3)