Hi,
The problem may be the calculations you have performed on the data. The data you used for calculations is with four significant digits, however, the results will not also be with four significant digits. If you want to have 4 significant digits for the results, you can use the prec function to make the results with four significant digits. In your case, maybe you can do like this:
xmax[i] = prec(xmax[i]);
ymax[i] = prec(ymax[i]);
Penn