[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Bug in implementing Kummer's U?

From: George Japaridze
Subject: [Help-gsl] Bug in implementing Kummer's U?
Date: Sun, 5 Feb 2006 19:50:18 -0500


There is strange problem with the Kummer's confluent hypergeometric function U.

The relation I am using between U and confluent hypergeometric 1F1 is from Abramowitz, Stegun, relation 13.1.3, in there I choose b=0.5 (as I understand, U is implemented a'la Abramowitz, Stegun)

U(a, 0.5 ,z) = sqrt(pi) ( 1F1(a, 0.5, z)/gamma(a+0.5) - 2*sqrt(z)*1F1 (a+0.5, 1.5, z)/gamma(a) ) (1)

Now, when I calculate in GSL function U (left hand side of (1)), or the right hand side of (1), I get the following result (in this example a = 0.2):

1) Left and right hand sides approximately yield the same values for z less 30, e.g. for z=10 - LHS=RHS=0.622885 (my old version with Mathematica with only 1F1 implemented confirms that for the RHS value).

z=20 - RHS = LHS = 0.545614

2) left and right hand sides DRASTICALLY differ for large z, e.g.
z=40 - LHS = 0.476, RHS = -482
z=60 - LHS = 0.44, RHS = 6.1 10^(10)

and the difference grows with z increasing.

The macros for a LHS and RHS are attached.

Any ideas? how the special functions for a large values of arguments are tabulated in GSL? Can it be bug in implementing U? It's kinda pressing issue for me, so I would appreciate any help or bug shook out from my macros..


George Japaridze

Attachment: Kummer_LHS.c
Description: Binary data

Attachment: Kummer_RHS.c
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]