[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
P.S. to previous message
- To: info-lispm at MIT-AI
- Subject: P.S. to previous message
- From: MOON at MIT-MC (David A. Moon)
- Date: Fri, 13 Mar 81 22:32:00 GMT
- Cc: (BUG LISP) at MIT-MC
- Original-date: 13 MAR 1981 1732-EST
Sorry, I left a couple things out of that message.
FLOOR, CEIL, etc. will accept one or two arguments. With one argument
they will behave as described in the previous message. With two arguments,
they will first take the quotient of arg1 divided by arg2 then round the
result accordingly.
QUOTIENT of two arguments is identical to TRUNC of two arguments.
REMAINDER is the corresponding remainder.
I will add a ninth new function, MOD, which is the remainder that
goes with the FLOOR form of division.
Except for exact division, this seems consistent with the discussion of
division of a couple months ago, factoring out the slash-backslash issue.
Exact division really requires rational numbers as a datatype, although
some people have proposed a half-measure which uses flonums to simulate
rationals. This isn't such a win since arithmetic on such a quotient will
then never turn back into an integer. I propose to defer exact division.