pub fn chebyshev_coeffs<F>(
f: F,
n: usize,
a: &ExactNum,
b: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> Option<Vec<ExactNum>>Expand description
Interpolation coefficients of f on [a, b] at the n Chebyshev–Gauss nodes.
c_0 = (1/n) Σ f(x_k), c_j = (2/n) Σ f(x_k) T_j(t_k) for j ≥ 1,
so f(x) ≈ Σ_{j=0}^{n-1} c_j T_j(t(x)) with t the affine map to [-1, 1].
None if n is 0 or greater than CHEBYSHEV_MAX_DEGREE, or if the
interval is not a finite a < b.