Limits at infinity of rational functions