[tex-k] dvips bounding box

Al Ma alma0 at ro.ru
Mon Mar 11 18:32:33 CET 2024


Somehow I don't see my own answer in “Sent”, so here it is once again:
For `/` being the integer division in C and for the nonnegative integers, I agree. Also ceil(i * a / b) = i / b * a + (i % b * a - 1) / b + 1 (if b is zero, both sides are undefined anyway).
11.03.2024, 05:35, Tomas Rokicki < mailto:rokicki at gmail.com rokicki at gmail.com >
I did notice that code, but I think I prefer the less opaque version:
ceil(i * a / b) = i / b * a + (i % b * a + b - 1) / b
which is also overflow-free given our current values of a and b.
Do you disagree?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20240311/82a1853b/attachment.htm>


More information about the tex-k mailing list.