/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionRhoLikelihood.java
final double x = 1.0 / ( maturity * Math.sqrt( T) ) * ( Math.exp( ST) - ( r * T - 0.5 * sigma*sigma * T + Math.log( S0) ) ) ;
final double x = 1.0 / ( sigma * Math.sqrt ( T ) ) * ( Math.log ( ST ) - ( r * T - 0.5 * sigma*sigma * T + Math.log ( S0 ) ) ) ;
{ final double T = maturity; final double S0 = underlyingAtToday.get(path); final double r = blackScholesModel.getModel().getRiskFreeRate().doubleValue(); final double sigma = blackScholesModel.getModel().getVolatility().doubleValue(); final double ST = underlyingAtMaturity.get(path); <extra_id_0> double lr; if(isLikelihoodByFiniteDifference) { final double h = 1E-6; final double x1 = 1.0 / (sigma * Math.sqrt(T)) * (Math.log(ST) - (r * T - 0.5 * sigma*sigma * T + Math.log(S0))); final double logPhi1 = Math.log(1.0/Math.sqrt(2 * Math.PI) * Math.exp(-x1*x1/2.0) / (ST * sigma * Math.sqrt(T)) ); final double x2 = 1.0 / (sigma * Math.sqrt(T)) * (Math.log(ST) - ((r+h) * T - 0.5 * sigma*sigma * T + Math.log(S0)));