ceil

This expr function returns the least floating point number with a zero fractional part that is no less than its argument (i.e., it rounds up).


The ceil command is a part of the TclX extension. TclX created command interfaces to a number of Tcl mathematical functions. So just read the expr documentation for ceil, and you will know what kind of arguments to pass to it.

RS: Of course you can also write, if you wish

   proc ceil x {expr {ceil($x)}}

so you don't have to require TclX...

LV Certainly. However, the point was to document what the TclX ceil command does...

DKF: Also available in Tcl 8.5 as tcl::mathfunc::ceil.