News for hackers. Stuff that matters.
Re:Why you should be careful about 'optimizations' by mattst88 on Sunday April 29, 2012 @03:06PM (#3906704)
> So 5.4 | 0 will gives 5, which is a flooring operation. However, -5.4 will give -5. And that’s a ceiling operation.

So, | is actually doing a round toward zero. It seems like the problem described is actually caused by simply misunderstanding what the floor function does (round toward negative infinity).

Re:Why you should be careful about 'optimizations' by Palomides on Sunday April 29, 2012 @02:58PM (#3906668)
I sympathise, but doing bitwise operations on floating point values without care is just asking for it