News for hackers. Stuff that matters.
Re:FizzleFade by krzat on Tuesday August 29, 2017 @08:56AM (#15123929)
Why not `x / 16`?
Re:FizzleFade by sheldor on Tuesday August 29, 2017 @09:10AM (#15123988)
Integer division will give a rounded result instead of floor
Re:FizzleFade by sp332 on Tuesday August 29, 2017 @11:05AM (#15124766)
I think they're going for the ceiling here, not the floor. Truncation of positive values should be the same as a floor function.
Re:FizzleFade by kutkloon7 on Wednesday August 30, 2017 @10:23AM (#15132342)
Yes, I wrote the example. Then realized it was different and corrected only half of it.
Re:FizzleFade by jskkk on Tuesday August 29, 2017 @09:20AM (#15124042)
Not in C..?
Re:FizzleFade by thechao on Tuesday August 29, 2017 @09:21AM (#15124045)

   (x + 15) / 16
Re:FizzleFade by jskkk on Tuesday August 29, 2017 @09:01AM (#15123949)
Yes, which is more readable and would be compiled to the same thing