首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::sph_besself

double sph_bessel ( unsigned n, double x ); double sph_bessel ( unsigned n, float x ); double sph_bessel ( unsigned n, long double x ); float sph_besself( unsigned n, float x ); long double sph_bessell( unsigned n, long double x );

(1)

(since C++17)

double sph_bessel( unsigned n, Integral x );

(2)

(since C++17)

1%29计算第一类球面贝塞尔函数nx...

2%29一组过载或接受任意参数的函数模板积分型将参数转换为double...

参数

n

-

the order of the function

x

-

the argument of the function

返回值

如果没有错误发生,则返回第一类nx,那是j

n%28x%29=%28π/2x%291/2

J

N+1/2%28x%29其中J

n%28x%29是std::cyl_bessel_j(n,x)%29和x≥0。

错误处理

错误可以按数学[医]错误处理...

  • 如果参数为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%28TR1%29的实现,在标头中提供此功能。tr1/cmath和命名空间std::tr1...

此功能的实现也是可以在中学里找到。...

二次

代码语言:javascript
复制
#include <cmath>
#include <iostream>
int main()
{
    // spot check for n == 1
    double x = 1.2345;
    std::cout << "j_1(" << x << ") = " << std::sph_bessel(1, x) << '\n';
 
    // exact solution for j_1
    std::cout << "(sin x)/x^2 - (cos x)/x = " << std::sin(x)/(x*x) - std::cos(x)/x << '\n';
}

二次

产出:

二次

代码语言:javascript
复制
j_1(1.2345) = 0.352106
(sin x)/x^2 - (cos x)/x = 0.352106

二次

外部链接

第一类球面贝塞尔函数。来自MathWorld的一个Wolfram Web资源。

另见

cyl_bessel_jcyl_bessel_jfcyl_bessel_jl (C++17)(C++17)(C++17)

cylindrical Bessel functions (of the first kind) (function)

sph_neumannsph_neumannfsph_neumannl (C++17)(C++17)(C++17)

spherical Neumann functions (function)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券