nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Math.Core / MathGamma

MathGamma

Full name Microsoft.VisualBasic.Math.Distributions.MathGamma Assembly Microsoft.VisualBasic.Math.Core Members 4

gamma function (Γ) from mathematics

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

NameOverloadsSummary
lngamm 1 Reference: "Lanczos, C.
lngamma 1 Spouge approximation (suitable for large arguments)
Γ 1 gamma function Γ from mathematics
gamma 1 Γ

03 Members

method lngamm #
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
NameTypeDescription
ZDouble

-

method lngamma #
lngamma(Double)

Spouge approximation (suitable for large arguments)

Remarks

Spouge 近似算法实现的log gamma函数,适用于大参数

参考资料: http://lib.stat.cmu.edu/apstat/245

Parameters
NameTypeDescription
zDouble

-

method Γ #
Γ(Double)

gamma function Γ from mathematics

Remarks

Alias for MathGamma.gamma()

Test:

 > var gamma = require('gamma')
 > gamma(5)
 23.999999999999996
 > gamma(1.6)
 0.8935153492876909
Parameters
NameTypeDescription
xDouble

-

method gamma #
gamma(Double)

Γ

Parameters
NameTypeDescription
zDouble

-