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