/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/RandomVariableDifferentiableAAD.java
if( differentialIndex < 0) {
if ( differentialIndex == 0 ) {
derivative = X.mult(Z); } else { derivative = X.mult(Y); } break; case DISCOUNT: <extra_id_0> derivative = Y.mult(Z).add(1.0).invert(); } else if(differentialIndex == 1) { derivative = X.mult(Z).div(Y.mult(Z).add(1.0).squared()).mult(-1.0); } else { derivative = X.mult(Y).div(Y.mult(Z).add(1.0).squared()).mult(-1.0); }