This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 mark.dickinson
收信人 mark.dickinson, nirinA, rhettinger, steven.daprano, stutzbach, terry.reedy
日期 2009-09-30.18:35:22
SpamBayes Score 0.00046540552
Marked as misclassified
Message-id <1254335737.01.0.378126127915.issue3366@psf.upfronthosting.co.za>
In-reply-to
内容
A first attempt for lgamma, using Lanczos' formula.

In general, this gives very good accuracy.  As the tests show, there's one 
big problem area, namely when gamma(x) is close to +-1, so that lgamma(x) 
is close to 0.  This happens for x ~ 1.0,  x ~ 2.0, and various negative 
values of x (mathematically, lgamma(x) hits zero twice in each interval 
(n-1, n) for n <= -2).  In that case the accuracy is still good in 
absolute terms (around 1e-15 absolute error), but terrible in ulp terms.

I think it's reasonable to allow an absolute error of a few times the 
machine epsilon in lgamma:  for many uses, the lgamma result will be
exponentiated at some point (often after adding or subtracting other 
lgamma results), and at that point this absolute error just becomes a 
small relative error.
历史
日期 用户 动作 参数
2009-09-30 18:35:37mark.dickinson修改recipients: + mark.dickinson, rhettinger, terry.reedy, stutzbach, nirinA, steven.daprano
2009-09-30 18:35:37mark.dickinson修改messageid: <1254335737.01.0.378126127915.issue3366@psf.upfronthosting.co.za>
2009-09-30 18:35:30mark.dickinson链接issue3366 messages
2009-09-30 18:35:29mark.dickinson创建