You can use the floor function:
(floor 7 2) 3 1
Note that it returns multiple values, and you only need the first one. Since floor returns multiple values, this can be done using multiple-value-bind as follows:
(multiple-value-bind (qr) (floor 7 2) q) => 3
Edit: As Rainer notes in his comment, you can simply pass the floor result as an argument if all you need is private.
[1]> (floor 7 2) 3 ; 1 [2]> (+ (floor 7 2) 5) 8 [3]>
I leave a link to multiple-value-bind in the answer, as this is an important function that you are familiar with.
Eli bendersky
source share