.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" 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 .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:08:17 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2002-08-25, aeb .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB .\" 2008-07-24, mtk, created this page, based on material from j0.3. .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2008-09-19, Akihiro MOTOKI , LDP v3.07 .\" .TH Y0 3 2014\-01\-18 "" "Linux Programmer's Manual" .SH 名前 y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- 第二種ベッセル関数 .SH 書式 .nf \fB#include \fP .sp \fBdouble y0(double \fP\fIx\fP\fB);\fP .br \fBdouble y1(double \fP\fIx\fP\fB);\fP .br \fBdouble yn(int \fP\fIn\fP\fB, double \fP\fIx\fP\fB);\fP .sp \fBfloat y0f(float \fP\fIx\fP\fB);\fP .br \fBfloat y1f(float \fP\fIx\fP\fB);\fP .br \fBfloat ynf(int \fP\fIn\fP\fB, float \fP\fIx\fP\fB);\fP .sp \fBlong double y0l(long double \fP\fIx\fP\fB);\fP .br \fBlong double y1l(long double \fP\fIx\fP\fB);\fP .br \fBlong double ynl(int \fP\fIn\fP\fB, 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 \fBy0\fP(), \fBy1\fP(), \fByn\fP(): .RS 4 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE .RE .br \fBy0f\fP(), \fBy0l\fP(), \fBy1f\fP(), \fBy1l\fP(), \fBynf\fP(), \fBynl\fP(): .RS 4 .\" Also seems to work: -std=c99 -D_XOPEN_SOURCE _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600 .RE .ad b .SH 説明 .PP 関数 \fBy0\fP() と \fBy1\fP() はそれぞれ \fIx\fP の 0 次、1 次の 第二種ベッセル関数の値を返す。 関数 \fByn\fP() は \fIx\fP の \fIn\fP 次の 第二種ベッセル関数の値を返す。 .PP \fIx\fP は正の値でなければならない。 .PP 関数 \fBy0f\fP(), \fBy1f\fP(), \fBynf\fP() は、 \fIfloat\fP 型を引数に取り、返り値として返す。 関数 \fBy0l\fP(), \fBy1l\fP(), \fBynl\fP() は、 \fIlong double\fP 型を引数に取り、返り値として返す。 .SH 返り値 成功すると、これらの関数は \fIx\fP に対する第二種ベッセル関数の値を返す。 \fIx\fP が NaN の場合、NaN が返される。 \fIx\fP が負の場合、領域エラー (domain error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP, \-\fBHUGE_VALL\fP を返す (POSIX.1\-2001 ではこの場合に NaN を返すことも認めている)。 \fIx\fP が 0.0 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP, \-\fBHUGE_VALL\fP を返す。 結果がアンダーフローする場合、 範囲エラー (range error) が発生し、 各関数は 0.0 を返す。 結果がオーバーフローする場合、範囲エラーが発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP, \-\fBHUGE_VALL\fP を返す (POSIX.1\-2001 ではこの場合に 0.0 を返すことも認めている)。 .SH エラー これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7) を参照のこと。 .PP 以下のエラーが発生する可能性がある。 .TP 領域エラー (domain error): \fIx\fP が負である \fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP) が上がる。 .TP 極エラー: \fIx\fP が 0.0 .\" Before POSIX.1-2001 TC2, this was (inconsistently) specified .\" as a range error. .\" FIXME . y0(0.0) gives EDOM .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808 \fIerrno\fP に \fBERANGE\fP が設定される (「バグ」の節を参照のこと)。 このエラーの場合、 \fBfetestexcept\fP(3) は \fBFE_DIVBYZERO\fP 例外を返さない。 .TP 範囲エラー (range error): 結果のアンダーフロー .\" e.g., y0(1e33) on glibc 2.8/x86-32 .\" An underflow floating-point exception .\" .RB ( FE_UNDERFLOW ) .\" is raised. .\" FIXME . Is it intentional that these functions do not use FE_*? .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6806 \fIerrno\fP に \fBERANGE\fP が設定される。 このエラーの場合、 \fBfetestexcept\fP(3) は \fBFE_UNDERFLOW\fP 例外を返さない。 .TP 範囲エラー (range error): 結果のオーバーフロー .\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32 .\" .I errno .\" is set to .\" .BR ERANGE . .\" FIXME . Is it intentional that errno is not set? .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808 この場合、 \fIerrno\fP は設定されない。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP) が上がる。 .SH 準拠 \fIdouble\fP 型の値を返す関数は、SVr4, 4.3BSD, POSIX.1\-2001 に準拠する。 それ以外は非標準の関数で、BSD にも存在する。 .SH バグ .\" FIXME . .\" Bug raised: http://sourceware.org/bugzilla/show_bug.cgi?id=6807 極エラーの場合、これらの関数は \fIerrno\fP に \fBEDOM\fP を設定するが、 POSIX.1\-2004 では \fBERANGE\fP を設定することが要求されている。 .\" FIXME . Actually, 2.3.2 is the earliest test result I have; so yet .\" to confirm if this error occurs only in 2.3.2. glibc バージョン 2.3.2 以前では、 領域エラーが発生した場合に、これらの関数は 不正浮動小数点例外 (\fBFE_INVALID\fP) を上げない。 .SH 関連項目 \fBj0\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。