Dear All,
On Sun, 03 Nov 2013 23:36:36 +0100, "Richard B. Kreckel" <kreckel@ginac.de> said: RK> And, in particular, @Alex and @Vladimir: do you have things in the pipeline?
I wish to propose another GiNaC extension. Consider function abs(). Since it can be presented as abs(z)=sqrt(z*z.conjugate()), the derivative of abs(f) may be calculated as (abs(f))'=(f'*f.conjugate()+f*f'.conjugate())/2/abs(f) However, this formula cannot be packed into the present GiNaC code, since it only knows about the chain rule. Thus, the patch adds a possibility to define derivatives of functions in some general expression. In particular, the above derivative of abs() is defined. Example: cout << abs(log(z)).diff(z) << endl; // (before) -> D[0](abs)(log(z))*z^(-1) // (now) -> 1/2*(z^(-1)*conjugate(log(z))+log(z)*conjugate(z)^(-1))*abs(log(z))^(-1) Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835