std:: laguerre, std:: laguerref, std:: laguerrel
|
double
laguerre
(
unsigned
int
n,
double
x
)
;
double
laguerre
(
unsigned
int
n,
float
x
)
;
|
(1) | |
|
double
laguerre
(
unsigned
int
n, IntegralType x
)
;
|
(2) | |
すべての特殊関数と同様に、
laguerre
は実装によって
__STDCPP_MATH_SPEC_FUNCS__
が少なくとも201003Lの値に定義され、かつユーザーが標準ライブラリヘッダーを含める前に
__STDCPP_WANT_MATH_SPEC_FUNCS__
を定義した場合にのみ、
<cmath>
で利用可能であることが保証されます。
目次 |
パラメータ
| n | - | 多項式の次数、符号なし整数型の値 |
| x | - | 引数、浮動小数点型または整数型の値 |
戻り値
If no errors occur, value of the nonassociated Laguerre polynomial of
x
, that is
| e x |
| n! |
|
d
n
|
|
dx
n
|
e -x ) , is returned.
エラーハンドリング
エラーは math_errhandling で指定される方法で報告される場合があります。
- 引数がNaNの場合、NaNが返され、定義域エラーは報告されません。
- x が負数の場合、定義域エラーが発生する可能性があります。
- n が128以上の場合、その動作は処理系定義となります。
注記
TR 29124をサポートせず、TR 19768をサポートする実装では、この関数はヘッダー
tr1/cmath
および名前空間
std::tr1
で提供されます。
この関数の実装は boost.math でも利用可能です。
ラゲール多項式は、方程式
xy
,,
+ (1 - x)y
,
+ ny = 0
の多項式解です。
最初のいくつかは以下の通りです:
- laguerre(0, x) = 1.
- laguerre(1, x) = -x + 1 .
-
laguerre(2, x) =
[x 21 2
- 4x + 2] . -
laguerre(3, x) =
[-x 31 6
- 9x 2
- 18x + 6] .
例
(gcc 6.0で示された通り動作します)
#define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1 #include <cmath> #include <iostream> double L1(double x) { return -x + 1; } double L2(double x) { return 0.5 * (x * x - 4 * x + 2); } int main() { // spot-checks std::cout << std::laguerre(1, 0.5) << '=' << L1(0.5) << '\n' << std::laguerre(2, 0.5) << '=' << L2(0.5) << '\n'; }
出力:
0.5=0.5 0.125=0.125
関連項目
|
関連ラゲール多項式
(関数) |
外部リンク
Weisstein, Eric W. "Laguerre Polynomial." MathWorld -- Wolfram Web リソースより。