final double /*@Real*/ temp = BlackFormula.blackFormula(payoff.optionType(), payoff.strike(), forwardSi, Math.sqrt(variance))*riskFreeDiscount;
switch (payoff.optionType()) {
case Call:
Q = (-(n-1.0) + Math.sqrt(((n-1.0)*(n-1.0)) + 4 * K)) / 2;
LHS = Si - payoff.strike();
RHS = temp + (1 - dividendDiscount * cumNormalDist.op(d1)) * Si / Q;
bi = dividendDiscount * cumNormalDist.op(d1) * (1 - 1/Q)
+ (1 - dividendDiscount * cumNormalDist.derivative(d1) / Math.sqrt(variance)) / Q;
while (Math.abs(LHS - RHS)/payoff.strike() > tolerance) {
Si = (payoff.strike() + RHS - bi * Si) / (1 - bi);
forwardSi = Si * dividendDiscount / riskFreeDiscount;