Function

NumCosmoMathSpectralchebyshev_eval

Declaration [src]

gdouble
ncm_spectral_chebyshev_eval (
  GArray* a,
  gdouble t
)

Description [src]

Evaluates a Chebyshev expansion $f(t) = \sum_{k=0}^{N-1} a_k T_k(t)$ at t using Clenshaw recurrence with Reinsch modification near endpoints. The variable t should be in the interval [-1, 1]. To evaluate at a point x in [a, b], use ncm_spectral_chebyshev_eval_x() or first convert x to t using ncm_spectral_x_to_t().

Parameters

a

Type: An array of double

Chebyshev coefficients array.

The data is owned by the caller of the function.
t

Type: gdouble

Point to evaluate in [-1, 1].

Return value

Type: gdouble

The value of the Chebyshev expansion at t.