LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in the Kummer Function

It is still returning results that differ significantly from the two references I was quoting above (which seem to agree with one another):

 

LV 2015 64 bit:

 

M(-7,19,-0.5) = -0.5676822432

M(-8,19,-0.5) = -0.3050471079

 

I guess the calculation is performed internally in double precision?

0 Kudos
Message 11 of 16
(3,422 Views)

NI, I think you need to understand that the precision of your new calculation is insufficient and that the current situation is even worse than a bug.

Yo put things in a dramatic light, it is an insidious feature that could well crash the next NASA probe sent to Mars or kill the next robotic surgery patient)

 

LV 2015 64 bit followed by Maxima results

 

M(-7,19,-0.5) = -0.5676822432

                      = -0.56763766813983

M(-8,19,-0.5) = -0.3050471079

                      = -0.30506520459665

 

For these two values, we are not even talking of precision of FIVE DECIMAL PLACES!!!

PLEASE hire competent applied mathematicians to check the numerical accuracy of your functions.

In that particular case, the fix is probably to perform the computation internally in extended precision.

But there should be some kind of numerical benchmark of all special functions  AND some statement about the guaranteed accuracy.

 

 

0 Kudos
Message 12 of 16
(3,370 Views)

Hi X,

 

Thank you for your thorough documentation on this issue, a Corrective Action Request (#550376) has been filed.  

 

Sincerely,

Nick

Nick G.
Applications Engineering
National Instruments
Message 13 of 16
(3,280 Views)

Hi X,

 

Thanks for reporting the issue to us.  A common method of computing Kummer function is Taylor series, which is also used by NI Kummer Function VI.  However, there are several cases that Kaylor method can not give an accurate results for Kummer function.

Unfortunately, your case is one of them: 

 

a and x have opposite signs.

 

In this case, a better mothod is based on Buchholz Polynomials.  I have attached a VI using Buchholz polynomial to calculate Kummer function.

With this VI:

M(-7, 19, -0.5) = -0.567637668139835

M(-8, 19, -0.5) = -0.305065204596648

 

The results are much better than the build-in Kummer function VI.

 

Note there is no single solution of Kummer function which could solve all the combinations of (x, a, b).  Buchholz Polynomial method can only solve one of the issues.  We will continue to improve the precision of Kummer  functions.

 

Best Regards,

Michael

 

Kummer.png

 

0 Kudos
Message 14 of 16
(3,205 Views)

Thanks for the answer. I'll definitely check this in the future.

0 Kudos
Message 15 of 16
(3,161 Views)

Fixed in LV 2016 (tested in the 64 bit version).

0 Kudos
Message 16 of 16
(3,052 Views)