.\" 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 2020\-06\-09 "" "Linux Programmer's Manual" .SH 名前 y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- 第二種ベッセル関数 .SH 書式 .nf \fB#include \fP .PP \fBdouble y0(double \fP\fIx\fP\fB);\fP \fBdouble y1(double \fP\fIx\fP\fB);\fP \fBdouble yn(int \fP\fIn\fP\fB, double \fP\fIx\fP\fB);\fP .PP \fBfloat y0f(float \fP\fIx\fP\fB);\fP \fBfloat y1f(float \fP\fIx\fP\fB);\fP \fBfloat ynf(int \fP\fIn\fP\fB, float \fP\fIx\fP\fB);\fP .PP \fBlong double y0l(long double \fP\fIx\fP\fB);\fP \fBlong double y1l(long double \fP\fIx\fP\fB);\fP \fBlong double ynl(int \fP\fIn\fP\fB, long double \fP\fIx\fP\fB);\fP .fi .PP \fI\-lm\fP でリンクする。 .PP .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP .ad l \fBy0\fP(), \fBy1\fP(), \fByn\fP(): .RS 4 _XOPEN_SOURCE || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .RE .br \fBy0f\fP(), \fBy0l\fP(), \fBy1f\fP(), \fBy1l\fP(), \fBynf\fP(), \fBynl\fP(): .RS 4 _XOPEN_SOURCE \ >=\ 600 || (_ISOC99_SOURCE && _XOPEN_SOURCE) || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .RE .ad b .SH 説明 関数 \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 に対する第二種ベッセル関数の値を返す。 .PP \fIx\fP が NaN の場合、NaN が返される。 .PP \fIx\fP が負の場合、領域エラー (domain error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP, \-\fBHUGE_VALL\fP を返す (POSIX.1\-2001 ではこの場合に NaN を返すことも認めている)。 .PP \fIx\fP が 0.0 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP, \-\fBHUGE_VALL\fP を返す。 .PP 結果がアンダーフローする場合、 範囲エラー (range error) が発生し、 各関数は 0.0 を返す。 .PP 結果がオーバーフローする場合、範囲エラーが発生し、 各関数はそれぞれ \-\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. \fIerrno\fP に \fBERANGE\fP が設定され、 \fBFE_DIVBYZERO\fP 例外が上がる (ただし「バグ」を参照)。 .TP 範囲エラー (range error): 結果のアンダーフロー .\" e.g., y0(1e33) on glibc 2.8/x86-32 .\" This is intended behavior .\" See 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 \fIerrno\fP に \fBERANGE\fP が設定される (「バグ」の節も参照)。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP) が上がる。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lb lb lb l l l. インターフェース 属性 値 T{ \fBy0\fP(), \fBy0f\fP(), \fBy0l\fP() T} Thread safety MT\-Safe T{ \fBy1\fP(), \fBy1f\fP(), \fBy1l\fP() T} Thread safety MT\-Safe T{ \fByn\fP(), \fBynf\fP(), \fBynl\fP() T} Thread safety MT\-Safe .TE .SH 準拠 \fIdouble\fP 型の値を返す関数は、SVr4, 4.3BSD, POSIX.1\-2001, POSIX.1\-2008 に準拠する。 それ以外は非標準の関数で、BSD にも存在する。 .SH バグ .\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807 Before glibc 2.19, these functions misdiagnosed pole errors: \fIerrno\fP was set to \fBEDOM\fP, instead of \fBERANGE\fP and no \fBFE_DIVBYZERO\fP exception was raised. .PP .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808 Before glibc 2.17, did not set \fIerrno\fP for "range error: result underflow". .PP .\" 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 プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。