Author: Stan Eisenstat
Subject: Re: [Cs223] ceil
Date: Wednesday, 12 Feb 2020, 20:06:29
> Message Posted By: Unknown
>
> The specs state "Using ceil() to compute the lower bound is more trouble
> than it's worth", How should we do rounding up of integer division then?
> Can we just add 1 regardless of whether the result is whole number or not?
The / (= integer quotient) and % (integer remainder)
operators can be used to round up.
Always adding 1 fails when the ratio is a whole number,
--Stan-
PREV
INDEX
NEXT