For Mike Powell - checking those APL differentials and integrals:
I sometimes use pari GP when I can't get extended precision to give the
"correct" results,
and hardly at all for its very powerful higher mathematical library,
but was able to check just now:
it has derivative and integration primitives: deriv() and intformal()
eg for a simple polynomial rational fn:
(19:04) gp > deriv({x^2/(1+x^3)}) \\ differentiate
%10 = (-x^4 + 2*x)/(x^6 + 2*x^3 + 1)
(19:05) gp > intformal(deriv({x^2/(1+x^3)})) \\ back to where you started!
%11 = x^2/(x^3 + 1)
(19:05) gp > deriv({cos(x)}) \\ BUT !!!
%12 = -x + 1/6*x^3 - 1/120*x^5 + 1/5040*x^7 - 1/362880*x^9 +
1/39916800*x^11 - 1/6227020800*x^13 + 1/1307674368000*x^15 + O(x^17)
(19:06) gp > intformal({cos(x)})
%13 = x - 1/6*x^3 + 1/120*x^5 - 1/5040*x^7 + 1/362880*x^9 -
1/39916800*x^11 + 1/6227020800*x^13 - 1/1307674368000*x^15 +
1/355687428096000*x^17 + O(x^19)
There may well be more powerful primitives, but I've got to go out now...
Cheers,
Mike
On 27/08/2019 02:46, Mike Powell wrote:
Henry,
I’ve been writing a few documents that will hopefully be useful in the calculus
world. There are currently three, all in various stages of completion: “The
Derivative Revisited”, “The Derivative Rules” and “The Derivative in Machine
Learning”. The idea behind them is to start with Ken Iverson’s 1979 classic
paper from the 1979 ACM conference, bring it up to date and use that as a base
for finding good matrix algorithms in Machine Learning.
I choose to write my code in APL. Occasionally I have moments when I’m not
quite sure what I’m doing. That’s when I need an authoritative reference. And J
is that. It’s my bible. Losing D., without a comparable replacement, would be a
big loss.
For my purposes, I’d settle for just the first derivative. I don’t need the
higher derivatives, symbolic differentiation or the inverse. My most frequent
resort to J is for a precise interpretation of the rules around rank and the
derivative. For example, my current slowdown arises from the question: Given
functions f and g of rank s and t, what is the rank of their composition (f g)?
Perhaps it would help if you could explain more about “They worked, but they
were not complete”. (I’m certainly not arguing for any further expansion of the
capability.)
Is there some documentation that describes what’s available in the
math/calculus addon?
Cheers,
Mike Powell
On Aug 26, 2019, at 16:04, Henry Rich <[email protected]> wrote:
J has supported symbolic differentiation and integration for some time.
Starting with Release 9.01, primitive support for calculus is withdrawn.
The calculus primitives were a proof-of-concept that was an incomplete success.
They worked, but they were not complete, and the nature of mathematics is such that
they will never be complete. It has long been clear that they should have been
implemented in a J script, which would be much easier to expand & maintain.
The primitives for Taylor series - t. t: T. - are terminated with extreme
prejudice.
The primitives for differentiation and integration - d. D. D: - are also removed,
but they are going to a Better Place. A new addon, math/calculus, is now
available. It provides most of the features of the calculus primitives.
Interested users are encouraged to fix & expand this addon to give support for
more methods of integration and differentiation.
Henry Rich
---
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm