The 'floor' function
truncates an integer or
(defun floor (number) (let ((trunc (truncate number))) (if (or (plusp number) (= number trunc)) trunc (1- trunc))))
The 'floor' function computes an integer number that has been truncated
toward negative infinity.
Examples:
(floor 3) => 3 (floor -3) => -3 (floor 3.0) => 3 (floor -3.0) => -3 (floor 3.1) => 3 (floor -3.1) => -4 (floor 3.5) => 3 (floor -3.5) => -4 (floor 3.9) => 3 (floor -3.9) => -4 (floor 4.0) => 4 (floor -4.0) => -4