// display = hexadecimal;
n = 6; /* polynomial degree */
pretty = proc(u) {
return ~(floor(u*1000)/1000);
};
d = [-1/2^16,1/2^16];
f = 2^x;
w = 1;
p = remez(f, n, d, w);
pf = fpminimax(2^x, n, [|1,129,129,129,64...|], d, absolute, floating, 0, p);
err_p = -log2(dirtyinfnorm(pf*w-f, d));
print (pf, pretty(err_p));