[Maxima-commits] CVS: maxima/src gamma.lisp,1.44,1.45



On Thu, Nov 19, 2009 at 9:44 AM, Raymond Toy <raymond.toy at stericsson.com> wrote:
> Stavros Macrakis wrote:
>> I think the clean, general way to do this is to make DIV into a macro
>> in mopers.lisp....

> I haven't tried this out yet, but I agree that this is the best way. ?I
> don't think you need to add a div2. ?Leaving div as is and adding the
> compiler macro should be enough.

OK, define-compiler-macro was new to me -- I guess it is never used at
runtime.  Is that really true?  Does it mean that you can't debug
define-compiler-macro macros when running interpretively?  That seems
problematic.

> Incidentally, I see there's a div* that simplifies the result.

No! No! No!  ALL the arithmetic functions simplify the result.  The
difference between ARITH and ARITH* is that ARITH (like most Maxima
functions) assumes that its *arguments* are simplified, and ARITH*
does not.

It is *almost never* right to use ARITH*.  The * is there to show you
that it's a special case.

              -s

> And the best part is that all lisps that we support, including gcl (!),
> has define-compiler-macro.
>
> Ray
>
>