Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Positive finite floats compare like ints. If you can have negative values, things get slightly more complicated, since they use sign-magnitude (you basically shift the sign bit to the right and use that as an XOR mask on all the other bits). If you need to care about -0.0 == +0.0 and NaN != NaN, most bets are off. :-)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: