Fix some problems with nans (invalid arguments of Legendre polynomials), still having some problems with gaunt
Former-commit-id: e551b05175ee14cd39e489589262dd82a83923fa
This commit is contained in:
parent
34940fc7e9
commit
5cf2c97e6b
|
@ -85,8 +85,9 @@ complex double qpms_trans_single_A_Taylor(int m, int n, int mu, int nu, sph_t kd
|
||||||
complex double sum = 0;
|
complex double sum = 0;
|
||||||
for(int q = 0; q <= qmax; ++q) {
|
for(int q = 0; q <= qmax; ++q) {
|
||||||
int p = n+nu-2*q;
|
int p = n+nu-2*q;
|
||||||
double a1q_n = a1q[q] / a1q0;
|
|
||||||
int Pp_order = mu-m;
|
int Pp_order = mu-m;
|
||||||
|
if(p < abs(Pp_order)) continue; // FIXME raději nastav lépe meze
|
||||||
|
double a1q_n = a1q[q] / a1q0;
|
||||||
double Pp = leg[gsl_sf_legendre_array_index(p, abs(Pp_order))];
|
double Pp = leg[gsl_sf_legendre_array_index(p, abs(Pp_order))];
|
||||||
if (Pp_order < 0) Pp *= min1pow(mu-m) * exp(lgamma(1+p+Pp_order)-lgamma(1+p-Pp_order));
|
if (Pp_order < 0) Pp *= min1pow(mu-m) * exp(lgamma(1+p+Pp_order)-lgamma(1+p-Pp_order));
|
||||||
complex double zp = bes[p];
|
complex double zp = bes[p];
|
||||||
|
|
Loading…
Reference in New Issue