/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DigitalOptionDeltaLikelihood.java
final RandomVariable lr = underlyingAtMaturity.log( ).sub( sigma.log( ) ).sub( r * T - 0.5 * underlyingAtToday*sigma * T).div( sigma * sigma * T).div( underlyingAtToday) ;
final RandomVariable lr = underlyingAtMaturity.log ( ) .sub ( underlyingAtToday.log ( ) ) .sub ( r * T - 0.5 * sigma*sigma * T ) .div ( sigma * sigma * T ) .div ( underlyingAtToday ) ;
} final RandomVariable underlyingAtMaturity = model.getAssetValue(maturity,0); final RandomVariable underlyingAtToday = model.getAssetValue(0.0,0); final double T = maturity-evaluationTime; final double r = blackScholesModel.getRiskFreeRate().doubleValue(); final double sigma = blackScholesModel.getVolatility().doubleValue(); <extra_id_0> final RandomVariable payoff = underlyingAtMaturity.sub(strike).choose(new Scalar(1.0), new Scalar(0.0)); final RandomVariable modifiedPayoff = payoff.mult(lr); final RandomVariable numeraireAtMaturity = model.getNumeraire(maturity); final RandomVariable numeraireAtEvalTime = model.getNumeraire(evaluationTime); final RandomVariable monteCarloWeightsAtMaturity = model.getMonteCarloWeights(maturity); final RandomVariable monteCarloWeightsAtEvalTime = model.getMonteCarloWeights(evaluationTime);