std:: ellint_3, std:: ellint_3f, std:: ellint_3l
|
定义于头文件
<cmath>
|
||
| (1) | ||
|
float
ellint_3
(
float
k,
float
nu,
float
phi
)
;
double
ellint_3
(
double
k,
double
nu,
double
phi
)
;
|
(C++17 起)
(C++23 前) |
|
|
/* floating-point-type */
ellint_3
(
/* floating-point-type */
k,
/* floating-point-type */
nu,
|
(C++23 起) | |
|
float
ellint_3f
(
float
k,
float
nu,
float
phi
)
;
|
(2) | (C++17 起) |
|
long
double
ellint_3l
(
long
double
k,
long
double
nu,
long
double
phi
)
;
|
(3) | (C++17 起) |
|
定义于头文件
<cmath>
|
||
|
template
<
class
Arithmetic1,
class
Arithmetic2,
class
Arithmetic3
>
/* common-floating-point-type */
|
(A) | (C++17 起) |
std::ellint_3
的重载,作为参数
k
、
nu
和
phi
的类型。
(C++23 起)
目录 |
参数
| k | - | 椭圆模数或离心率(浮点数或整数值) |
| nu | - | 椭圆特征值(浮点数或整数值) |
| phi | - | 雅可比振幅(浮点数或整数值,以弧度为单位) |
返回值
If no errors occur, value of the incomplete elliptic integral of the third kind of k , nu , and phi , that is ∫ φ0
| dθ |
|
(1-νsin
2
θ) √ 1-k 2 sin 2 θ |
错误处理
错误报告方式遵循 math_errhandling 规范:
- 如果参数为 NaN,则返回 NaN 且不报告定义域错误。
- 如果 |k|>1 ,可能出现定义域错误。
注释
不支持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 中找到。
额外的重载不需要完全按照 (A) 的形式提供。只需确保对于它们的第一个参数 num1 、第二个参数 num2 和第三个参数 num3 满足以下条件:
|
(C++23 前) |
|
如果
num1
、
num2
和
num3
具有算术类型,则
std
::
ellint_3
(
num1, num2, num3
)
的效果等同于
std
::
ellint_3
(
static_cast
<
/* common-floating-point-type */
>
(
num1
)
,
如果不存在具有最高等级和子等级的此类浮点类型,则 重载决议 不会从提供的重载中得到可用的候选函数。 |
(C++23 起) |
示例
#include <cmath> #include <iostream> #include <numbers> int main() { const double hpi = std::numbers::pi / 2; std::cout << "Π(0,0,π/2) = " << std::ellint_3(0, 0, hpi) << '\n' << "π/2 = " << hpi << '\n'; }
输出:
Π(0,0,π/2) = 1.5708 π/2 = 1.5708
|
本节内容不完整
原因:此函数及其他椭圆积分需要更完善的示例说明,例如计算椭圆弧长? |
参见
|
(C++17)
(C++17)
(C++17)
|
(完全)第三类椭圆积分
(函数) |
外部链接
| 魏斯坦, 埃里克·W. 《第三类椭圆积分》. 摘自 MathWorld —— 一个 Wolfram 网络资源。 |