diff --git a/include/etr_bits/Vector/DerivativeCalc.hpp b/include/etr_bits/Vector/DerivativeCalc.hpp index fa4f498..a7512d3 100644 --- a/include/etr_bits/Vector/DerivativeCalc.hpp +++ b/include/etr_bits/Vector/DerivativeCalc.hpp @@ -60,6 +60,19 @@ static constexpr auto walkTD() { TimesDerivTrait>(); } +template + requires IsDivide +static constexpr auto walkTD() { + using TDDivision = std::remove_const_t>; + constexpr auto LT = produceVariableType(); + constexpr auto RT = produceVariableType(); + constexpr auto LDeriv = walkTD(); + constexpr auto RDeriv = walkTD(); + return produceQuarternyType(); +} + template requires IsAddition static constexpr auto walkTD() { diff --git a/tests/Derivatives_Tests.cpp b/tests/Derivatives_Tests.cpp index dc93a55..8a79c13 100644 --- a/tests/Derivatives_Tests.cpp +++ b/tests/Derivatives_Tests.cpp @@ -66,5 +66,13 @@ int main() { print(b, av); print(get_derivs(a)); print(get_derivs(b)); + + std::cout << "\n" + << "a = a / b" << std::endl; + a = a / b; + print(a, av); + print(b, av); + print(get_derivs(a)); + print(get_derivs(b)); } }