A New Magnitude Function for Fast Numbers Comparison in the Residue Number System