[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] incorrect error from gsl_cheb_eval_n_err
From: |
John Salmon |
Subject: |
[Bug-gsl] incorrect error from gsl_cheb_eval_n_err |
Date: |
Wed, 22 Dec 2004 07:26:29 -0500 |
The calculation error in gsl_cheb_eval_n_err
uses the order stored in the cs struct, rather than the
order used in the current evaluation.
I believe this patch fixes the problem.
Cheers,
John Salmon
address@hidden cheb]$ diff -Naur eval.c~ eval.c
--- eval.c~ 2003-07-25 11:18:10.000000000 -0400
+++ eval.c 2004-12-22 07:23:51.208786196 -0500
@@ -132,14 +132,14 @@
/* Estimate cumulative numerical error */
- for (i = 0; i <= cs->order; i++)
+ for (i = 0; i <= eval_order; i++)
{
absc += fabs(cs->c[i]);
}
/* Combine truncation error and numerical error */
- *abserr = fabs (cs->c[cs->order]) + absc * GSL_DBL_EPSILON;
+ *abserr = fabs (cs->c[eval_order]) + absc * GSL_DBL_EPSILON;
return GSL_SUCCESS;
}
- [Bug-gsl] incorrect error from gsl_cheb_eval_n_err,
John Salmon <=