clad icon indicating copy to clipboard operation
clad copied to clipboard

Support higher order custom derivatives

Open vgvassilev opened this issue 2 years ago • 0 comments

#include "clad/Differentiator/Differentiator.h"

double mysin(double x) { return std::sin(x); }
auto g = clad::differentiate<2>(mysin);

Outputs:

T.cpp:12:42: warning: function 'sin_darg0' was not differentiated because clad failed to differentiate it and no suitable overload was found in namespace 'custom_derivatives', and function may not be eligible for numerical differentiation.
double mysin(double x) { return std::sin(x); }
                                         ^
2 warnings generated.

vgvassilev avatar Oct 17 '21 18:10 vgvassilev