Function: ceiling

ceiling is a function defined in floatfns.c.

Signature

(ceiling ARG &optional DIVISOR)

Documentation

Return the smallest integer no less than ARG.

This rounds the value towards +inf. With optional DIVISOR, return the smallest integer no less than ARG/DIVISOR.

Other relevant functions are documented in the number group.

Shortdoc

;; number
(ceiling 1.2)
    => 2
  (ceiling -1.2)
    => -1
  (ceiling 5.4 2)
    => 3

Source Code

// Defined in /usr/src/emacs/src/floatfns.c
{
  return rounding_driver (arg, divisor, ceil, mpz_cdiv_q, ceiling2);
}