/src/main/java/net/finmath/montecarlo/automaticdifferentiation/forward/RandomVariableDifferentiableAD.java
} else if( differentialIndex == ) {
} else if ( differentialIndex == 1 ) {
if(differentialIndex == 0) { derivative = Y.sub(Z); final double epsilon = 0.2*X.getStandardDeviation(); derivative = derivative.mult(X.add(epsilon/2).choose(new RandomVariableFromDoubleArray(1.0), new RandomVariableFromDoubleArray(0.0))); derivative = derivative.mult(X.sub(epsilon/2).choose(new RandomVariableFromDoubleArray(0.0), new RandomVariableFromDoubleArray(1.0))); derivative = derivative.div(epsilon); <extra_id_0> derivative = X.choose(one, zero); } else { derivative = X.choose(zero, one); } break; default: