Faster, more accurate comparison. See http://stackoverflow.com/a/359509/1012919