“…For the n-point Clenshaw-Curtis quadrature rule (6), the coefficients b k of the interpolant P n (x) is evaluated by FFT, and the moments M k , except in two cases (11) and (12), are computed by the forward recursion (9), which is perfectly numerically stable. For these two cases, the moments M k are calculated by the Oliver algorithm in [25]. While for the Gauss-Jacobi quadrature, we cite [x, w] = jacpts(n, α, β) in Chebfun [30], which costs O(n) operations for n-point Gauss-Jacobi quadrature.…”