Jos Boumans said:
: try to take a look at the 'floor' and 'ceil' in the posix module
: 
: they will do exactly what you want!

Not quite. They don't round, they truncate:

      round  floor ceil
10.0    10     10   10
10.2    10     10   11
10.7    11     10   11

Now Craig said:

: I have an number that needs to be rounded to the nearest whole number.

but looking again at the variable name ($archives_needed) in his
example, I suspect that he may instead want ceil after all.  For
example, to calculate how many CDs you'd need to store a given amount
of data, you'd do it like:

$nCDs = ceil( $numberOfBytes / $bytesPerCD );

Is that what you're after, Craig?

-- tdk

Reply via email to