[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Guy.Steele at CMU-10A
- Subject: Quotient
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Mon, 3 Aug 81 05:20:00 GMT
- Cc: BUG-LISP at MIT-MC, BUG-LISPM at MIT-MC, GJC at MIT-MC, LPH at MIT-MC, MOON at MIT-MC
- Original-date: 3 August 1981 01:20-EDT
I suspect that few people make use of nary QUOTIENT and that those who do
could write (QUOTIENT A (quotient b ...)) themselves or a macro that expands
into same. The same for DIFFERENCE. What if only the commutative math ops
were allowed to be nary?
(+)=0, (+ A)=A, (+ A B)=A+B, (+ A B C)=A+B+C, (+ A B C ...)=A+B+C+...
(*)=1, (* A)=A, (* A B)=A*B, (* A B C)=A*B*C, (* A B C ...)=A*B*C* ....
(- x)=-x, (- x y)=x-y, others undefined.
(/ x y)=x/y, others undefined.
(^ x y)=x^y, others undefined.
The same would hold for PLUS, TIMES, QUOTIENT, EXPT, except (- x) would
be (MINUS x) and (- x y) would be (DIFFERENCE x y).
This seems an acceptable compromise for your standard.