Example 1:
> p = remez(exp(x), 5, [-1;1]);
> midpointmode=on!;
> supnorm(p, exp(x), [-1;1], absolute, 2^(-40));
0.45205513967~0/2~e-4
Example 2:
> prec=200!;
> midpointmode=on!;
> d = [1;2];
> f = exp(cos(x)^2 + 1);
> p = remez(1,15,d,1/f,1e-40);
> theta=1b-60;
> prec=default!;
> mode=relative;
> supnorm(p,f,d,mode,theta);
0.30893006200251428~5/6~e-13
Example 3:
> midpointmode=on!;
> mode=relative;
> theta=1b-135;
> d = [-1b-2;1b-2];
> f = expm1(x);
> p = x * (1 + x * ( 2097145 * 2^(-22) + x * ( 349527 * 2^(-21) + x * (87609 * 2^(-21) + x * 4369 * 2^(-19)))));
> theta=1b-40;
> supnorm(p,f,d,mode,theta);
0.98349131972~2/3~e-7