.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" 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) 2008 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2008-09-15, Akihiro MOTOKI .\" .\"WORD: subnormal 非正規化の .\" .TH ERFC 3 2010-09-20 "GNU" "Linux Programmer's Manual" .SH 名前 erfc, erfcf, erfcl \- 相補誤差関数 .SH 書式 .nf .B #include .BI "double erfc(double " x ); .BI "float erfcf(float " x ); .BI "long double erfcl(long double " x ); .fi \fI\-lm\fP でリンクする。 .sp .in -4n glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR erfc (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .br .BR erfcf (), .BR erfcl (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad b .SH 説明 .BR erfc () 関数は .I x の相補誤差関数、つまり 1.0 \- erf(x) を返す。 .SH 返り値 成功すると、これらの関数は .I x の相補誤差関数を返す。 返り値は [0,2] の範囲となる。 .I x が NaN の場合、NaN が返される。 .I x が +0 か \-0 の場合、1 が返される。 .I x が正の無限大の場合、+0 が返される。 .I x が負の無限大の場合、+2 が返される。 関数の結果がアンダーフローし、表現できない値となる場合は、 返り値は 0.0 となる。 関数の結果がアンダーフローするが、 表現できる値 (つまり非正規化数 (subnormal)) となる場合は、 .\" 例えば x86-32 での erfc(27) その値が返され、範囲エラー (range error) が発生する。 .SH エラー これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は .BR math_error (7) を参照のこと。 .PP 以下のエラーが発生する可能性がある。 .TP 範囲エラー: 結果のアンダーフロー (結果が非正規化数) .\" .I errno .\" is set to .\" .BR ERANGE . アンダーフロー浮動小数点例外 .RB ( FE_UNDERFLOW ) が上がる。 .PP これらの関数は .I errno を設定しない。 .\" FIXME . Is it intentional that these functions do not set errno? .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785 .SH 準拠 C99, POSIX.1-2001. .I double 版の関数は SVr4, 4.3BSD にも準拠している。 .SH 注意 .BR erfc () 関数が提供されているのは、 .I x が大きな値の場合に (erf(x) の値は 1 に近付いていくことで) 1-erf(x) の計算において精度が失われるのを避けるためである。 .SH 関連項目 .BR cerf (3), .BR erf (3), .BR exp (3)