Hi Regina, On Tuesday, 2008-03-11 17:01:02 +0100, Regina Henschel wrote:
> Yes, I mean the pure values. Problem is, that although Paul Godfrey shows a > way to calculate such coefficients, you need to calculate a lot of tables > with high precision to get _good_ coefficients. > http://home.att.net/~numericana/answer/info/godfrey.htm If coefficients can be calculated by a program that sounds like a viable solution. Maybe Mathematica or Matlab have a routine ready to use for that? >> I have no idea whether >> coefficient values could be copyrighted or fall under the same license >> the source code is licensed, and of course IANAL, so I can't give any >> legal advice. > > Do you know someone to ask? Not really.. lawyers tend to take an awful lot of money or not give a definite answer or not answer in time. Or all three. If it turns out that generating the coefficients is too cumbersome I might approach Sun Legal department, but then again, if I had to undergo that procedure I rather would prefer to get the whole Cephes library approved instead of just 10 or so coefficient values. >> Btw, do you happen to know the Cephes library? > > No, I didn't. > > It also has gamma (didn't test, could you take a look at it?) among other > nice algorithms, and is >> said to be numerically accurate, several other software products use it >> as well. See http://www.moshier.net/#Cephes > > I have downloaded it and have a quick glance on it. It divides the problem > in two cases, one is approximated with a polynom, the other with Stirlings > formula. I will need some time to understand in detail, how it works, > before I will be able to adapt it to OOo. The algorithm is more complex > than the solution with the Lanczos approximation. > > Can you point me to an ready implementation to test it, before I start to > become acquainted with it? Cephes itself has a program qcalc if you build it, even a DOS exceutable as I've read. Gretl uses Cephes, see http://gretl.sourceforge.net/ That is even tested against the NIST dataset (there's a link somewhere on that site). This btw gives much confidence in the implementation, I'd like Calc to pass the relevant tests as well. ROOT shifted implementation of gamma and lgamma to Cephes, http://root.cern.ch/root/Version517.news.html There's also a Perl interface to Cephes, http://search.cpan.org/~rkobes/Math-Cephes-0.45/lib/Math/Cephes.pod Taking all together is the reason why I want to use Cephes, if I can get it through Legal ... > BTW: I have come across the gamma function when looking at issue 86294. > Unfortunately a precise gamma function doesn't solve it. Is 86294 another > candidate for issue 18704? Yes, just added that. Thanks Eike -- OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer. SunSign 0x87F8D412 : 2F58 5236 DB02 F335 8304 7D6C 65C9 F9B5 87F8 D412 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't send personal mail to the [EMAIL PROTECTED] account, which I use for mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] Thanks.
pgpFtEKf11b1U.pgp
Description: PGP signature
