
hi all recently i have interested in evaluating of derivatives of complicated functions and discovred that there is a finely developed technique which is called algorithmic differentiation (visit www.autodiff.org if you are interested) the resulting code using an imagined lib may look like this struct { template<typename type> type operator()(type x) //defining function { return sin(x); } } foo; //... double x = 42., f = foo(x), //evaluating function value df = deriv(foo, x); //evaluating derivative value notice that the function' code is untouched the very amazing thing is that the function may be arbitrarily complex it can even be a matrix inversion or eigenvalues evaluation so we get e.g. derivatives of eigenvalues with respect to system parameters gradients, jacobians and higher order derivatives are also possible there are numerous libraries implementing this technique and the questions are: - does it fit into boost collection of libraries? - is it worth building a distinct boost (well-designed) library or adopt a specific lib or to use other (non-boost) libs? and the like personally i am going to investigate the so called tangent mode (or direct mode which is very simple) and probably implement it if i don't find any suitable implementation for my own purposes -- Pavel