Hi everyone, I'm currently evaluating whether to use GiNaC for my project where I basically need to differentiate functions containing max(…,…), some tanh(…), and some other atrocities. Now, from the documentation it looks like GiNaC does not implement max() or min(). I realize that these functions do weird things (especially when you differentiate them). Still, I was wondering if they are really not included, just missing from the documentation, or if I'm too blind to find them. Any pointers are appreciated! Regards, Lukas
Dear Lukas,
On Wed, 24 May 2017 16:30:58 +0200, Lukas Barth <lists@tinloaf.de> said:
LB> Hi everyone, I'm currently evaluating whether to use GiNaC for LB> my project where I basically need to differentiate functions LB> containing max(…,…), some tanh(…), and some other LB> atrocities. Now, from the documentation it looks like GiNaC does LB> not implement max() or min(). Please note that you can 1. Either use the implemented function abs(): max(a,b)=(a+b)/2+abs(a-b)/2 max(a,b)=(a+b)/2-abs(a-b)/2 2. Or define your own functions max(), min() using GiNaC source (tutorial "6.2 Symbolic functions") Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/
participants (2)
-
Lukas Barth
-
Vladimir V. Kisil