/src/main/java/net/finmath/montecarlo/automaticdifferentiation/forward/RandomVariableDifferentiableAD.java
X.mult ( 2.0 ) .mult ( Y.mult ( X.add ( Y.getAverage ( X ) * ( X.size ( ) -1 ) ) .sub ( Y.getAverage ( X ) ) ) ) .div ( Math.sqrt ( Y.getVariance ( X ) ) ) ; break;
case VARIANCE2: derivative = differentialIndex == 0 ? Y.mult(2.0).mult(X.mult(Y.add(X.getAverage(Y)*(X.size()-1)).sub(X.getAverage(Y)))) : X.mult(2.0).mult(Y.mult(X.add(Y.getAverage(X)*(X.size()-1)).sub(Y.getAverage(X)))); break; case STDEV2: derivative = differentialIndex == 0 ? Y.mult(2.0).mult(X.mult(Y.add(X.getAverage(Y)*(X.size()-1)).sub(X.getAverage(Y)))).div(Math.sqrt(X.getVariance(Y))) : <extra_id_0> case STDERROR2: derivative = differentialIndex == 0 ? Y.mult(2.0).mult(X.mult(Y.add(X.getAverage(Y)*(X.size()-1)).sub(X.getAverage(Y)))).div(Math.sqrt(X.getVariance(Y) * X.size())) : X.mult(2.0).mult(Y.mult(X.add(Y.getAverage(X)*(X.size()-1)).sub(Y.getAverage(X)))).div(Math.sqrt(Y.getVariance(X) * Y.size())); break; case POW: derivative = (differentialIndex == 0) ? X.pow(Y.getAverage() - 1.0).mult(Y) : zero;