0

I tried to do division in Lisp. When I do (/ 5 2), the result is 5/2, but what I need is 2.

How can I do that?

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346

1 Answers1

8

The function call

(floor 5 2)

will return the result of the integer division 2 and the remainder 1.

Description in the Common Lisp Hyperspec

siehe-falz
  • 469
  • 3
  • 8