final double /* @DiscountFactor */dividendDiscount = process.dividendYield().currentLink().discount(a.exercise.lastDate());
final double /* @DiscountFactor */riskFreeDiscount = process.riskFreeRate().currentLink().discount(a.exercise.lastDate());
final double /* @Rate */drift = Math.log(dividendDiscount / riskFreeDiscount) - 0.5 * variance;
final Integrand f = new Integrand(a.payoff, process.stateVariable().currentLink().value(), drift, variance);
final SegmentIntegral integrator = new SegmentIntegral(5000);
final double infinity = 10.0*Math.sqrt(variance);
r.value =
process.riskFreeRate().currentLink().discount(a.exercise.lastDate()) /
Math.sqrt(2.0*Math.PI*variance) * integrator.op(f, drift-infinity, drift+infinity);
}