[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] questionable results for: gsl_sf_ellint_Kcomp
From: |
Gerald I. Evenden |
Subject: |
[Bug-gsl] questionable results for: gsl_sf_ellint_Kcomp |
Date: |
Sat, 24 Jun 2006 18:06:32 -0400 |
User-agent: |
KMail/1.8.2 |
I installed gsl-1.8 on a SUSE 10.0 Linux a few months running on a Dell with
DIM 8400,P4,630(3.0GHZ),HT,2Mb,EM64t. The check run was made after GSL
installation and did not indicate any install problems.
Problem displayed by this program:
#include <gsl_sf_ellint.h>
#include <stdio.h>
int
main(int argc, char **argv) {
double m;
for (m = 0.01; m <=0.14; m+=0.01)
printf("%.2f %.15f %.15f\n", m,
gsl_sf_ellint_Kcomp(m, GSL_PREC_DOUBLE),
gsl_sf_ellint_Kcomp(1. - m, GSL_PREC_DOUBLE));
}
Compiled and linked as follows:
gcc t.c -I/usr/local/include/gsl -lgsl -lgslcblas -lm
and upon execution yields:
0.01 1.570835598912153 3.356600523361192
.01 1.574745561517356 3,695637362989875 <- from reference below
0.02 1.570953441780314 3.020980445571154
0.03 1.571149935003849 2.827995348876904
0.04 1.571425211441382 2.693142964740593
0.05 1.571779457483294 2.590011230874502
0.06 1.572212913442042 2.506864511046333
0.07 1.572725874056861 2.437457556775146
0.08 1.573318689115064 2.378071176782395
0.09 1.573991764192635 2.326311894349721
0.10 1.574745561517356 2.280549138422770
0.11 1.575580600958290 2.239622474811906
0.12 1.576497461146018 2.202676967094436
0.13 1.577496780728658 2.169064782987779
0.14 1.578579259769356 2.138283442098547
These results vary considerably from the table on page 608 of "Handbook of
Mathematical Functions with ..." by Abramowitz, et al.
I was alerted to the problem while attempting to replace poorly constructed
routine with a reference to the GSL library and where comparative benchmarks
indicated a problem that was isolated by failure of the GSL library routines.
--
Jerry and the low-riders: Daisy Mae and Joshua
"Cogito cogito ergo cogito sum"
Ambrose Bierce, The Devil's Dictionary
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gsl] questionable results for: gsl_sf_ellint_Kcomp,
Gerald I. Evenden <=