Error due to downsampling an image
You compute the maximum relative error there. The problem is that errors that go the other way are unaccounted for (these yield a negative value, you are missing an abs to account for those errors).

Other common options include mean square error, mean absolute error, maximum absolute error, SSIM, and a long list of et ceteras.

What the best approach is depends entirely on your definition of quality, and which type of error you think is more important.