Hacker News new | ask | show | jobs
by sheldor 3220 days ago
Integer division will give a rounded result instead of floor
3 comments

I think they're going for the ceiling here, not the floor. Truncation of positive values should be the same as a floor function.
Yes, I wrote the example. Then realized it was different and corrected only half of it.
Not in C..?

   (x + 15) / 16