gamma function (Γ) from mathematics
MathGamma
00 Remarks
| 特性 | lngamm函数 | lngamma函数 |
|---|---|---|
| 实现的方法 | Lanczos 近似 | Spouge 近似 |
| 核心注释 | 引用 Lanczos 1964 年的论文,翻译自 Alan Miller 的 FORTRAN 代码。 | 注释标明适用于大参数(large arguments)。 |
| 系数数组 | 使用数组 p | 使用数组 p_ln |
| 函数定义 | 标准函数 | 扩展方法(带有 Extension 属性) |
| 主要适用场景 | 通用的高精度计算 | 特别适合处理较大的参数值 |
01 Syntax
Microsoft.VisualBasic.Math.Distributions.MathGamma
02 Methods
03 Members
lngamm(
Double)Reference: "Lanczos, C. 'A precision approximation of the gamma function', J. SIAM Numer. Anal., B, 1, 86-96, 1964." Translation of Alan Miller's FORTRAN-implementation See http://lib.stat.cmu.edu/apstat/245
Remarks
Lanczos 近似算法实现的log gamma函数,是一个通用的高精度计算方法
参考资料:
- Lanczos, C. "A precision approximation of the gamma function", J. SIAM Numer. Anal., B, 1, 86-96, 1964.
- Alan Miller的FORTRAN实现翻译
- http://lib.stat.cmu.edu/apstat/245
Parameters
| Name | Type | Description |
|---|---|---|
Z | Double | - |
lngamma(
Double)Spouge approximation (suitable for large arguments)
Remarks
Spouge 近似算法实现的log gamma函数,适用于大参数
Parameters
| Name | Type | Description |
|---|---|---|
z | Double | - |
Γ(
Double)gamma function Γ from mathematics
Remarks
Alias for MathGamma.gamma()
Test:
> var gamma = require('gamma')
> gamma(5)
23.999999999999996
> gamma(1.6)
0.8935153492876909Parameters
| Name | Type | Description |
|---|---|---|
x | Double | - |
gamma(
Double)Γ
Parameters
| Name | Type | Description |
|---|---|---|
z | Double | - |