Closed guitargeek closed 3 months ago
@guitargeek, do you have an idea which commit broke it? There are 17 or so since the tag...
@PetroZarytskyi I just checked that this got introduced in https://github.com/vgvassilev/clad/pull/904. I have created a very minimal reproducer below. Can you look into this once?
#include "clad/Differentiator/Differentiator.h"
double f(double x) {
return x + (x > 0 ? 1.0 : 0.0);
}
int main() {
auto f_dx = clad::gradient(f);
double dx = 0;
f_dx.execute(3, &dx);
std::cout << dx << std::endl;
return 0;
}
This was noticed when running the RooFit unit tests with clad
master
.Reproducer (ROOT macro, but should be easy to turn into compiled executable):
Output: