diff --git a/include/clad/Differentiator/BuiltinDerivatives.h b/include/clad/Differentiator/BuiltinDerivatives.h index 92b9094ea..3a971a874 100644 --- a/include/clad/Differentiator/BuiltinDerivatives.h +++ b/include/clad/Differentiator/BuiltinDerivatives.h @@ -135,6 +135,11 @@ CUDA_HOST_DEVICE inline void __builtin_powf_pullback(float x, float exponent, *d_exponent += t.pushforward * d_y; } +CUDA_HOST_DEVICE ValueAndPushforward +__builtin_exp_pushforward(double x, double d_x) { + return {__builtin_exp(x), __builtin_exp(x) * d_x}; +} + // FIXME: Add the rest of the __builtin_ routines for log, sqrt, abs, etc. namespace std {