AW: [Gretl-devel] bessel K function

Klein, Christoph christoph.klein at
Fri Jun 19 04:05:06 EDT 2009

thank you *so* much!!! this function is much more accurate than my version. 
Additionaly, I propose to dump my bessel_I function, too. With the attached patch bessel_I for negative orders is calculated using the new besselK function. bessel_I for negative orders can't be calculated with the cephes function, because cephes assumes symmetry around 0 for the order (see code), which is false.

Von: gretl-devel-bounces at [gretl-devel-bounces at] im Auftrag von Allin Cottrell [cottrell at]
Gesendet: Donnerstag, 18. Juni 2009 21:49
An: Gretl development
Betreff: [Gretl-devel] bessel K function

On Wed, 17 Jun 2009, Allin Cottrell wrote:

> On an initial scan it seems that most things are fine but the
> Bessel 'K' function goes a bit strange for large values of X (as
> you say, values < 20 are OK).

Now fixed, courtesy of the netlib/R code.

Gretl-devel mailing list
Gretl-devel at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: besseli.patch
Type: text/x-patch
Size: 1372 bytes
Desc: besseli.patch
Url :

More information about the Gretl-devel mailing list