2017-04-12 14:17:07 +03:00
|
|
|
#include "translations.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
//#include <math.h>
|
|
|
|
#include <complex.h>
|
|
|
|
|
|
|
|
typedef struct {
|
2018-02-08 05:01:41 +02:00
|
|
|
qpms_normalisation_t norm;
|
2017-04-12 14:17:07 +03:00
|
|
|
int m, n, mu, nu;
|
|
|
|
sph_t kdlj;
|
|
|
|
qpms_bessel_t J;
|
|
|
|
complex double result_A, result_B;
|
|
|
|
} testcase_single_trans_t;
|
|
|
|
|
|
|
|
testcase_single_trans_t testcases_Taylor[] = {
|
|
|
|
#include "testcases_taylor"
|
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
for(testcase_single_trans_t *tc = testcases_Taylor; tc->J != QPMS_BESSEL_UNDEF; tc++) {
|
2017-04-20 16:25:28 +03:00
|
|
|
//if (tc->n > 40 || tc->nu > 40 ) continue;
|
2017-04-13 11:29:38 +03:00
|
|
|
|
|
|
|
printf("m=%d, n=%d, mu=%d, nu=%d,\n", tc->m,tc->n,tc->mu,tc->nu);
|
|
|
|
complex double A = qpms_trans_single_A_Taylor(tc->m, tc->n, tc->mu, tc->nu, tc->kdlj, true, tc->J);
|
|
|
|
complex double B = qpms_trans_single_B_Taylor(tc->m, tc->n, tc->mu, tc->nu, tc->kdlj, true, tc->J);
|
|
|
|
printf("A = %.16f+%.16fj, relerr=%.16f, J=%d\n",
|
2017-04-20 16:25:28 +03:00
|
|
|
creal(A), cimag(A), (0 == cabs(tc->result_A - A)) ? 0 :
|
2017-04-13 11:29:38 +03:00
|
|
|
cabs(tc->result_A - A)/((cabs(A) < cabs(tc->result_A)) ? cabs(A) : cabs(tc->result_A)),
|
|
|
|
tc->J);
|
|
|
|
printf("B = %.16f+%.16fj, relerr=%.16f, J=%d\n",
|
2017-04-20 16:25:28 +03:00
|
|
|
creal(B), cimag(B), (0 == cabs(tc->result_B - B)) ? 0 :
|
2017-04-13 11:29:38 +03:00
|
|
|
cabs(tc->result_B - B)/((cabs(B) < cabs(tc->result_B)) ? cabs(B) : cabs(tc->result_B)),
|
|
|
|
tc->J);
|
2017-04-12 14:17:07 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|