Wouldnt this do what you are after?
result = minv(x,y) / maxv(x,y); as a 0.0->1.0 result
or
result = minv(x,y) / maxv(x,y) * 100; as a 0->100 (%) result


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial