名前空間
変種
操作

std::sph_neumann, std::sph_neumannf, std::sph_neumannl

提供: cppreference.com
 
 
 
 
ヘッダ <cmath> で定義
double      sph_neumann ( unsigned n, double x );

float       sph_neumann ( unsigned n, float x );
long double sph_neumann ( unsigned n, long double x );
float       sph_neumannf( unsigned n, float x  );

long double sph_neumannl( unsigned n, long double x );
(1) (C++17以上)
double       sph_neumann( unsigned n, 整数型 x );
(2) (C++17以上)
1) n および x第二種球ベッセル関数 (別名、球ノイマン関数) を計算します。
2) 任意の整数型の引数を取るオーバーロード集合または関数テンプレート。 引数を double にキャストした後は (1) と同等です。

目次

[編集] 引数

n - 関数の次数
x - 関数の引数

[編集] 戻り値

エラーが発生しなければ、 n および x の第二種球ベッセル関数 (球ノイマン関数)、すなわち n
n
(x) = (π/2x)1/2
N
n+1/2
(x)
の値を返します。 ただし N
n
(x)
std::cyl_neumann(n,x) であり、 x≥0 です。

[編集] エラー処理

エラーは math_errhandling で規定されている通りに報告されます。

  • 引数が NaN の場合は、 NaN が返されます。 定義域エラーは報告されません。
  • n>=128 の場合、動作は処理系定義です。

[編集] ノート

C++17 をサポートしないけれども ISO 29124:2010 をサポートする処理系は、 __STDCPP_MATH_SPEC_FUNCS__ が処理系によって少なくとも 201003L の値に定義されており、ユーザがいかなる標準ライブラリのヘッダもインクルードする前に __STDCPP_WANT_MATH_SPEC_FUNCS__ を定義する場合、この関数を提供します。

ISO 29124:2010 をサポートしなけれども TR 19768:2007 (TR1) をサポートする処理系は、ヘッダ <tr1/cmath> および名前空間 std::tr1 で、この関数を提供します。

この関数の実装は boost.math でも利用可能です。

[編集]

#include <cmath>
#include <iostream>
int main()
{
    // spot check for n == 1
    double x = 1.2345;
    std::cout << "n_1(" << x << ") = " << std::sph_neumann(1, x) << '\n';
 
    // exact solution for n_1
    std::cout << "-(cos x)/x^2 - (sin x)/x = "
              << -std::cos(x)/(x*x) - std::sin(x)/x << '\n';
}

出力:

n_1(1.2345) = -0.981201
-(cos x)/x^2 - (sin x)/x = -0.981201

[編集] 外部リンク

Weisstein, Eric W. "Spherical Bessel Function of the Second Kind." From MathWorld--A Wolfram Web Resource.

[編集] 関連項目

円筒ノイマン関数
(関数) [edit]
(第一種) 球ベッセル関数
(関数) [edit]