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

std::laguerref

double laguerre( unsigned int n, double x ); double laguerre( unsigned int n, float x ); double laguerre( unsigned int n, long double x ); float laguerref( unsigned int n, float x ); long double laguerrel( unsigned int n, long double x );

(1)

(since C++17)

double laguerre( unsigned int n, Integral x );

(2)

(since C++17)

1%29计算非关联的Laguerre多项式程度n和争论x

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

参数

n

-

the degree of the polymonial, a value of unsigned integer type

x

-

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

返回值

如果没有错误发生,则非相关的Laguerre多项式的值x,那就是

*。

n%21

DN

*。

dxn

%28 xn

e-x%29,返回。

错误处理

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

  • 如果参数为nan,则返回nan,并且不报告域错误。
  • 如果x为负值,则可能发生域错误。
  • 如果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...

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

Laguerre多项式是方程XY的多项式解,

+%281-x%29 y,

+NY=0。

前几个例子是:

  • 拉盖尔%280,x%29=1
  • Laguerre%281,x%29=-x+1
  • 拉盖尔%282,x%29=1 2。[X2

-4x+2]

  • 拉盖尔%283,x%29=1 6。[-x3

-9x2

-18x+6]

二次

代码语言:javascript
复制
#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';
}

二次

产出:

二次

代码语言:javascript
复制
0.5=0.5
0.125=0.125

二次

另见

assoc_laguerreassoc_laguerrefassoc_laguerrel (C++17)(C++17)(C++17)

associated Laguerre polynomials (function)

外部链接

Weisstein,Eric W.“Laguerre多项式”来自MathWorld的一个Wolfram Web资源。

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com