Issue comparing real numbers sorted