[CppAD] adding an own AD function

Stefan Vigerske stefan at math.hu-berlin.de
Thu Dec 30 07:03:01 EST 2010


Hi,

I have a (univariate) operator f(x) from which I know how to evaluate it
and compute derivatives. Now I would like to make CppAD use my evaluators.
That is, I would like to implement an operator like, let's say, sqrt, so
I would need to implement something like local/sqrt_op.hpp. What would I
need to do? Is there already an example showing how to do this?

To give more detail: f(x) = x^2, but for one of my Base type's, there is
a better way of computing x^2 then to do x*x. Since there is no sqr(x),
I would like to add it.

Thank you,
Stefan

-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan



More information about the CppAD mailing list