fpminimax could avoid some "singular matrix" failure
In the following sequence, fpminimax miserably fails with a "singular matrix" error. This comes from the fact that it falls back to Chebyshev points and, because the interval is symmetric and the number of sought points is odd, this contains 0 which is a singular point. This could easily be avoided by using the following fallback in this case: take Chebyshv points but with one more points than necessary.
> I=[-0.6875* 2^(-14) ; 0.6875* 2^(-14)];
> Pfails = fpminimax(exp(x), [|1,2,3|], [|D...|], I, 1, absolute);
Error: fpminimax: singular matrix
Warning: the given expression or command could not be handled.
> n = 4;
> L = [||];
> for k from n to 1 by -1 do {
z = (inf(I)+sup(I))/2 + (sup(I)-inf(I))/2 * cos((2*k-1)*pi/(2*n));
L = L:.z;
};
> Pworks = fpminimax(exp(x), [|1,2,3|], [|D...|], L, 1, absolute);