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

std::hermite

double hermite( unsigned int n, double x ); double hermite( unsigned int n, float x ); double hermite( unsigned int n, long double x ); float hermitef( unsigned int n, float x ); long double hermitel( unsigned int n, long double x );

(1)

(since C++17)

double hermite( unsigned int n, Integral x );

(2)

(since C++17)

1%29计算%28物理学家%27s%29Hermite多项式程度n和争论x

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

参数

n

-

the degree of the polynomial

x

-

the argument, a value of a floating-point or integral type

返回值

如果没有出现错误,则命令的值-nHermite多项式x,即%28-1%29 N

_e_x2

DN

*。

dxn

e-x2

,被归还。

错误处理

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

  • 如果参数为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...

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

Hermite多项式是方程u的多项式解,

-2 XU,

=-2 NU。

前几个例子是:

  • Hermite%280,x%29=1
  • Hermite%281,x%29=2x
  • Hermite%282,x%29=4x2

-2

  • Hermite%283,x%29=8x3 -12x
  • Hermite%284,x%29=16x4

-48x2

+12

二次

代码语言:javascript
复制
#include <cmath>
#include <iostream>
double H3(double x) { return 8*std::pow(x,3) - 12*x; }
double H4(double x) { return 16*std::pow(x,4)-48*x*x+12; }
int main()
{
    // spot-checks
    std::cout << std::hermite(3, 10) << '=' << H3(10) << '\n'
              << std::hermite(4, 10) << '=' << H4(10) << '\n';
}

二次

产出:

二次

代码语言:javascript
复制
7880=7880
155212=155212

二次

另见

laguerrelaguerreflaguerrel (C++17)(C++17)(C++17)

Laguerre polynomials (function)

legendrelegendreflegendrel (C++17)(C++17)(C++17)

Legendre polynomials (function)

外部链接

“Hermite多项式”来自MathWorld的一个Wolfram Web资源。

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com