Movatterモバイル変換


[0]ホーム

URL:


homepage

Message92844

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authormark.dickinson
Recipientsmark.dickinson, nirinA, rhettinger, stutzbach, terry.reedy
Date2009-09-18.20:43:48
SpamBayes Score3.9516435e-10
Marked as misclassifiedNo
Message-id<1253306634.98.0.629889201139.issue3366@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a more careful patch for just the gamma function.  It's a fairly direct implementation of Lanczos' formula, with the choice of parameters (N=13, g=6.024680040776729583740234375) taken from the Boost library.  In testing of random values and known difficult values, it's consistently giving errors of < 5ulps across its domain.  This is considerably better than the error from the exp(lgamma(x)) method, since the exp call alone can easily introduce errors of hundreds of ulps for larger values of x.I'd appreciate any feedback, especially if anyone has the chance to test on Windows:  I'd like to know whether I got the build modifications right.This patch *doesn't* use the system gamma function, even when available.  At least on OS X 10.5.8, the supplied gamma function has pretty terrible accuracy, and some severe numerical problems near negative integers.  I don't imagine Linux is much better.Once this is working, I'll concentrate on lgamma.  Then erf and erfc.
History
DateUserActionArgs
2009-09-18 20:43:55mark.dickinsonsetrecipients: +mark.dickinson,rhettinger,terry.reedy,stutzbach,nirinA
2009-09-18 20:43:54mark.dickinsonsetmessageid: <1253306634.98.0.629889201139.issue3366@psf.upfronthosting.co.za>
2009-09-18 20:43:53mark.dickinsonlinkissue3366 messages
2009-09-18 20:43:53mark.dickinsoncreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp