Fixed possible float comparison bug

More information can be found here:
http://scie.nti.st/2013/3/1/having-a-javascript-moment-with-ruby-wtf-is-going-on-here/