Y
Hacker News
new
|
ask
|
show
|
jobs
by
sheldor
3220 days ago
Integer division will give a rounded result instead of floor
3 comments
sp332
3220 days ago
I think they're going for the ceiling here, not the floor. Truncation of positive values should be the same as a floor function.
link
kutkloon7
3219 days ago
Yes, I wrote the example. Then realized it was different and corrected only half of it.
link
jskkk
3220 days ago
Not in C..?
link
thechao
3220 days ago
(x + 15) / 16
link