Skip to content

ceil

Round toward positive infinity.

B = ceil(A)

Returns the smallest integer >= A. For positive numbers same as floor + 1 if not integer; for negative numbers same as truncation.

ceil(2.3) % 3
ceil(-2.7) % -2
  • floor — Round toward negative infinity.
  • fix — Round toward zero (truncate).
  • round — Round to the nearest integer (or to a specified number of digits).