diff --git a/opm/autodiff/AutoDiff.hpp b/opm/autodiff/AutoDiff.hpp index a542abe89..606353370 100644 --- a/opm/autodiff/AutoDiff.hpp +++ b/opm/autodiff/AutoDiff.hpp @@ -256,7 +256,7 @@ namespace Opm const AutoDiff& rhs) { Scalar a = Scalar(lhs) / rhs.val(); - Scalar b = -Scalar(lhs) / (rhs.val() * rhs.val()); + Scalar b = (-Scalar(lhs) / (rhs.val() * rhs.val())) * rhs.der(); return AutoDiff::function(a, b); }