Fix native int/float comparison by casting to rational