47 int attribute_hidden chebyshev_init(Float *dos,
int nos, Float eta)
57 for (ii=1; ii<=nos; ii++) {
68 Float attribute_hidden chebyshev_eval(Float x,
const double *a,
const int n)
70 Float b0, b1, b2, twox;
73 if (n < 1 || n > 1000) ML_ERR_return_NAN;
75 if (x < -1.1 || x > 1.1) ML_ERR_return_NAN;
80 for (i = 1; i <= n; i++) {
83 b0 = twox * b1 - b2 + a[n - i];
85 return (b0 - b2) * 0.5;