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

So do floats if you don't care about NaN


They do not; if you sort as unsigned ints then negative floats sort above positive ones, and if you sort as signed ints then the negative range is reversed. IEEE floats are sign-magnitude, not twos-complement.




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

Search: