Ceil Function

for floor, it’s just truncation, which is the default behavior when converting double to int.

However, what about ceil?

You can do this

ceil(x/k) = (x+k-1)/k;