Re:Figuring out round, floor and ceil with integer division
by garaetjjte on Saturday November 26, 2022 @06:14AM
(#33751737)
In case divisor is always positive, you can use these variants:
They should be faster as it avoids branching: https://godbolt.org/z/qrraj8s6j
[ Parent
| on HN ]
There are no comments on this comment yet.