Article View: sci.math.num-analysis
Article #108Re: SUMMARY: Automatic differentiation
From: Dr R Davies*xrbd*
Date: Sun, 26 Jul 1992 00:25
Date: Sun, 26 Jul 1992 00:25
50 lines
2834 bytes
2834 bytes
In article <l71d15INNakq@almaak.usc.edu> ajayshah@almaak.usc.edu (Ajay Shah) writes: >A few days ago I asked for information on software to do >"automatic differentiation". For the uninitiated, this is a way to >get exact derivatives of any order without needing to analytically >evaluate the formulas for the derivatives. >.......... >It looks like the best way to do automatic differentiation is to use >C++. What follows gives you some pointers to software available. >It looks like the people who write matrix libraries in C++ have not >talked a lot with the people who do automatic differentiation in C++ >:-) Please do so! Could you explain the connection with matrix packages a little more. To do symbolic manipulation in C++ you will probably want to use the kind of representation I use in my matrix package, Newmat. Of course the basic concept in that representation is taken from the reading I have done about symbolic manipulation. The problem is that actually evaluating the expressions you get will be quite slow because the computer will have to interpret the representation of the expression as well as do the arithmetic. This is not a problem with your main function (if you are doing maximisation or solving) because you can use templates to get both the symbolic representation and an efficiently compiled expression. But with the derivatives you are stuck with the symbolic expressions. Of course if your variables are matrices rather than reals, then the efficiency is not a problem because the matrix computation times will overwhelm the interpret times. So there are at least two connections with matrices - is this what you had in mind. Now for a short comnmercial break: I agree that C++ is almost an ideal language for doing this kind of thing; having the structure to do both symbolic manipulation and numerical manipulations. But much work with equations will involve powers (the fortran ** operator) and at the moment C++ does not have the power operator. I am still interested in putting the case together for a power operator if no-one else will do it and would be interested if people interested in symbolic manipulation have any comments. Thanks for your list of responses and references. Robert
Technical Details
Message-ID:
<1992Jul26.002544.12218@rata.vuw.ac.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!comp.vuw.ac.nz!rata.vuw.ac.nz!kauri.vuw.ac.nz!robertdReferences:
<l71d15INNakq@almaak.usc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!comp.vuw.ac.nz!rata.vuw.ac.nz!kauri.vuw.ac.nz!robertd Newsgroups: sci.math.num-analysis,comp.lang.c++ Subject: Re: SUMMARY: Automatic differentiation Message-ID: <1992Jul26.002544.12218@rata.vuw.ac.nz> From: robertd@kauri.vuw.ac.nz (Dr R Davies*xrbd*) Date: Sun, 26 Jul 1992 00:25:44 GMT Sender: news@rata.vuw.ac.nz (USENET News System) References: <l71d15INNakq@almaak.usc.edu> Organization: Victoria University of Wellington, New Zealand Nntp-Posting-Host: kauri.vuw.ac.nz Lines: 53