[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: Patches
From: |
Manuel Bronstein |
Subject: |
[Axiom-developer] Re: Patches |
Date: |
Fri, 18 Jun 2004 13:35:30 +0200 |
Hello,
Sorry to pitch in late on this, I only received part of the thread and
had to reconstruct it and look at the original bug reports.
- new()$Symbol is working properly in the NAG version, so 9298 is
probably a lisp problem.
- The line
-- cannot use new()$Symbol because of possible re-instantiation
gendiff := "%%0"::SY
in fspace.spad is due to a problem with the axiom runtime: when a
domain falls out of the runtime cache, it gets created again next time
a function from that domain is called. This means that the top-level code
of the domain is re-executed, and the globals are re-assigned.
The existing objects from that domain in your session remain unchanged.
This would cause the value of the gendiff symbol to change at random times,
while previous values of gendiff would be stored in live objects, and that
causes havoc.
If the runtime could guarantee that top-level code is called only once,
then, I would have used new()$Symbol. But this re-instantiation problem
forces hardwiring a specific symbol, I used %%O hoping that it would not
conflict with user variables.
- The definite summation operator %defsum takes 5 arguments as follows:
f - the expression being summed, depends on a dummy summation variable
v - the dummy summation variable
k - the symbol to use for the summation variable when displaying
a - the lower bound
b - the upper bound
For differentiation, it is viewed as a function of the 3 arguments f,a,b
and the chain rule is used, although my interpretation of the partial
derivative of the sum function with respect to the summation bounds is
wrong. I have to remember the reasons for the design, but the current
formula encoded in dvdsum is the following:
D(sum(f(i),i=1..b)) = sum((Df)(i),i=a..b) + f(a) Da + f(b) Db
for any derivation D. In the case of indefinite summation, a is an
arbitrary constant, so that formula becomes
D(sum(f(i),i=..n) = sum((Df)(i),i=..n) + f(n) Dn
which is encoded in dvsum.
Both are clearly wrong when the bounds are not constant, I do not have
the correct derivative at hand when the sum is not expressible in closed
form as a function of the bounds.
If there is agreement to return an unevaluated derivative when the bounds
are not constants w.r.t. D, I can probably patch dvdsum and dvsum to do this.
Regards,
-- mb