A Note on a Method of Computing the Gamma Function

Author:

Gordon N. L.1,Flasterstein A. H.1

Affiliation:

1. RCA Laboratories, Princeton, New Jersey

Abstract

Numerous formulas are available for the computation of the Gamma function [1, 2]. The purpose of this note is to indicate the value of a well-known method that is easily extended for higher accuracy requirements. Using the recursion formula for the Gamma function, Γ( x + 1) = x Γ( x ), (1) and Stirling's asymptotic expansion for ln Γ( x ) [3], we have ln Γ( x ) ∼ ( x - 1/2) ln x - x + 1/2 ln 2π + ∑ N r =1 C r / x 2 r -1 . (2) It follows that, if k and N are appropriately selected positive integers, Γ( x + 1) can be represented by Γ( x + 1) ∼ √2π exp ( x + k - 1/2) ln ( x + k ) - ( x + k ) exp ∑ N r =1 C r /( x + k ) 2 r -1 /( x + 1)( x + 2) … ( x + k - 1) (3) where C r = (- 1) r -1 B r /(2 r - 1)(2 r ), B r being the Bernoulli numbers [4]. These coefficients have been published by Uhler [5]. Requiring the range 0 ≦ x ≦ 1 is no restriction since, if necessary, Γ( x + 1) can be generated for other arguments using (1). For a given N , the error in (2) can be estimated from |ε| < | C N +1 |/ x 2 N +1 . (4) The curves of Figure 1 show contours of constant error bound as a function of N and x . These curves represent single and double-precision floating-arithmetic requirements of ε < 5·10 -9 and ε < 5·10 -17 . For a given N , k is defined as the minimum integral x greater than or equal to those on the curves. Then N and k can be chosen to minimize round-off and computing time. For N and k equal to 4, formula (3) yields Γ( x + 1) ∼ √2π exp ( x + 4 - 1/2) ln ( x + 4) - ( x + 4) exp ∑ 4 r =1 C r /( x + 4) 2 r -1 /( x + 1)( x + 2)( x + 3). (5) A similar expression suitable for double precision results for N = 8 and k = 9. The exponents in (5) are split to reduce roundoff. Various algebraic manipulations might result in a further reduction of roundoff.

Publisher

Association for Computing Machinery (ACM)

Subject

Artificial Intelligence,Hardware and Architecture,Information Systems,Control and Systems Engineering,Software

Reference5 articles.

1. com.atypon.pdfplus.internal.model.plusxml.impl.AuthorGroup@461e7b1e Approxtmattons for Digital Computers p 158. Princeton Umverslty Press Princeton N J. CECIL HASTINGS JR Approxtmattons for Digital Computers p 158. Princeton Umverslty Press Princeton N J.

2. com.atypon.pdfplus.internal.model.plusxml.impl.AuthorGroup@48d99dad Trigonometric interpolation of empirical and analytic functions J Math Phys 17 (1938) 123-199 C. LANCZOS Trigonometric interpolation of empirical and analytic functions J Math Phys 17 (1938) 123-199

3. Gamma functions to high accuracy;Math Tables Azds Compz~t,1959

4. com.atypon.pdfplus.internal.model.plusxml.impl.AuthorGroup@9e49796 A Course. of Modern Analysis p 125 Cambridge University Press Cambridge Englund. F T WHITTAKER AND G N. WATSON A Course. of Modern Analysis p 125 Cambridge University Press Cambridge Englund.

5. The coefficients of Stirling's serms for log F(x);Proc Nat. Acad Scz.,1942

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3