Fix incomplete gamma error negative sign

Former-commit-id: 427aed40f46b9384a310e801b5d26ca13c73eba9
This commit is contained in:
Marek Nečada 2018-09-06 12:09:25 +03:00
parent 1cd4733e85
commit dc80d64e5b
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ int cx_gamma_inc_series_e(double a, complex z, qpms_csf_result * result) {
errc *= sumprefac_abs; errc *= sumprefac_abs;
ckahanadd(&sum, &sumc, 1.); ckahanadd(&sum, &sumc, 1.);
kahanadd(&err, &errc, DBL_EPSILON); kahanadd(&err, &errc, DBL_EPSILON);
result->err = cabs(sum) * fullgamma.err + err * fullgamma.val; result->err = cabs(sum) * fullgamma.err + err * fabs(fullgamma.val);
result->val = sum * fullgamma.val; // + sumc*fullgamma.val??? result->val = sum * fullgamma.val; // + sumc*fullgamma.val???
if (breakswitch) if (breakswitch)
return GSL_SUCCESS; return GSL_SUCCESS;