[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quotient



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.