axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Patch 3148, was: any?, member?, ...


From: William Sit
Subject: Re: [Axiom-developer] Patch 3148, was: any?, member?, ...
Date: Wed, 23 Jun 2004 12:08:40 -0400

Martin Rubey wrote:
>      dvdsum(l, x) ==
>        x = retract(y := third l)@SE => 0
> -      k := retract(d := second l)@K
> -      differentiate(h := third rest rest l,x) * eval(f := first l, k, h)
> -        - differentiate(g := third rest l, x) * eval(f, k, g)
> -             + opdsum [differentiate(f, x), d, y, g, h]
> +      if member?(x, variables(h := third rest rest l)) or
> +         member?(x, variables(g := third rest l)) then
> +        dm := dummy
> +        kernel(opdiff, [eval(opdsum(l), x::F, dm), dm, x::F])
> +      else
> +        opdsum [differentiate(first l, x), second l, y, g, h]

>  William Sit wrote:
>  > BTW: should dm:=new()$SE be used instead?
> 
> well, I think yes, but only if we change all occurrences of dummy to
> new()$SE. In the near future (release 1) there should be a pamphlet file that
> incorporates all the patches and explains them, too.

I thought all occurrences of dummy in combfunc.spad were replaced. Besides the
definition dummy=new()$Symbol, there were four occurrences in the functions
product and summation, all were replaced effectively with inline calls to
new()$Symbol assigned to a local variable. The dummy in the patch above is the
only one left. So, the patch is correct as it is because dummy is now used only
once in combfunc.spad. However, I think removing all references to dummy
(including its definition) and using a local version each time will avoid
possible future mistakes similar to the ones you are patching.

Regarding your suggestion to have a pamphlet file "that ... explains them", I
think perhaps the pamphlet file should add another tag like "history" that could
be extracted separately into a tex file documenting just the changes, but in
chronological order. It will make those times when one wants to just read the
final code easier, especially for files that needed many patches.

William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]