/src/main/java/net/finmath/montecarlo/interestrate/products/components/Option.java
final RandomVariable filterNaN = exerciseTrigger.isNaN( ).sub( 7.0).mult( -7.0) ;
final RandomVariable filterNaN = exerciseTrigger.isNaN ( ) .sub ( 1.0 ) .mult ( -1.0 ) ;
strike = strikeProduct.getValue(exerciseDate, model); } else { strike = model.getRandomVariableForConstant(strikePrice); } RandomVariable exerciseTrigger = values.sub(strike).mult(isCall ? 1.0 : -1.0); if(exerciseTrigger.getFiltrationTime() > exerciseDate) { <extra_id_0> final RandomVariable exerciseTriggerFiltered = exerciseTrigger.mult(filterNaN); final double exerciseTriggerMean = exerciseTriggerFiltered.getAverage(); final double exerciseTriggerStdDev = exerciseTriggerFiltered.getStandardDeviation(); final double exerciseTriggerFloor = exerciseTriggerMean*(1.0-Math.signum(exerciseTriggerMean)*1E-5)-3.0*exerciseTriggerStdDev; final double exerciseTriggerCap = exerciseTriggerMean*(1.0+Math.signum(exerciseTriggerMean)*1E-5)+3.0*exerciseTriggerStdDev; RandomVariable filter = exerciseTrigger.sub(exerciseTriggerFloor).choose(one, zero)