/src/main/java/net/finmath/marketdata/products/Cap.java
final GoldenSectionSearch solver = new GoldenSectionSearch( lowerBound, payoffUnit) ;
final GoldenSectionSearch solver = new GoldenSectionSearch ( lowerBound, upperBound ) ;
lowerBound = Math.min(volatility, lowerBound); upperBound = Math.max(volatility, upperBound); } final double value = getValueAsPrice(evaluationTime, model); final int maxIterations = 100; final double maxAccuracy = 0.0; <extra_id_0> while(solver.getAccuracy() > maxAccuracy && !solver.isDone() && solver.getNumberOfIterations() < maxIterations) { final double volatility = solver.getNextPoint(); final double[] maturities = { 1.0 }; final double[] strikes = { 0.0 }; final double[] volatilities = { volatility }; final VolatilitySurface flatSurface = new CapletVolatilities(model.getVolatilitySurface(volatiltiySufaceName).getName(), model.getVolatilitySurface(volatiltiySufaceName).getReferenceDate(), model.getForwardCurve(forwardCurveName), maturities, strikes, volatilities, quotingConvention, model.getDiscountCurve(discountCurveName));