pretty = proc(u) {
return ~(floor(u*1000)/1000);
};
d=[-1/2^6,1/2^6];
n=8;
f = 2^x;
w = 1;
p = remez(f, n, d, w);
pf = fpminimax(2^x, n, [|1,107,107,107,53...|], d, absolute, floating, 0, p);
err_p = -log2(dirtyinfnorm(pf*w-f, d));
display = hexadecimal;
print (pf);
display = decimal;
print (pretty(err_p));
d_small=[-1/2^18,1/2^18];
err_p_small = -log2(dirtyinfnorm(pf*w-f, d_small));
print (pretty(err_p_small));