Anonymous user
Arithmetic/Integer: Difference between revisions
don't use EVAL
(→TI-89 BASIC: new example) |
(don't use EVAL) |
||
Line 173:
=={{header|Common Lisp}}==
<lang lisp>(defun arithmetic (&
(mapc
(lambda (op
(format t "~a => ~a~%"
'(+ - * mod rem floor ceiling truncate round expt))
(values))</lang>
Common Lisp's integer division functions are <code>floor</code>, <code>ceiling</code>, <code>truncate</code>, and <code>round</code>. They differ in how they round their quotient.
|