From 2f6ab47d2eb3527fbf4d824fdebca66760357038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 20 Aug 2018 16:59:39 +0300 Subject: [PATCH] Mathematica check the incomplete gamma function results. Former-commit-id: 0eaac1b86051acdffd08f2861f4470a9030d2eed --- tests/gsl-intgamma/incgamma.mathematica | 12 ++++++++++++ tests/gsl-intgamma/quadratures.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 tests/gsl-intgamma/incgamma.mathematica diff --git a/tests/gsl-intgamma/incgamma.mathematica b/tests/gsl-intgamma/incgamma.mathematica new file mode 100644 index 0000000..72bf55d --- /dev/null +++ b/tests/gsl-intgamma/incgamma.mathematica @@ -0,0 +1,12 @@ +l:= ReadList["incgamma.in", Table[Number, {2}]]; +For[i = 1, i <= Length[l], i++, + p := l[[i]]; + j := p[[1]]; + x := p[[2]]; + res := NIntegrate[SigmaIntegrand[n, k, r, x], {x,eta,Infinity}]; + Print[j, " ", CForm[x], " | ", CForm[N[Gamma[1/2-j,x],16]], + " | ", CForm[N[Gamma[1/2-j,x*I],16]], + " | ", CForm[N[Gamma[1/2-j,-x],16]], + " | ", CForm[N[Gamma[1/2-j,-x*I],16]]] +]; + diff --git a/tests/gsl-intgamma/quadratures.c b/tests/gsl-intgamma/quadratures.c index 07b0abe..7d5bb29 100644 --- a/tests/gsl-intgamma/quadratures.c +++ b/tests/gsl-intgamma/quadratures.c @@ -7,10 +7,10 @@ #define EPSABS 0 #endif #ifndef EPSREL -#define EPSREL 1e-8 +#define EPSREL 1e-13 #endif #ifndef LIMIT -#define LIMIT 8192 //??? +#define LIMIT 30000 //??? #endif #ifndef R0 #define R0 8e-6