bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] bug report on about the Mathieu function


From: Takeshi Morita
Subject: [Bug-gsl] bug report on about the Mathieu function
Date: Wed, 23 Jan 2013 15:50:26 +0900

Dear Sirs/Madams,

My name is Takeshi Morita, a Japanese physics researcher.

I found a bug in GSL about the Mathieu characteristic function and Mathieu 
function.

I needed to calculate the Mathieu characteristic function;
gsl_sf_mathieu_a(r, q, &result)
gsl_sf_mathieu_b(r, q, &result)
at large q. 

Then I found that
gsl_sf_mathieu_a(r, q, &result) - gsl_sf_mathieu_b(r, q, &result)
and/or
gsl_sf_mathieu_b(r+1, q, &result) - gsl_sf_mathieu_a(r, q, &result)
becomes NEGATIVE, although they have to be always POSITIVE.
(See p.724 (a) in the Handbook of Mathematical Functions by Abramowitz and 
Stegun.)

The attached file is a sample code to see this bug.

For example, when q=2000.0, 
gsl_sf_mathieu_b(70, q, &result) - gsl_sf_mathieu_a(69, q, &result)
becomes -355.55....

I tried several q and r, and this error happenes when q is roughly larger than
1024 and r is around 70.


Related to this issue, gsl_sf_mathieu_ce and  gsl_sf_mathieu_se
do not work properly.



I compiled the code by using gcc (version 4.5.3) on Cygwin on Win 7.
I asked my friend and he also confirmed the same bug on his following PC 
environment;
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64
gcc version 4.7.2 (Debian 4.7.2-5)
gsl version 1.15

So I think this bug is independent of the PC environment.




I would appreciate it if you could confirm the bug and fix the problem.

Sincerely yours,


Takeshi Morita
-- 
=================================================================
Takeshi Morita

KEK Theory Center

Phone  : +81-29-864-5401 (Lab)
Fax    : +81-29-864-5755  (Lab)
E-mail : address@hidden
=================================================================

Attachment: char_val.c
Description: Text Data


reply via email to

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