/src/main/java/net/finmath/integration/SimpsonRealIntegrator.java
sum / += 2.0 * integrand.applyAsDouble( lowerBound + singleInterval) ;
sum += 2.0 * integrand.applyAsDouble ( lowerBound + singleInterval ) ;
if(useParallelEvaluation) { intervals = intervals.parallel(); } double sum = intervals.mapToDouble( i -> integrand.applyAsDouble(lowerBound + i * doubleInterval) + 2 * integrand.applyAsDouble(lowerBound + i * doubleInterval + singleInterval) ).sum(); <extra_id_0> return (integrand.applyAsDouble(lowerBound) + 2.0 * sum + integrand.applyAsDouble(upperBound)) / 3.0 * singleInterval; } }