add a method to optimize comparisons between rational numbers and decimals