RNS Number Comparator Based on a Modified Diagonal Function